5dee3c11 break
| From: | Dmitry Stogov | Date: | Tue, 06 May 2014 08:11:20 +0000 |
| Subject: | 5dee3c11 break | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-73950@lists.php.net to get a copy of this message | ||
Hi Tjerk,
your commit broke the code that worked fine before (still works in 5.5 but
broken in 5.6 and above).
It leads into infinity recursion until stack overflow.
It must be fixed or reverted.
Thanks. Dmitry.
<?php
class Parameters extends ArrayObject {
public function __construct(array $values = null) {
if (null === $values) {
$values = array();
}
parent::__construct($values, ArrayObject::ARRAY_AS_PROPS);
}
public function offsetGet($name) {
if (isset($this[$name])) {
return parent::offsetGet($name);
}
return null;
}
}
$x = new Parameters();
var_dump($x['foo']);
$x['foo'] = 'bar';
var_dump($x['foo']);
?>