3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hexadecimal', \PHP_EOL; try { var_dump(gmp_init('0X')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0x')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0X', 16)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0x', 16)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } echo 'Binary', \PHP_EOL; try { var_dump(gmp_init('0B')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0b')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0B', 2)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0b', 2)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } echo "Done\n";
Output for git.master, git.master_jit, rfc.property-hooks
Hexadecimal Fatal error: Uncaught ValueError: gmp_init(): Argument #1 ($num) is not an integer string in /in/ArU7r:4 Stack trace: #0 /in/ArU7r(4): gmp_init('0X') #1 {main} thrown in /in/ArU7r on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.74 ms | 401 KiB | 8 Q