mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
a9695cc615
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>
26 lines
389 B
PHP
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
|