3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { function asd(){ echo "1"; } static function asd() { echo "1"; } } var_dump(A::asd()); var_dump((new A())->asd());
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Fatal error: Cannot redeclare A::asd() in /in/LkrfP on line 8
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Redeclared method A::asd in /in/LkrfP:4 Stack trace: #0 {main}
Process exited with code 255.