3v4l.org

run code in 200+ PHP versions simultaneously
<?php $fmt = numfmt_create('en_US', NumberFormatter::TYPE_CURRENCY ); echo numfmt_format_currency($fmt, 32.00, "USD")."\n"; $fmt = new NumberFormatter( 'en_US', NumberFormatter::CURRENCY ); echo $fmt->formatCurrency(32.00, "USD")."\n";
based on WB9eT
Output for 5.5.0 - 7.4.0
3.2E1 $32.00
Output for 5.0.0 - 5.4.45
Fatal error: Call to undefined function numfmt_create() in /in/QgS7U on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/QgS7U on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/QgS7U on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/QgS7U on line 3
Process exited with code 255.