3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(`locale -a`); var_dump(`nlsinfo`); var_dump(`ls /usr/lib/nls/loc`); var_dump(`ls /usr/lib/locale`); var_dump(`ls /usr/lib/nls`); var_dump(`ls /usr/share/locale`); var_dump(setlocale(LC_MONETARY, 'de_DE')); var_dump(money_format('%=*^-14#8.2i', 234568)); // outputs "**234568.00" var_dump(setlocale(LC_MONETARY, 'de_ZA')); var_dump(money_format('%=*^-14#8.2i', 2334)); // outputs "****2334.00"
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: shell_exec(): Unable to execute 'locale -a' in /in/JMpnE on line 3 bool(false) Warning: shell_exec(): Unable to execute 'nlsinfo' in /in/JMpnE on line 4 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls/loc' in /in/JMpnE on line 5 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/locale' in /in/JMpnE on line 6 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls' in /in/JMpnE on line 7 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/share/locale' in /in/JMpnE on line 8 bool(false) string(5) "de_DE" Fatal error: Uncaught Error: Call to undefined function money_format() in /in/JMpnE:12 Stack trace: #0 {main} thrown in /in/JMpnE on line 12
Process exited with code 255.
Output for 7.4.3 - 7.4.33
Warning: shell_exec(): Unable to execute 'locale -a' in /in/JMpnE on line 3 bool(false) Warning: shell_exec(): Unable to execute 'nlsinfo' in /in/JMpnE on line 4 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls/loc' in /in/JMpnE on line 5 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/locale' in /in/JMpnE on line 6 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls' in /in/JMpnE on line 7 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/share/locale' in /in/JMpnE on line 8 bool(false) string(5) "de_DE" Deprecated: Function money_format() is deprecated in /in/JMpnE on line 12 string(16) " **234568,00 EUR" bool(false) Deprecated: Function money_format() is deprecated in /in/JMpnE on line 16 string(16) " ****2334,00 EUR"
Output for 7.4.0
NULL NULL NULL NULL NULL NULL bool(false) Deprecated: Function money_format() is deprecated in /in/JMpnE on line 12 string(14) " **234568.00 " bool(false) Deprecated: Function money_format() is deprecated in /in/JMpnE on line 16 string(14) " ****2334.00 "
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33
Warning: shell_exec(): Unable to execute 'locale -a' in /in/JMpnE on line 3 bool(false) Warning: shell_exec(): Unable to execute 'nlsinfo' in /in/JMpnE on line 4 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls/loc' in /in/JMpnE on line 5 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/locale' in /in/JMpnE on line 6 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/lib/nls' in /in/JMpnE on line 7 bool(false) Warning: shell_exec(): Unable to execute 'ls /usr/share/locale' in /in/JMpnE on line 8 bool(false) string(5) "de_DE" string(16) " **234568,00 EUR" bool(false) string(16) " ****2334,00 EUR"
Output for 5.4.39 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0, 7.3.12
NULL NULL NULL NULL NULL NULL bool(false) string(14) " **234568.00 " bool(false) string(14) " ****2334.00 "
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.38
string(8) "C POSIX " NULL NULL NULL NULL NULL bool(false) string(14) " **234568.00 " bool(false) string(14) " ****2334.00 " sh: 1: nlsinfo: not found sh: 1: ls: not found sh: 1: ls: not found sh: 1: ls: not found sh: 1: ls: not found
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/JMpnE on line 17
Process exited with code 255.
Output for 4.3.1 - 4.3.11, 4.4.0 - 4.4.9
string(8) "C POSIX " string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" bool(false) string(14) " **234568.00 " bool(false) string(14) " ****2334.00 " sh: 1: nlsinfo: not found sh: 1: ls: not found sh: 1: ls: not found sh: 1: ls: not found sh: 1: ls: not found
Output for 4.3.0
string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" string(0) "" bool(false) string(14) " **234568.00 " bool(false) string(14) " ****2334.00 "

preferences:
213.43 ms | 401 KiB | 307 Q