<?php
$number = 1234.56;
// let's print the international format for the en_US locale
setlocale(LC_MONETARY, 'en_US');
echo money_format('%i', $number) . "\n";
// USD 1,234.56
Fatal error: Uncaught Error: Call to undefined function money_format() in /in/mfS3N:7
Stack trace:
#0 {main}
thrown in /in/mfS3N on line 7
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: Uncaught Error: Call to undefined function money_format() in /in/mfS3N:7
Stack trace:
#0 {main}
thrown in /in/mfS3N on line 7
Process exited with code 255.
Output for 7.4.3 - 7.4.33
Deprecated: Function money_format() is deprecated in /in/mfS3N on line 7
USD 1,234.56
Output for 7.4.0
Deprecated: Function money_format() is deprecated in /in/mfS3N on line 7
1234.56