PHP 8.5.0 Alpha 4 available for testing

Voting

: five plus two?
(Example: nine)

The Note You're Voting On

bob
10 years ago
Note that extract() will only create or overwrite variables in the current scope, so
<?
function test(){
$a=Array('b'=>1,'c'=>2);
extract($a);
}
test();
exit("$b");
?>
will produce no output, whereas
<?
function test(){
global $b;
$a=Array('b'=>1,'c'=>2);
extract($a);
}
test();
exit("$b");
?>
will output 1.

<< Back to user notes page

To Top