xref: /PHP-5.4/ext/standard/tests/array/bug43505.phpt (revision 0530f9e3)
1--TEST--
2Bug #43505 (Assign by reference bug)
3--INI--
4error_reporting=0
5--SKIPIF--
6<?php if (!extension_loaded('spl')) die("skip SPL is not available"); ?>
7--FILE--
8<?php
9class Test implements Countable {
10    public function count() {
11        return $some;
12    }
13}
14
15$obj = new Test();
16
17$a = array();
18$b =& $a['test'];
19var_dump($a);
20
21$t = count($obj);
22
23$a = array();
24$b =& $a['test'];
25var_dump($a);
26?>
27--EXPECT--
28array(1) {
29  ["test"]=>
30  &NULL
31}
32array(1) {
33  ["test"]=>
34  &NULL
35}
36
37