3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar() { echo "da blyaaa\n"; } $bar = function() { echo "voobshe ohuet\n"; }; class Foo { public const bar = 'bar'; public static string $bar = 'bar'; public function bar(): string { return 'bar'; } } $foo = new Foo; echo "1) This is {Foo::$bar}\n"; echo "2) This is {$foo::$bar()}\n"; echo "3) This is {Foo::bar}\n"; echo "4) This is {Foo->bar()}\n"; echo "5) This is {$foo->bar()}\n"; echo "6) This is ${Foo::bar}\n"; echo "7) This is ${Foo::$bar}\n"; echo "8) This is {$foo::bar()}\n";
Output for git.master
/bin/php-git-master: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-git-master) /bin/php-git-master: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-git-master)
Process exited with code 1.
Output for git.master_jit, rfc.property-hooks
Deprecated: Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead in /in/QBVVf on line 27 Deprecated: Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead in /in/QBVVf on line 28 Fatal error: Uncaught Error: Object of class Closure could not be converted to string in /in/QBVVf:22 Stack trace: #0 {main} thrown in /in/QBVVf on line 22
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:
27.54 ms | 407 KiB | 5 Q