3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[Attribute] readonly class Foo { public function __construct(public Closure $callable) {} } // Allowed #[Foo(static function () {})] class Example {} // Not allowed #[Foo(static fn () => null)] class Example2 {}
Output for git.master_jit
Fatal error: Constant expression contains invalid operations in /in/O0dN8 on line 17 Stack trace: #0 {main}
Process exited with code 255.
Output for git.master

Process exited with code 139.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.82 ms | 496 KiB | 3 Q