<?php
class FooBar {
private function __construct() {
}
public static function newBaz() {
return new Baz();
}
}
class Baz extends FooBar {}
var_dump(get_class(FooBar::newBaz()));
//var_dump(get_class(new Baz()));
Fatal error: Call to private FooBar::__construct() from context 'FooBar' in /in/h4Mq3 on line 9
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/h4Mq3 on line 16
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/h4Mq3 on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/h4Mq3 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/h4Mq3 on line 4
Process exited with code 255.