3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bit = 5.99999999999999; echo("1 << 6 = "); echo(1 << 6); echo("\n"); echo("\$bit = "); echo($bit); echo("\n"); echo("1 << \$bit = "); echo(1 << $bit); echo("\n"); echo("gettype(6) = "); echo gettype(6); echo("\n"); echo("gettype(log(64,2)) = "); echo gettype(log(64,2)); echo("\n"); echo("1 << round(\$bit) = "); echo(1 << round($bit));
Output for git.master, git.master_jit, rfc.property-hooks
1 << 6 = 64 $bit = 6 1 << $bit = Deprecated: Implicit conversion from float 5.99999999999999 to int loses precision in /in/VRp01 on line 6 32 gettype(6) = integer gettype(log(64,2)) = double 1 << round($bit) = 64

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:
64.39 ms | 401 KiB | 8 Q