3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($a, $b = '', $c = '') { echo $a . '&' . $b . '&' . $c; } foo(c: "bar", a: "hello");
Output for 8.1.23 - 8.1.31, 8.2.10 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
hello&&bar
Output for 7.3.0 - 7.3.25, 7.4.0 - 7.4.13
Parse error: syntax error, unexpected ':', expecting ')' in /in/lHSp1 on line 7
Process exited with code 255.
Output for 7.2.0 - 7.2.34
Parse error: syntax error, unexpected ':', expecting ',' or ')' in /in/lHSp1 on line 7
Process exited with code 255.

preferences:
52.78 ms | 408 KiB | 5 Q