mirror of
https://github.com/php/php-src.git
synced 2024-09-29 13:56:09 +00:00
21 lines
170 B
Plaintext
21 lines
170 B
Plaintext
|
--TEST--
|
||
|
Foreach by reference on constant
|
||
|
--FILE--
|
||
|
<?php
|
||
|
for ($i = 0; $i < 3; $i++) {
|
||
|
foreach ([1,2,3] as &$val) {
|
||
|
echo "$val\n";
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
1
|
||
|
2
|
||
|
3
|
||
|
1
|
||
|
2
|
||
|
3
|