3v4l.org

run code in 300+ PHP versions simultaneously
<?php function registerCallback(callable $method) { // do something with $method var_dump($method); } class A { public function __construct() { registerCallback([$this, "cb"]); } public function cb() { // do somethin upon being invoked } } new A();

preferences:
48.49 ms | 402 KiB | 5 Q