3v4l.org

run code in 300+ PHP versions simultaneously
<?php // convert decimal to base 2 without using base_convert $base = 2; $num = 23; while( $num > 0) { $arr[] = $num % $base; // store remainder in array $num = floor($num/$base); // no integer division } var_dump($arr); $wrong = join('',$arr); var_dump($wrong); $cat = join('',array_reverse($arr)); var_dump($cat);

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.40.0090.00618.97
8.3.30.0110.00419.23
8.3.20.0040.00420.41
8.3.10.0030.00522.05
8.3.00.0040.00422.57
8.2.170.0150.00022.96
8.2.160.0090.00620.89
8.2.150.0070.00724.18
8.2.140.0090.00024.66
8.2.130.0130.00026.16
8.2.120.0080.00019.38
8.2.110.0080.00022.14
8.2.100.0080.00419.16
8.2.90.0040.00419.22
8.2.80.0050.00318.05
8.2.70.0060.00317.75
8.2.60.0000.00818.16
8.2.50.0050.00518.07
8.2.40.0000.00918.34
8.2.30.0040.00418.18
8.2.20.0000.00717.86
8.2.10.0050.00317.70
8.2.00.0040.00417.73
8.1.270.0080.00022.18
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0060.00323.83
8.1.230.0080.00419.22
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0080.00317.23
8.1.190.0000.00717.64
8.1.180.0000.00818.77
8.1.170.0000.00918.65
8.1.160.0030.00622.02
8.1.150.0050.00318.59
8.1.140.0080.00017.45
8.1.130.0040.00417.80
8.1.120.0100.00517.42
8.1.110.0000.00817.48
8.1.100.0080.00017.51
8.1.90.0050.00317.38
8.1.80.0070.00017.38
8.1.70.0030.00317.48
8.1.60.0060.00317.48
8.1.50.0000.00817.55
8.1.40.0040.00417.41
8.1.30.0040.00417.65
8.1.20.0030.00517.54
8.1.10.0000.00817.61
8.1.00.0040.00417.54
8.0.300.0040.00418.77
8.0.290.0000.00817.05
8.0.280.0030.00318.42
8.0.270.0040.00417.28
8.0.260.0030.00716.86
8.0.250.0030.00316.95
8.0.240.0050.00317.06
8.0.230.0030.00617.07
8.0.220.0030.00316.92
8.0.210.0030.00316.90
8.0.200.0030.00317.01
8.0.190.0000.00917.04
8.0.180.0050.00216.97
8.0.170.0040.00416.99
8.0.160.0000.00717.00
8.0.150.0000.00816.93
8.0.140.0070.00016.79
8.0.130.0000.00613.40
8.0.120.0080.00016.77
8.0.110.0030.00316.94
8.0.100.0000.00716.82
8.0.90.0000.00716.93
8.0.80.0080.01116.91
8.0.70.0000.00716.84
8.0.60.0030.00416.82
8.0.50.0000.00716.87
8.0.30.0140.00517.10
8.0.20.0030.01517.40
8.0.10.0000.00816.97
8.0.00.0120.01016.69
7.4.330.0060.00015.00
7.4.320.0060.00016.51
7.4.300.0030.00316.53
7.4.290.0070.00016.52
7.4.280.0030.00316.60
7.4.270.0000.00716.45
7.4.260.0050.00616.62
7.4.250.0040.00416.44
7.4.240.0020.00516.51
7.4.230.0000.00716.54
7.4.220.0030.01416.48
7.4.210.0100.00516.54
7.4.200.0070.00016.73
7.4.190.0050.00216.39
7.4.160.0060.00916.60
7.4.150.0120.00617.40
7.4.140.0130.00817.86
7.4.130.0100.01016.64
7.4.120.0110.00616.66
7.4.110.0110.01116.64
7.4.100.0070.01016.61
7.4.90.0030.01316.59
7.4.80.0090.01019.39
7.4.70.0200.00316.48
7.4.60.0130.00316.64
7.4.50.0050.00316.53
7.4.40.0120.00622.77
7.4.30.0150.00316.55
7.4.00.0050.00514.65
7.3.330.0050.00013.15
7.3.320.0000.00513.11
7.3.310.0040.00416.25
7.3.300.0040.00416.34
7.3.290.0060.00916.45
7.3.280.0060.01016.42
7.3.270.0030.01317.40
7.3.260.0110.00716.37
7.3.250.0130.00616.49
7.3.240.0070.01016.35
7.3.230.0100.01016.39
7.3.210.0120.00616.24
7.3.200.0110.00519.39
7.3.190.0170.00416.45
7.3.180.0110.00516.36
7.3.170.0060.00916.34
7.3.160.0110.00616.72
7.3.120.0030.00914.59
7.2.330.0150.00916.84
7.2.320.0140.00316.73
7.2.310.0100.00716.75
7.2.300.0140.00616.56
7.2.290.0080.01316.77
7.2.00.0090.00019.51
7.1.100.0090.00317.87
7.1.70.0040.00417.27
7.1.60.0000.02319.82
7.1.50.0120.00917.04
7.1.00.0030.07722.30
7.0.200.0090.00616.69
7.0.140.0070.06721.97
7.0.60.0030.06720.03
7.0.50.0070.08017.87
7.0.40.0000.05720.12
7.0.30.0300.06020.12
7.0.20.0170.07320.09
7.0.10.0230.06320.16
7.0.00.0170.07320.05
5.6.210.0130.05320.44
5.6.200.0100.03718.21
5.6.190.0100.07020.38
5.6.180.3970.04020.27
5.6.170.0300.07020.62
5.6.160.0030.08020.47
5.6.150.0030.07318.12
5.6.140.0000.07718.16
5.6.130.0030.09018.17
5.6.120.0100.03321.03
5.6.110.0070.07320.85
5.6.100.0100.06320.96
5.6.90.0130.08320.95
5.6.80.0170.07020.38
5.6.70.0370.06320.42
5.5.350.0070.06020.42
5.5.340.0000.05017.88
5.5.330.0130.07320.36
5.5.320.0230.03720.34
5.5.310.0200.05320.51
5.5.300.0100.07717.92
5.5.290.0000.08718.00
5.5.280.0100.07320.86
5.5.270.0130.03320.75
5.5.260.0070.04320.79
5.5.250.0030.08320.61
5.5.240.0100.07320.18
5.4.450.0430.06019.27
5.4.440.0430.06019.63
5.4.430.0530.04719.54
5.4.420.0570.06019.47
5.4.410.0470.05019.01
5.4.400.1700.00018.74
5.4.390.0700.00018.77
5.4.380.0500.05718.74
5.4.370.0170.06018.79
5.4.360.0470.05718.50
5.4.350.0530.04018.70
5.4.340.0300.05018.66
5.4.320.0050.03812.46
5.4.310.0070.03712.45
5.4.300.0060.03612.46
5.4.290.0050.03912.45
5.4.280.0080.03212.35
5.4.270.0090.04112.35
5.4.260.0130.05018.87
5.4.250.0030.06018.80
5.4.240.0200.06718.84
5.4.230.0130.05019.00
5.4.220.0070.05718.77
5.4.210.0170.04718.81
5.4.200.0170.05318.65
5.4.190.0130.07018.76
5.4.180.0200.07318.98
5.4.170.0100.06018.77
5.4.160.0170.05018.86
5.4.150.0170.07318.89
5.4.140.0170.06316.26
5.4.130.0130.05316.25
5.4.120.0100.07016.21
5.4.110.0100.05716.36
5.4.100.0330.05716.50
5.4.90.0070.05016.24
5.4.80.0100.04716.33
5.4.70.0070.07716.25
5.4.60.0170.06016.21
5.4.50.0130.05016.32
5.4.40.0030.06316.41
5.4.30.0100.04316.31
5.4.20.0030.07716.16
5.4.10.0130.07016.24
5.4.00.0030.05715.66
5.3.290.0110.04012.80
5.3.280.0130.04714.51
5.3.270.0200.06314.52
5.3.260.0070.06314.30
5.3.250.0270.04314.47
5.3.240.0100.05314.62
5.3.230.0170.04314.60
5.3.220.0070.07714.42
5.3.210.0100.05014.44
5.3.200.0170.05314.59
5.3.190.0030.05314.48
5.3.180.0230.05314.57
5.3.170.0070.05014.43
5.3.160.0170.05314.61
5.3.150.0100.05014.57
5.3.140.0070.05014.42
5.3.130.0170.04714.55
5.3.120.0100.07314.61
5.3.110.0100.06014.59
5.3.100.0130.04714.05
5.3.90.0070.05313.86
5.3.80.0170.04313.90
5.3.70.0100.05013.79
5.3.60.0170.04014.04
5.3.50.0230.03013.90
5.3.40.0130.05014.10
5.3.30.0130.05013.90
5.3.20.0100.05013.55
5.3.10.0170.05013.59
5.3.00.0100.06713.55
5.2.170.0070.06011.14
5.2.160.0100.05711.16
5.2.150.0170.04711.06
5.2.140.0170.03311.07
5.2.130.0030.05710.93
5.2.120.0030.05010.93
5.2.110.0130.05011.25
5.2.100.0100.04011.11
5.2.90.0100.05711.11
5.2.80.0130.05311.10
5.2.70.0000.04711.03
5.2.60.0170.05011.20
5.2.50.0170.04710.93
5.2.40.0030.06010.94
5.2.30.0170.05010.85
5.2.20.0100.04010.84
5.2.10.0100.04010.94
5.2.00.0070.03710.70
5.1.60.0030.03310.04
5.1.50.0070.03010.08
5.1.40.0070.03310.04
5.1.30.0070.03310.41
5.1.20.0100.03710.30
5.1.10.0070.04710.01
5.1.00.0030.05310.10
5.0.50.0130.0208.60
5.0.40.0070.0308.36
5.0.30.0100.0538.30
5.0.20.0070.0308.14
5.0.10.0070.0238.24
5.0.00.0030.0438.13
4.4.90.0070.0276.91
4.4.80.0030.0336.91
4.4.70.0030.0276.91
4.4.60.0030.0306.91
4.4.50.0030.0206.91
4.4.40.0000.0336.91
4.4.30.0000.0236.91
4.4.20.0000.0276.91
4.4.10.0100.0136.91
4.4.00.0130.0236.91
4.3.110.0070.0206.91
4.3.100.0070.0176.91
4.3.90.0070.0176.91
4.3.80.0030.0336.91
4.3.70.0000.0276.91
4.3.60.0000.0306.91
4.3.50.0030.0236.91
4.3.40.0000.0376.91
4.3.30.0030.0206.91
4.3.20.0030.0206.91
4.3.10.0000.0236.91
4.3.00.0170.0139.32

preferences:
38.52 ms | 400 KiB | 5 Q