php-src/Zend/tests/static_variable_in_private_method.phpt
Nikita Popov f2e8851245 Remove func copy optimization for private method with static vars
Not NULLing the static_variables pointer for shadow methods during
static var shutdown would be a way to avoid this leak, but unless
there's evidence that inherited private methods with static vars are
actually a common use-case, I don't think we should keep this kind
of fragile edge-case optimization.

Fixes OSS-Fuzz #17875.
2019-10-01 13:04:06 +02:00

17 lines
198 B
PHP

--TEST--
Inheritance of private method with static variable
--FILE--
<?php
class A {
private function m() {
static $x;
}
}
class B extends A {}
?>
===DONE===
--EXPECT--
===DONE===