3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $c; public function __construct(callable $c) { $this->c = $c; } public function doCb() { ($this->c)(); } private static function bar() { var_dump(__METHOD__); } } $f = new Foo('Foo::bar'); // fine $f->doCb(); // not fine ($f->c)();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
151.03 ms | 2067 KiB | 9 Q