- Add test case for repeated dynamic static calls not reusing released trampoline - Add test case for repeated static calls to runtime-defined magic class - Throw LogicException in getFuncPtr when class method name is detected - Update getFuncPtr to reject class method names with proper error message - Replace getFuncPtr with getMethodPtr for static method calls in method call trait - Update Closure::fromCallable handling to use getMethodPtr instead of getFuncPtr - Fix Python module trait to use getMethodPtr for PyCore methods - Update translator to clear function and class maps on every request shutdown - Refactor property access resolver to use compiled class declaration for parent lookup - Add test to verify subclass lookup uses compiled class declaration when parent index is missing - Update request shutdown test to run in all build modes with proper assertions - Add specific test for function pointer cache rejecting class method namespull/48/head
parent
e07b97d6cf
commit
18dd9a8a32
11 changed files with 152 additions and 51 deletions
@ -0,0 +1,23 @@ |
||||
--TEST-- |
||||
Repeated dynamic static calls do not reuse a released Zend trampoline |
||||
--FILE-- |
||||
<?php |
||||
class RepeatedMagicStaticCall |
||||
{ |
||||
public static function __callStatic(string $name, array $arguments): string |
||||
{ |
||||
return $name . ':' . $arguments[0]; |
||||
} |
||||
} |
||||
|
||||
function main(): void |
||||
{ |
||||
for ($i = 0; $i < 3; $i++) { |
||||
var_dump(RepeatedMagicStaticCall::missing($i)); |
||||
} |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
string(9) "missing:0" |
||||
string(9) "missing:1" |
||||
string(9) "missing:2" |
||||
@ -0,0 +1,25 @@ |
||||
--TEST-- |
||||
Repeated static calls to a runtime-defined magic class use transient callables safely |
||||
--FILE-- |
||||
<?php |
||||
function main(): void |
||||
{ |
||||
eval(<<<'PHP' |
||||
class RuntimeMagicStaticCall |
||||
{ |
||||
public static function __callStatic(string $name, array $arguments): string |
||||
{ |
||||
return $name . ':' . $arguments[0]; |
||||
} |
||||
} |
||||
PHP); |
||||
|
||||
for ($i = 0; $i < 3; $i++) { |
||||
var_dump(RuntimeMagicStaticCall::missing($i)); |
||||
} |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
string(9) "missing:0" |
||||
string(9) "missing:1" |
||||
string(9) "missing:2" |
||||
Loading…
Reference in new issue