Fatal error: Uncaught Error: Non-static method A::foo() cannot be called statically in /in/L4Hts:10
Stack trace:
#0 /in/L4Hts(14): B->bar()
#1 {main}
thrown in /in/L4Hts on line 10
Process exited with code 255.
Deprecated: Non-static method A::foo() should not be called statically in /in/L4Hts on line 10
Fatal error: Uncaught Error: Using $this when not in object context in /in/L4Hts:5
Stack trace:
#0 /in/L4Hts(10): A::foo()
#1 /in/L4Hts(14): B->bar()
#2 {main}
thrown in /in/L4Hts on line 5
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.26
Fatal error: Uncaught Error: Using $this when not in object context in /in/L4Hts:5
Stack trace:
#0 /in/L4Hts(10): A::foo()
#1 /in/L4Hts(14): B->bar()
#2 {main}
thrown in /in/L4Hts on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Deprecated: Non-static method A::foo() should not be called statically in /in/L4Hts on line 10
Notice: Undefined variable: this in /in/L4Hts on line 5
string(1) "A"
Output for 5.6.0 - 5.6.28
Deprecated: Non-static method A::foo() should not be called statically, assuming $this from incompatible context in /in/L4Hts on line 10
string(1) "B"
Strict Standards: Non-static method A::foo() should not be called statically, assuming $this from incompatible context in /in/L4Hts on line 10
string(1) "B"