3v4l.org

run code in 500+ PHP versions simultaneously
<?php $formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL_ALWAYS_SHOWN); var_dump($formatter->format(1234)); // I'd expect the result to be 1234.00 since format() is for numbers, but // it's $1234.00 in all 8.2 - 8.3 versions
Output for 8.5.1 - 8.5.12
Fatal error: Uncaught Error: Class "NumberFormatter" not found in /in/RiejZ:3 Stack trace: #0 {main} thrown in /in/RiejZ on line 3
Process exited with code 255.
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.35, 8.3.0 - 8.3.36, 8.4.1 - 8.4.27, 8.5.0
string(9) "$1,234.00"

preferences:
33.78 ms | 1510 KiB | 10 Q