3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(ini_parse_quantity('0x0x12')); var_dump(ini_parse_quantity('0b+10')); var_dump(ini_parse_quantity('0o+10')); var_dump(ini_parse_quantity('0x+10')); var_dump(ini_parse_quantity('0b 10')); var_dump(ini_parse_quantity('0o 10')); var_dump(ini_parse_quantity('0x 10'));
Output for 8.2.11 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.4.16, 8.5.0 - 8.5.1
Warning: Invalid quantity "0x0x12": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 3 int(0) Warning: Invalid quantity "0b+10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 5 int(0) Warning: Invalid quantity "0o+10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 6 int(0) Warning: Invalid quantity "0x+10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 7 int(0) Warning: Invalid quantity "0b 10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 9 int(0) Warning: Invalid quantity "0o 10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 10 int(0) Warning: Invalid quantity "0x 10": no digits after base prefix, interpreting as "0" for backwards compatibility in /in/ON6U1 on line 11 int(0)
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 8.2.4 - 8.2.10
int(18) int(2) int(8) int(16) int(2) int(8) int(16)
Output for 8.1.7 - 8.1.33
Fatal error: Uncaught Error: Call to undefined function ini_parse_quantity() in /in/ON6U1:3 Stack trace: #0 {main} thrown in /in/ON6U1 on line 3
Process exited with code 255.

preferences:
121.83 ms | 411 KiB | 5 Q