<?php
class f
{
function f(&$e, &$u, $f=false)
{
}
}
function getNew()
{
$a = func_get_args();
$c = array_shift($a);
foreach ($a as $k => &$value)
$a[$k] = $value;
//return call_user_func_array(array('f', 'f'), $c);
$r = new ReflectionClass($c);
return $r->newInstanceArgs($a);
}
$e = new stdClass;
$u = new stdClass;
var_dump(getNew('f', $e, $u));
getNew(new ('f', $e, $u));
- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
- Parse error: syntax error, unexpected '(' in /in/TFiVf on line 27
Process exited with code 255.
preferences:
192.28 ms | 1395 KiB | 58 Q