3v4l.org

run code in 500+ PHP versions simultaneously
<?php use Foo\Bar\String as MyString; function test(MyString $string) { var_dump($string); } test('Foo');
Output for 8.2.7 - 8.2.36, 8.3.0 - 8.3.5, 7.4.9 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.20
Fatal error: Cannot use 'Foo\Bar\String' as class name as it is reserved in /in/QM5mP on line 5
Process exited with code 255.
Output for 8.2.0 - 8.2.6
Fatal error: Cannot alias 'Foo\Bar\String' as it is a built-in type in /in/QM5mP on line 3
Process exited with code 255.

preferences:
14.46 ms | 1169 KiB | 5 Q