下面的 PHP 函数产生了这个错误: Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '$', on this line that content this code:$obj = new ( );
有谁知道出了什么问题?
function createContextAwareObjectOfClass($className) {
$className;
$obj = new ( );
IApplicationContextAware;
if (!( $obj instanceof null )) {
Exception;
throw new ( '' . 'Non-context aware class "' . $className . '" passed to createContextAwareObjectOfClass' );
}
$obj->setAppContext( $this );
return $obj;
}