3v4l.org

run code in 300+ PHP versions simultaneously
<?php $integer = 0b100101; $binary = decbin($integer); $binaries = str_split($binary, 1); $binaries = array_reverse($binaries); for ($index = 0; $index < count($binaries); $index++) { $current = &$binaries[$index]; $current = str_pad("", ((count($binaries) - 1) - $index), "0") . $current . str_pad("", $index, "0"); $current = bindec($current); if (empty($current)) { //unset($binaries[$index]); } } $binaries = array_values($binaries); var_dump($binaries);

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)
8.3.60.0130.00916.50
8.3.50.0110.00318.01
8.3.40.0040.01118.60
8.3.30.0060.00918.64
8.3.20.0000.00721.77
8.3.10.0040.00421.81
8.3.00.0080.00019.68
8.2.180.0040.01118.29
8.2.170.0110.01122.96
8.2.160.0100.00322.08
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00421.05
8.2.110.0060.00319.38
8.2.100.0070.00417.72
8.2.90.0040.00417.97
8.2.80.0000.00817.97
8.2.70.0030.00617.80
8.2.60.0040.00418.03
8.2.50.0040.00418.16
8.2.40.0080.00020.47
8.2.30.0070.00319.41
8.2.20.0000.00818.03
8.2.10.0000.00718.09
8.2.00.0080.00018.02
8.1.280.0140.00025.92
8.1.270.0060.00323.97
8.1.260.0080.00026.35
8.1.250.0020.00528.09
8.1.240.0060.00322.55
8.1.230.0040.00722.82
8.1.220.0060.00317.78
8.1.210.0000.00818.84
8.1.200.0040.00417.22
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0080.00018.64
8.1.160.0000.00818.81
8.1.150.0030.00519.06
8.1.140.0020.00517.64
8.1.130.0000.00818.91
8.1.120.0070.00017.41
8.1.110.0000.00717.44
8.1.100.0070.00017.48
8.1.90.0070.00317.38
8.1.80.0040.00417.41
8.1.70.0030.00317.46
8.1.60.0040.00417.61
8.1.50.0000.00817.52
8.1.40.0030.00517.39
8.1.30.0040.00417.64
8.1.20.0040.00417.55
8.1.10.0030.00617.43
8.1.00.0040.00417.38
8.0.300.0040.00420.04
8.0.290.0090.00016.75
8.0.280.0000.00718.31
8.0.270.0070.00017.21
8.0.260.0070.00018.96
8.0.250.0000.00716.94
8.0.240.0060.00316.95
8.0.230.0030.00316.94
8.0.220.0080.00016.84
8.0.210.0000.00816.82
8.0.200.0000.00716.93
8.0.190.0040.00416.84
8.0.180.0040.00416.92
8.0.170.0070.00316.88
8.0.160.0080.00416.89
8.0.150.0040.00416.71
8.0.140.0000.00716.82
8.0.130.0030.00313.31
8.0.120.0080.00016.90
8.0.110.0050.00316.94
8.0.100.0040.00416.86
8.0.90.0040.00416.95
8.0.80.0220.00016.91
8.0.70.0040.00416.70
8.0.60.0020.00516.93
8.0.50.0040.00416.93
8.0.30.0080.01117.22
8.0.20.0130.00617.40
8.0.10.0000.00716.87
8.0.00.0050.01416.68
7.4.330.0050.00015.55
7.4.320.0000.00616.43
7.4.300.0000.00716.64
7.4.290.0070.00016.48
7.4.280.0050.00516.48
7.4.270.0050.00316.57
7.4.260.0070.00016.52
7.4.250.0030.00316.57
7.4.240.0080.00016.43
7.4.230.0000.00816.52
7.4.220.0080.00016.33
7.4.210.0070.00916.56
7.4.200.0000.00716.39
7.4.160.0070.01016.68
7.4.140.0080.01017.86
7.4.130.0090.00916.59
7.4.120.0090.01016.52
7.4.110.0070.01016.65
7.4.100.0070.01016.60
7.4.90.0110.00616.38
7.4.80.0120.01419.39
7.4.70.0080.00816.63
7.4.60.0130.00316.39
7.4.50.0030.00916.61
7.4.40.0090.01216.65
7.4.00.0080.00415.04
7.3.330.0000.00513.16
7.3.320.0060.00013.17
7.3.310.0030.00316.37
7.3.300.0000.00716.36
7.3.290.0030.00316.18
7.3.280.0060.00816.31
7.3.260.0060.01116.49
7.3.240.0110.00816.44
7.3.230.0060.01216.55
7.3.210.0130.01016.27
7.3.200.0150.00816.51
7.3.190.0120.00416.36
7.3.180.0040.01216.31
7.3.170.0100.00716.60
7.3.160.0110.01116.45
7.3.10.0070.01016.64
7.3.00.0070.00716.75
7.2.330.0100.01316.63
7.2.320.0090.00916.83
7.2.310.0110.01116.76
7.2.300.0130.01016.57
7.2.290.0110.00716.79
7.2.130.0100.00617.00
7.2.120.0040.01117.01
7.2.110.0040.01217.02
7.2.100.0060.00916.85
7.2.90.0060.00916.99
7.2.80.0100.00616.92
7.2.70.0070.01116.64
7.2.60.0060.01016.93
7.2.50.0050.00916.93
7.2.40.0110.01217.27
7.2.30.0170.00917.59
7.2.20.0110.01417.37
7.2.10.0110.01217.33
7.2.00.0130.00917.47
7.1.250.0040.00715.77
7.1.200.0060.00615.72
7.1.160.0340.01016.55
7.1.150.0190.01216.98
7.1.140.0160.01216.83
7.1.130.0160.00916.96
7.1.120.0180.00816.55
7.1.110.0130.01316.35
7.1.100.0170.01316.25
7.1.90.0120.01315.92
7.1.80.0120.01415.87
7.1.70.0130.01315.45
7.1.60.0380.01633.33
7.1.50.0350.01532.71
7.1.40.0390.01432.51
7.1.30.0360.01832.71
7.1.20.0390.01532.64
7.1.10.0150.01314.81
7.1.00.0100.01214.63

preferences:
67.46 ms | 401 KiB | 5 Q