3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = new class { public function bar(int $a) { print $a . PHP_EOL; } }; $res = $f?->bar(5); $c = $f?->bar(?); $c(4); $g = null; $d = $g?->bar(?); $d?->__invoke(3);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch master
Parse error: syntax error, unexpected token "?" in /in/ERRdY on line 9
Process exited with code 255.
Output for branch master_jit
Parse error: syntax error, unexpected token "?" in /in/ERRdY on line 9
Process exited with code 255.
Output for branch partials
5 4
Output for branch literals
Parse error: syntax error, unexpected token "?" in /in/ERRdY on line 9
Process exited with code 255.
Output for branch enumerations
Parse error: syntax error, unexpected token "?" in /in/ERRdY on line 9
Process exited with code 255.

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