<?php
class Test {
private $properties;
public function doSomething($passed=NULL) {
Test::create('test', 'test', 'test');
}
public static function create($id /* [ $arg, ... */) {
$arguments = func_get_args();
$command = new self($arguments);
$res = new static($command, $this->properties);
var_dump($res);
}
}
$test = new Test();
$test->doSomething();
Fatal error: Uncaught Error: Using $this when not in object context in /in/DT8sL:10
Stack trace:
#0 /in/DT8sL(5): Test::create('test', 'test', 'test')
#1 /in/DT8sL(17): Test->doSomething()
#2 {main}
thrown in /in/DT8sL on line 10
Process exited with code 255.
Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in /in/DT8sL on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in /in/DT8sL on line 10
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/DT8sL on line 3
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/DT8sL on line 3
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/DT8sL on line 3
Process exited with code 255.