3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function showclass() { echo __CLASS__; } } class B extends A { } $a = new A(); $b = new B(); $a->showclass(); $b->showclass(); A::showclass(); B::showclass();
Output for 7.0.0 - 7.1.0
AA Deprecated: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 19 A Deprecated: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 20 A
Output for hhvm-3.10.0 - 3.12.0
AAAA
Output for 5.0.0 - 5.6.28
AA Strict Standards: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 19 A Strict Standards: Non-static method A::showclass() should not be called statically in /in/RYC7M on line 20 A
Output for 4.3.0 - 4.4.9
aaaa