3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X { function foo() {} function __getx($n) {} } X::foo(); X::__getx();
based on ThlYJ
Output for 7.1.0 - 7.3.0rc3
Deprecated: Non-static method X::foo() should not be called statically in /in/i9kcu on line 8 Deprecated: Non-static method X::__getx() should not be called statically in /in/i9kcu on line 9 Fatal error: Uncaught ArgumentCountError: Too few arguments to function X::__getx(), 0 passed in /in/i9kcu on line 9 and exactly 1 expected in /in/i9kcu:5 Stack trace: #0 /in/i9kcu(9): X::__getx() #1 {main} thrown in /in/i9kcu on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Deprecated: Non-static method X::foo() should not be called statically in /in/i9kcu on line 8 Deprecated: Non-static method X::__getx() should not be called statically in /in/i9kcu on line 9 Warning: Missing argument 1 for X::__getx(), called in /in/i9kcu on line 9 and defined in /in/i9kcu on line 5
Output for 5.6.0 - 5.6.24
Strict Standards: Non-static method X::foo() should not be called statically in /in/i9kcu on line 8 Strict Standards: Non-static method X::__getx() should not be called statically in /in/i9kcu on line 9 Warning: Missing argument 1 for X::__getx(), called in /in/i9kcu on line 9 and defined in /in/i9kcu on line 5