3v4l.org

run code in 200+ PHP versions simultaneously
<?php function foo(string|float $teste): ?array { return array(); } function bar(): ?array { return null; } foo('3'); bar();
based on YiD0p
Output for 7.2.0 - 7.4.4
Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /in/4iMWM on line 3
Process exited with code 255.