mirror of
https://github.com/php/php-src.git
synced 2024-10-21 16:33:44 +00:00
34 lines
437 B
PHP
Executable File
34 lines
437 B
PHP
Executable File
--TEST--
|
|
SPL: ArrayObject::seek() and exceptions
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
class foo extends ArrayObject
|
|
{
|
|
public function seek($key)
|
|
{
|
|
echo __METHOD__ . "($key)\n";
|
|
throw new Exception("hi");
|
|
}
|
|
}
|
|
|
|
$test = new foo(array(1,2,3));
|
|
|
|
try
|
|
{
|
|
$test->seek('bar');
|
|
}
|
|
catch (Exception $e)
|
|
{
|
|
echo "got exception\n";
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
foo::seek(bar)
|
|
got exception
|
|
===DONE===
|