3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $locale = array( 'decimal_point' => '.', 'thousands_sep' => '', 'int_curr_symbol' => 'EUR', 'currency_symbol' => '€', 'mon_decimal_point' => ',', 'mon_thousands_sep' => '.', 'positive_sign' => '', 'negative_sign' => '-', 'int_frac_digits' => 2, 'frac_digits' => 2, 'p_cs_precedes' => 0, 'p_sep_by_space' => 1, 'p_sign_posn' => 1, 'n_sign_posn' => 1, 'grouping' => array(), 'mon_grouping' => array(0 => 3, 1 => 3) ); setlocale($locale, "es_ES.UTF-8"); echo money_format('%=*^-14#8.2i', 1234.56) . "\n";
based on 2usgd
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: setlocale() expects parameter 1 to be integer, array given in /in/W7O56 on line 21 ****1234.56
Output for 5.3.0 - 5.6.28
Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in /in/W7O56 on line 21 Notice: Array to string conversion in /in/W7O56 on line 21 Warning: setlocale(): Invalid locale category name Array, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in /in/W7O56 on line 21 ****1234.56
Output for 5.2.5 - 5.2.17
Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in /in/W7O56 on line 21 Notice: Array to string conversion in /in/W7O56 on line 21 Warning: setlocale(): Invalid locale category name Array, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in /in/W7O56 on line 21 ****1234.56
Output for 4.3.2 - 5.2.4
Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /in/W7O56 on line 21 Notice: Array to string conversion in /in/W7O56 on line 21 Warning: setlocale(): Invalid locale category name Array, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME. in /in/W7O56 on line 21 ****1234.56
Output for 4.3.0 - 4.3.1
Warning: setlocale() [http://www.php.net/function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /in/W7O56 on line 21 Notice: Array to string conversion in /in/W7O56 on line 21 Warning: setlocale() [http://www.php.net/function.setlocale]: Invalid locale category name Array, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME. in /in/W7O56 on line 21 ****1234.56