3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function B() {echo __METHOD__;} } $a = new A(); $a->B();
based on U3CgC
Output for 5.0.0 - 7.1.0
A::B
Output for 4.3.0 - 4.4.9
Notice: Use of undefined constant __METHOD__ - assumed '__METHOD__' in /in/YSMuJ on line 5 __METHOD__