3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo PHP_INT_SIZE . "\n\n"; $json = '1'; $jsons = array( '1', '2147483647', # 32bit max INT '9223372036854775807', # 64bit max INT '99999999999999999999', # something more than 64 bits ); echo "As INT\n------\n"; foreach ($jsons as $json) { var_dump(json_decode($json, FALSE, 512)); } echo "\n"; echo "As STRING\n---------\n"; foreach ($jsons as $json) { var_dump(json_decode($json, FALSE, 512, JSON_BIGINT_AS_STRING)); }
Output for git.master, git.master_jit, rfc.property-hooks
8 As INT ------ int(1) int(2147483647) int(9223372036854775807) float(1.0E+20) As STRING --------- int(1) int(2147483647) int(9223372036854775807) string(20) "99999999999999999999"

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:
53.02 ms | 402 KiB | 8 Q