3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Base{ function checkMethod(){ var_dump(method_exists($this, 'foo')); } } class Child extends Base{ function foo() { } } $base = new base(); $base->checkMethod(); $child = new Child(); $child->checkMethod();
Output for 4.3.0 - 5.6.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.9
bool(false) bool(true)