|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-26 08:03 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ ReflectionClass::newInstanceArgs() tries to allocate huge pieces of memory, the engine dies because allowed memory size is exceeded. Omitting the empty constructor makes the problem go away, so it might be related to that. The error also occurs in PHP 5.1.4. Reproduce code: --------------- <?php class Object { public function __construct() { } } $class= new ReflectionClass('Object'); var_dump($class->newInstanceArgs()); ?> Expected result: ---------------- PHP Warning: ReflectionClass::newInstanceArgs() expects exactly 2 parameters, 1 given in /usr/home/alex/reflection_newinstance.php object(Object)#2 (0) { } Actual result: -------------- PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 550152752 bytes) in /usr/home/alex/reflection_newinstance.php on line 8