3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (range(0, 63) as $i) { $n = pow(2, $i); echo $n.' = '.decbin($n).PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
1 = 1 2 = 10 4 = 100 8 = 1000 16 = 10000 32 = 100000 64 = 1000000 128 = 10000000 256 = 100000000 512 = 1000000000 1024 = 10000000000 2048 = 100000000000 4096 = 1000000000000 8192 = 10000000000000 16384 = 100000000000000 32768 = 1000000000000000 65536 = 10000000000000000 131072 = 100000000000000000 262144 = 1000000000000000000 524288 = 10000000000000000000 1048576 = 100000000000000000000 2097152 = 1000000000000000000000 4194304 = 10000000000000000000000 8388608 = 100000000000000000000000 16777216 = 1000000000000000000000000 33554432 = 10000000000000000000000000 67108864 = 100000000000000000000000000 134217728 = 1000000000000000000000000000 268435456 = 10000000000000000000000000000 536870912 = 100000000000000000000000000000 1073741824 = 1000000000000000000000000000000 2147483648 = 10000000000000000000000000000000 4294967296 = 100000000000000000000000000000000 8589934592 = 1000000000000000000000000000000000 17179869184 = 10000000000000000000000000000000000 34359738368 = 100000000000000000000000000000000000 68719476736 = 1000000000000000000000000000000000000 137438953472 = 10000000000000000000000000000000000000 274877906944 = 100000000000000000000000000000000000000 549755813888 = 1000000000000000000000000000000000000000 1099511627776 = 10000000000000000000000000000000000000000 2199023255552 = 100000000000000000000000000000000000000000 4398046511104 = 1000000000000000000000000000000000000000000 8796093022208 = 10000000000000000000000000000000000000000000 17592186044416 = 100000000000000000000000000000000000000000000 35184372088832 = 1000000000000000000000000000000000000000000000 70368744177664 = 10000000000000000000000000000000000000000000000 140737488355328 = 100000000000000000000000000000000000000000000000 281474976710656 = 1000000000000000000000000000000000000000000000000 562949953421312 = 10000000000000000000000000000000000000000000000000 1125899906842624 = 100000000000000000000000000000000000000000000000000 2251799813685248 = 1000000000000000000000000000000000000000000000000000 4503599627370496 = 10000000000000000000000000000000000000000000000000000 9007199254740992 = 100000000000000000000000000000000000000000000000000000 18014398509481984 = 1000000000000000000000000000000000000000000000000000000 36028797018963968 = 10000000000000000000000000000000000000000000000000000000 72057594037927936 = 100000000000000000000000000000000000000000000000000000000 144115188075855872 = 1000000000000000000000000000000000000000000000000000000000 288230376151711744 = 10000000000000000000000000000000000000000000000000000000000 576460752303423488 = 100000000000000000000000000000000000000000000000000000000000 1152921504606846976 = 1000000000000000000000000000000000000000000000000000000000000 2305843009213693952 = 10000000000000000000000000000000000000000000000000000000000000 4611686018427387904 = 100000000000000000000000000000000000000000000000000000000000000 Fatal error: Uncaught TypeError: decbin(): Argument #1 ($num) must be of type int, float given in /in/4HNsU:4 Stack trace: #0 /in/4HNsU(4): decbin(9.2233720368548E+18) #1 {main} thrown in /in/4HNsU 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:
126.86 ms | 413 KiB | 5 Q