php-src/ext/dl_test/dl_test.stub.php
Arnaud Le Blanc 1c182674b0
Destroy temporary module classes in reverse order
We destroy classes of dl()'ed modules in clean_module_classes(), during
shutdown. Child classes of a module use structures of the parent class (such as
inherited properties), which are destroyed earlier, so we have a use-after-free
when destroying a child class.

Here I destroy classes in reverse order, as it is done in zend_shutdown() for
persistent classes.

Fixes GH-17961
Fixes GH-15367
2025-03-14 10:45:17 +01:00

26 lines
434 B
PHP

<?php
/**
* @generate-class-entries
* @undocumentable
*/
function dl_test_test1(): void {}
function dl_test_test2(string $str = ""): string {}
class DlTest {
public function test(string $str = ""): string {}
}
class DlTestSuperClass {
public int $a;
public function test(string $str = ""): string {}
}
class DlTestSubClass extends DlTestSuperClass {
}
/** @alias DlTestClassAlias */
class DlTestAliasedClass {
}