3v4l.org

run code in 500+ PHP versions simultaneously
<?php $numberFormatter = new NumberFormatter('en', NumberFormatter::DECIMAL); $numberFormatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFUP); $numberFormatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 0); $numberFormatter->setAttribute(NumberFormatter::GROUPING_USED, 0); var_dump($numberFormatter->format(null));
Output for 8.5.0 - 8.5.10
Fatal error: Uncaught Error: Class "NumberFormatter" not found in /in/adEpq:3 Stack trace: #0 {main} thrown in /in/adEpq on line 3
Process exited with code 255.
Output for 8.2.31 - 8.2.33, 8.3.0 - 8.3.33, 8.4.1 - 8.4.25
Deprecated: NumberFormatter::format(): Passing null to parameter #1 ($num) of type int|float is deprecated in /in/adEpq on line 7 string(1) "0"

preferences:
46.47 ms | 796 KiB | 4 Q