3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 1744830464 - valid result [C#] // 6039797760 - wrong result [PHP] $bt = 1; $value = 3019898880; $value = gmp_shiftl($value, $bt);//$value << $bt; echo $value; function gmp_shiftl($x,$n) { // shift left return(gmp_mul($x,gmp_pow(2,$n))); } function gmp_shiftr($x,$n) { // shift right return(gmp_div($x,gmp_pow(2,$n))); }
Output for git.master_jit, git.master, rfc.property-hooks
6039797760

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:
168.26 ms | 405 KiB | 5 Q