3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0x40; $b = ~$a; // flip bits, i.e. 2s complement so -$a and then minus 1 var_dump("var_dump: $b"); // -65 printf("\nprintf: %d\n\n", $b); var_dump( base_convert($b, 10, 2) ); // 65 // **************************// // should be: printf("\nprintf: %d\n\n", $b); printf("\nprintf:%b\n\n",-65); printf("\nprintf: %d\n\n",1111111111111111111111111111111111111111111111111111111110111111b);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.20.0230.06720.16
7.0.10.0230.06020.09
7.0.00.0100.08320.22
5.6.170.0370.07720.47
5.6.160.0100.07720.50
5.6.150.0170.06718.17
5.6.140.0100.05018.18
5.6.130.0070.05018.23
5.6.120.0130.04321.01
5.6.110.0030.08720.98
5.6.100.0070.08321.13
5.6.90.0100.03321.13
5.6.80.0070.05320.38
5.5.310.0230.05720.36
5.5.300.0030.08718.07
5.5.290.0070.05317.95
5.5.280.0030.04020.77
5.5.270.0100.05720.77
5.5.260.0070.09020.84
5.5.250.0170.07320.57
5.5.240.0030.06020.24

preferences:
133.61 ms | 1394 KiB | 7 Q