mirror of
https://github.com/php/php-src.git
synced 2024-10-19 07:22:40 +00:00
9a59df13cc
(I consider it's wrong that we can't do it, but we shouldn't segfault anyway)
18 lines
355 B
PHP
18 lines
355 B
PHP
--TEST--
|
|
SPL: ArrayIterator and values assigned by reference
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$tmp = 1;
|
|
|
|
$a = new ArrayIterator();
|
|
$a[] = $tmp;
|
|
$a[] = &$tmp;
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Objects used as arrays in post/pre increment/decrement must return values by reference in %s on line %d
|