mirror of
https://github.com/php/php-src.git
synced 2024-10-20 16:02:44 +00:00
37 lines
481 B
PHP
37 lines
481 B
PHP
--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
|
|
}
|
|
|