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.70.0110.00418.18
8.3.60.0130.00918.43
8.3.50.0170.00017.98
8.3.40.0120.00318.90
8.3.30.0090.00618.63
8.3.20.0060.00321.75
8.3.10.0040.00421.77
8.3.00.0050.00319.68
8.2.180.0100.00718.42
8.2.170.0110.00322.96
8.2.160.0070.00722.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0050.00319.24
8.2.120.0040.00426.35
8.2.110.0050.00519.39
8.2.100.0040.00817.84
8.2.90.0040.00417.91
8.2.80.0090.00018.16
8.2.70.0030.00618.03
8.2.60.0040.00417.92
8.2.50.0000.00818.22
8.2.40.0040.00420.42
8.2.30.0080.00019.49
8.2.20.0050.00318.18
8.2.10.0000.00718.02
8.2.00.0000.00718.17
8.1.280.0120.00325.92
8.1.270.0030.00623.69
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00322.42
8.1.230.0080.00422.77
8.1.220.0040.00417.91
8.1.210.0040.00418.78
8.1.200.0030.00517.36
8.1.190.0080.00017.25
8.1.180.0030.00518.10
8.1.170.0000.00818.59
8.1.160.0000.00818.88
8.1.150.0050.00319.05
8.1.140.0000.00717.69
8.1.130.0040.00419.00
8.1.120.0030.00517.43
8.1.110.0040.00417.52
8.1.100.0040.00417.48
8.1.90.0060.00317.43
8.1.80.0000.00717.45
8.1.70.0050.00317.39
8.1.60.0050.00317.59
8.1.50.0040.00417.36
8.1.40.0000.00817.50
8.1.30.0030.00617.66
8.1.20.0060.00317.70
8.1.10.0050.00317.34
8.1.00.0040.00417.30
8.0.300.0000.00719.86
8.0.290.0030.00616.75
8.0.280.0030.00318.48
8.0.270.0070.00017.16
8.0.260.0000.00718.99
8.0.250.0070.00016.87
8.0.240.0080.00316.97
8.0.230.0030.00316.94
8.0.220.0000.00716.86
8.0.210.0040.00416.86
8.0.200.0040.00416.95
8.0.190.0000.00716.82
8.0.180.0000.00816.96
8.0.170.0100.00016.89
8.0.160.0060.00316.92
8.0.150.0070.00016.91
8.0.140.0030.00316.86
8.0.130.0050.00013.25
8.0.120.0060.00316.88
8.0.110.0000.00716.81
8.0.100.0040.00416.94
8.0.90.0040.00416.77
8.0.80.0110.00816.83
8.0.70.0000.00716.70
8.0.60.0040.00416.77
8.0.50.0070.00016.75
8.0.30.0090.00917.33
8.0.20.0150.00617.40
8.0.10.0040.00416.80
8.0.00.0110.00816.75
7.4.330.0020.00215.55
7.4.320.0060.00016.41
7.4.300.0030.00316.55
7.4.290.0040.00416.52
7.4.280.0030.00616.60
7.4.270.0040.00416.59
7.4.260.0000.00816.34
7.4.250.0000.00716.46
7.4.240.0070.00016.48
7.4.230.0080.00016.67
7.4.220.0050.00316.40
7.4.210.0090.00916.56
7.4.200.0000.00716.34
7.4.160.0140.00616.49
7.4.140.0150.00417.86
7.4.130.0150.00316.54
7.4.120.0120.01016.48
7.4.110.0080.00916.57
7.4.100.0100.00816.49
7.4.90.0080.00816.52
7.4.80.0120.01319.39
7.4.70.0060.01216.46
7.4.60.0090.00916.53
7.4.50.0060.00616.59
7.4.40.0110.01116.54
7.4.10.0090.00914.87
7.4.00.0050.00914.91
7.3.330.0000.00513.15
7.3.320.0060.00013.25
7.3.310.0000.00716.46
7.3.300.0070.00016.34
7.3.290.0000.00716.20
7.3.280.0100.00616.27
7.3.260.0110.00916.33
7.3.240.0080.00816.44
7.3.230.0110.00616.43
7.3.210.0120.00416.50
7.3.200.0040.01316.60
7.3.190.0070.01116.50
7.3.180.0120.00916.34
7.3.170.0170.00016.39
7.3.160.0070.01016.49
7.3.130.0140.00314.84
7.3.120.0090.00614.71
7.3.110.0030.01314.82
7.3.100.0120.00014.99
7.3.90.0070.00714.80
7.3.80.0060.00614.97
7.3.70.0130.00314.48
7.3.60.0030.01014.82
7.3.50.0030.01014.84
7.3.40.0070.00714.54
7.3.30.0150.00314.59
7.3.20.0090.00316.74
7.3.10.0040.00716.46
7.3.00.0070.01116.64
7.2.330.0120.01216.66
7.2.320.0070.01016.58
7.2.310.0180.00716.79
7.2.300.0060.01616.88
7.2.290.0090.00916.45
7.2.260.0100.01014.98
7.2.250.0080.00815.19
7.2.240.0060.00915.33
7.2.230.0070.01014.88
7.2.220.0070.00315.04
7.2.210.0170.00015.14
7.2.200.0060.00614.97
7.2.190.0000.01415.20
7.2.180.0030.01015.22
7.2.170.0040.01115.26
7.2.160.0070.00314.91
7.2.150.0040.01116.72
7.2.140.0080.00416.60
7.2.130.0030.01017.05
7.2.120.0030.00916.75
7.2.110.0060.00316.93
7.2.100.0000.01617.16
7.2.90.0090.00617.08
7.2.80.0060.00917.05
7.2.70.0100.00716.86
7.2.60.0030.01117.05
7.2.50.0040.01016.98
7.2.40.1130.00817.32
7.2.30.1480.01317.43
7.2.20.1300.01117.54
7.2.10.1110.00817.53
7.2.00.1060.01117.46
7.1.330.0070.00715.79
7.1.320.0000.01215.97
7.1.310.0040.01215.64
7.1.300.0040.00815.84
7.1.290.0070.00715.74
7.1.280.0060.01215.88
7.1.270.0050.00515.80
7.1.260.0060.00615.55
7.1.250.0100.00715.78
7.1.240.0030.01015.96
7.1.230.0080.00415.89
7.1.220.0040.01215.71
7.1.210.0070.00716.05
7.1.200.0010.00915.77
7.1.190.0040.00915.56
7.1.180.0000.01515.94
7.1.170.0100.00015.79
7.1.160.1640.01016.33
7.1.150.1820.01116.31
7.1.140.0910.00616.35
7.1.130.1170.00616.31
7.1.120.1570.00916.11
7.1.110.1260.00916.01
7.1.100.1010.01116.02
7.1.90.2180.00815.96
7.1.80.2660.00815.78
7.1.70.2200.00715.63
7.1.60.0820.01024.42
7.1.50.0160.01124.29
7.1.40.0180.01024.18
7.1.30.0220.00924.20
7.1.20.0470.01424.16
7.1.10.0160.01015.15
7.1.00.0070.01115.16
7.0.330.0070.00715.19
7.0.320.0070.00715.45
7.0.310.0030.01015.21
7.0.300.0150.00015.39
7.0.290.0100.00015.41
7.0.280.0060.00915.46
7.0.270.0070.00315.40
7.0.260.0100.00315.51
7.0.250.0070.01015.39
7.0.240.0030.01315.42
7.0.230.0070.01015.21
7.0.220.0060.00615.59
7.0.210.0080.00815.45
7.0.200.0040.00715.45
7.0.190.0040.00815.33
7.0.180.0080.00415.59
7.0.170.0130.00315.43
7.0.160.0040.00715.55
7.0.150.0030.00815.46
7.0.140.0060.00915.59
7.0.130.0090.00315.37
7.0.120.0100.00715.70
7.0.110.0060.00315.57
7.0.100.0060.00615.45
7.0.90.0030.01315.32
7.0.80.0090.00615.54
7.0.70.0030.01015.43
7.0.60.0060.00315.38
7.0.50.0040.00715.54
7.0.40.0000.01513.35
7.0.30.0030.01013.23
7.0.20.0040.01213.50
7.0.10.0070.00713.52
7.0.00.0060.00613.40
5.6.400.0090.00614.65
5.6.390.0080.00314.57
5.6.380.0060.00614.23
5.6.370.0090.00014.61
5.6.360.0040.01214.32
5.6.350.0040.01214.64
5.6.340.0110.00314.78
5.6.330.0060.00914.80
5.6.320.0070.00414.29
5.6.310.0070.00714.77
5.6.300.0030.01214.61
5.6.290.0070.00714.34
5.6.280.0050.00514.52
5.6.270.0070.00714.54
5.6.260.0060.00614.69
5.6.250.0030.01014.18
5.6.240.0030.01314.57
5.6.230.0060.00914.27
5.6.220.0100.00314.53
5.6.210.0090.00014.49
5.6.200.0030.01014.46
5.6.190.0000.01414.50
5.6.180.0030.00914.23
5.6.170.0040.00714.52
5.6.160.0090.00414.39
5.6.150.0030.00714.48
5.6.140.0000.01114.35
5.6.130.0000.01314.45
5.6.120.0080.00814.65
5.6.110.0060.00614.54
5.6.100.0070.01014.36
5.6.90.0070.01014.30
5.6.80.0060.01214.46
5.6.70.0080.01114.29
5.6.60.0000.01414.64
5.6.50.0070.01114.38
5.6.40.0040.00814.41
5.6.30.0070.00314.58
5.6.20.0070.00714.52
5.6.10.0090.00614.32
5.6.00.0100.00314.18

preferences:
68.91 ms | 400 KiB | 5 Q