3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { use function foo; function foo(string $str) : int { return foo($str) + 1; } } namespace { function foo(string $str) : int { return strlen($str) * 5; } } namespace Foo { var_dump(foo("abc")); }
Output for rfc.property-hooks, git.master, git.master_jit
Fatal error: Cannot declare function Foo\foo because the name is already in use in /in/G4ZWp on line 4
Process exited with code 255.

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:
47.75 ms | 2678 KiB | 4 Q