mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
631bc81607
Co-authored-by: Dmitry Stogov <dmitry@zend.com> Closes GH-12461
19 lines
337 B
PHP
19 lines
337 B
PHP
--TEST--
|
|
Frameless call with throwing destructor
|
|
--FILE--
|
|
<?php
|
|
class Foo {}
|
|
class Bar {
|
|
public function __destruct() {
|
|
throw new Exception();
|
|
}
|
|
}
|
|
in_array(new Foo(), [new Bar()], true);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): Bar->__destruct()
|
|
#1 {main}
|
|
thrown in %s on line %d
|