mirror of
https://github.com/php/php-src.git
synced 2024-09-29 22:06:09 +00:00
19 lines
231 B
Plaintext
19 lines
231 B
Plaintext
|
--TEST--
|
||
|
Temporary array expressions can be iterated by reference
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$a = 'a';
|
||
|
$b = 'b';
|
||
|
|
||
|
foreach ([&$a, &$b] as &$value) {
|
||
|
$value .= '-foo';
|
||
|
}
|
||
|
|
||
|
var_dump($a, $b);
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
string(5) "a-foo"
|
||
|
string(5) "b-foo"
|