php-src/Zend/tests/bug41026.phpt
George Peter Banyard a9695cc615
Refactor register shutdown function mechanism
Use FCI/FCC structure instead of custom implementation which does the same.
This also fixes the "bug" which prevented static methods from being shutdown functions.

Closes GH-5829

Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
2021-05-10 15:54:59 +01:00

26 lines
389 B
PHP

--TEST--
Bug #41026 (segfault when calling "self::method()" in shutdown functions)
--FILE--
<?php
class try_class
{
static public function main ()
{
register_shutdown_function (array ("self", "on_shutdown"));
}
static public function on_shutdown ()
{
printf ("CHECKPOINT\n");
}
}
try_class::main ();
echo "Done\n";
?>
--EXPECT--
Done
CHECKPOINT