php-src/Zend/tests/this_in_foreach_003.phpt
2020-02-03 22:52:20 +01:00

12 lines
189 B
PHP

--TEST--
$this in foreach
--FILE--
<?php
$a = [1];
foreach ($a as &$this) {
var_dump($this);
}
?>
--EXPECTF--
Fatal error: Cannot re-assign $this in %sthis_in_foreach_003.php on line 3