Skip to content
Permalink
5.0
Go to file
 
 
Cannot retrieve contributors at this time
27 lines (20 sloc) 485 Bytes
--FILE--
<?php
// example in GO https://play.golang.org/p/8RGPPPQLgQu
require \implode(\DIRECTORY_SEPARATOR, [__DIR__, '..', '..', 'vendor', 'autoload.php']);
/**
* Function must return value by reference.
*/
function &foo()
{
// variable $result must be passed to anonymous function by reference
defer($_, function () use (&$result) {
$result = 'Change World';
});
$result = 'Hello World';
return $result;
}
echo foo();
?>
--EXPECT--
Change World
You can’t perform that action at this time.