<?php
error_reporting(E_ALL);
class A extends B
{
public function run()
{
B::iAmNotStatic();
}
}
class B
{
public function iAmNotStatic() {}
}
B::iAmNotStatic();
$a = new A();
$a->run();
Fatal error: Uncaught Error: Non-static method B::iAmNotStatic() cannot be called statically in /in/I8clA:17
Stack trace:
#0 {main}
thrown in /in/I8clA on line 17
Process exited with code 255.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3DKFZ on line 6
Process exited with code 255.
Output for 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/3DKFZ on line 6
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/3DKFZ on line 6
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/I8clA on line 6
Process exited with code 255.