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";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.1 ms | 2055 KiB | 11 Q