3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locale = 'ja-JP'; $currency = 'JPY'; $formatter = new NumberFormatter($locale."@currency=$currency", NumberFormatter::CURRENCY); $s1 = $formatter->formatCurrency(0, $currency); $s2 = "\u{FFE5}0"; var_dump($s1 == $s2);
Output for 8.5.0
Fatal error: Uncaught Error: Class "NumberFormatter" not found in /in/uti865:4 Stack trace: #0 {main} thrown in /in/uti865 on line 4
Process exited with code 255.
Output for 8.3.5 - 8.3.28, 8.4.9 - 8.4.15
bool(true)

preferences:
59.08 ms | 407 KiB | 5 Q