1--TEST-- 2Bug #38217 (ReflectionClass::newInstanceArgs() tries to allocate too much memory) 3--FILE-- 4<?php 5 6class Object { 7 public function __construct() { 8 } 9} 10 11$class= new ReflectionClass('Object'); 12var_dump($class->newInstanceArgs()); 13 14class Object1 { 15 public function __construct($var) { 16 var_dump($var); 17 } 18} 19 20$class= new ReflectionClass('Object1'); 21var_dump($class->newInstanceArgs()); 22var_dump($class->newInstanceArgs(array('test'))); 23 24 25echo "Done\n"; 26?> 27--EXPECTF-- 28object(Object)#%d (0) { 29} 30 31Warning: Missing argument 1 for Object1::__construct() in %s on line %d 32 33Notice: Undefined variable: var in %s on line %d 34NULL 35object(Object1)#%d (0) { 36} 37string(4) "test" 38object(Object1)#%d (0) { 39} 40Done 41