3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo (new \NumberFormatter('@numbers=roman', \NumberFormatter::DECIMAL))->format(1);
Output for 8.5.0 - 8.5.3
Fatal error: Uncaught Error: Class "NumberFormatter" not found in /in/K0VYW:3 Stack trace: #0 {main} thrown in /in/K0VYW on line 3
Process exited with code 255.
Output for 8.4.1 - 8.4.18
Fatal error: Uncaught ValueError: NumberFormatter::__construct(): Argument #1 ($locale) "@numbers=roman" is invalid in /in/K0VYW:3 Stack trace: #0 /in/K0VYW(3): NumberFormatter->__construct('@numbers=roman', 1) #1 {main} thrown in /in/K0VYW on line 3
Process exited with code 255.
Output for 8.2.0 - 8.2.30, 8.3.0 - 8.3.30
I

preferences:
48.69 ms | 835 KiB | 4 Q