diff options
Diffstat (limited to 'ext/standard/tests/array/bug43505.phpt')
-rw-r--r-- | ext/standard/tests/array/bug43505.phpt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/standard/tests/array/bug43505.phpt b/ext/standard/tests/array/bug43505.phpt new file mode 100644 index 000000000..219bbfe29 --- /dev/null +++ b/ext/standard/tests/array/bug43505.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #43505 (Assign by reference bug) +--INI-- +error_reporting=0 +--SKIPIF-- +<?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?> +--FILE-- +<?php +class Test implements Countable { + public function count() { + return $some; + } +} + +$obj = new Test(); + +$a = array(); +$b =& $a['test']; +var_dump($a); + +$t = count($obj); + +$a = array(); +$b =& $a['test']; +var_dump($a); +?> +--EXPECT-- +array(1) { + ["test"]=> + &NULL +} +array(1) { + ["test"]=> + &NULL +} + |