3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { function bar() { $method = 'quux'; $this->$method(); } function quux() { echo "this is dynamic dispatch"; } } $foo = new foo; $foo->bar();
Output for 4.3.0 - 7.2.0
this is dynamic dispatch