mirror of
https://github.com/php/php-src.git
synced 2024-12-29 19:59:19 +08:00
11 lines
233 B
PHP
11 lines
233 B
PHP
--TEST--
|
|
Foreach loop tests - error case: key is a reference.
|
|
--FILE--
|
|
<?php
|
|
$a = array("a","b","c");
|
|
foreach ($a as &$k=>$v) {
|
|
var_dump($v);
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Key element cannot be a reference in %s on line 3
|