--TEST--
-Bug #36825 ()
+Bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
--FILE--
<?php
-class foo extends ArrayObject {
- public function __construct() {
- }
-
- public function offsetGet($key) {
+class foo extends ArrayObject
+{
+ public function offsetGet($key)
+ {
+ echo __METHOD__ . "($key)\n";
throw new Exception("hi");
}
}
-$test=new foo();
-try{
+$test = new foo();
+
+try
+{
var_dump($test['bar']);
-} catch (Exception $e) {
+}
+catch (Exception $e)
+{
echo "got exception\n";
}
-echo "Done\n";
?>
+===DONE===
--EXPECT--
+foo::offsetGet(bar)
got exception
-Done
+===DONE===