3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public string $message = "yo"; function foo(callable $fn): void { $fn(); } function a() { $this->foo(function () { echo $this->message; }); } function b() { $this->foo(static function () { echo $this->message; }); } }

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
55.22 ms | 727 KiB | 4 Q