1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/spl/tests/bug36825.phpt
2020-02-03 22:52:20 +01:00

30 lines
411 B
PHP

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