3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function bla(callable $c) { echo json_encode([$c, $c()]); } bla(function($a) { echo "hi"; }); class d { function r() { echo "hello"; } } $e = new d(); bla([$e, 'r']);