3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $arr = array(); $arr2 = array(); $time = microtime(true); while($i < 60000) { $i++; $arr[] = $i; } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3); $time = microtime(true); while($i < 60000) { $i++; array_push($arr2, $i); } $time = microtime(true) - $time; echo 'took ' . number_format($time, 3);

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.4.10.0060.01217.66
7.4.00.0160.00717.65
7.3.130.0070.01717.77
7.3.120.0120.00917.62
7.3.110.0070.01717.34
7.3.100.0030.01317.26
7.3.90.0100.00717.55
7.3.80.0100.00617.55
7.3.70.0060.00617.45
7.3.60.0100.00717.63
7.3.50.0090.00917.54
7.3.40.0060.01017.61
7.3.30.0070.01117.70
7.3.20.0060.01018.59
7.3.10.0020.01318.47
7.3.00.0080.00818.56
7.2.260.0110.01117.73
7.2.250.0060.01617.39
7.2.240.0070.01017.73
7.2.230.0120.00617.89
7.2.220.0070.01117.89
7.2.210.0180.00017.68
7.2.200.0120.00317.86
7.2.190.0100.01017.32
7.2.180.0030.01417.68
7.2.170.0060.01217.62
7.2.160.0070.01117.88
7.2.150.0000.01318.89
7.2.140.0040.01118.87
7.2.130.0090.01118.76
7.2.120.0100.00618.94
7.2.110.0070.01018.79
7.2.100.0070.00918.87
7.2.90.0040.00918.87
7.2.80.0050.01018.80
7.2.70.0080.00818.83
7.2.60.0050.01418.79
7.2.50.0080.00918.90
7.2.40.0060.00818.78
7.2.30.0050.00818.91
7.2.20.0070.00818.77
7.2.10.0050.01118.63
7.2.00.0090.00818.90
7.1.330.0030.01617.87
7.1.320.0070.01017.66
7.1.310.0040.01117.90
7.1.300.0070.01017.72
7.1.290.0060.01117.36
7.1.280.0000.01717.83
7.1.270.0070.00717.80
7.1.260.0000.01617.55
7.1.250.0070.00917.54
7.1.240.0030.01017.92
7.1.230.0030.01017.68
7.1.220.0100.01017.60
7.1.210.0070.00417.73
7.1.200.0030.01517.47
7.1.190.0070.01017.54
7.1.180.0100.01317.84
7.1.170.0040.01417.70
7.1.160.0090.00917.72
7.1.150.0060.01017.70
7.1.140.0090.00617.77
7.1.130.0100.00717.51
7.1.120.0100.01017.86
7.1.110.0030.01917.77
7.1.100.0040.01117.62
7.1.90.0180.00017.86
7.1.80.0090.01517.85
7.1.70.0040.01118.33
7.1.60.0130.00718.60
7.1.50.0080.01318.34
7.1.40.0000.01517.69
7.1.30.0040.01817.64
7.1.20.0040.01517.67
7.1.10.0040.01117.77
7.1.00.0080.04021.04
7.0.330.0030.01117.35
7.0.320.0090.00917.44
7.0.310.0090.00617.18
7.0.300.0070.00417.12
7.0.290.0030.00917.49
7.0.280.0100.00317.32
7.0.270.0070.01317.36
7.0.260.0070.01017.60
7.0.250.0070.00417.33
7.0.240.0070.01017.45
7.0.230.0100.00717.35
7.0.220.0120.00617.51
7.0.210.0090.01517.45
7.0.200.0060.00718.08
7.0.190.0000.01817.25
7.0.180.0100.01117.29
7.0.170.0070.01117.56
7.0.160.0060.01217.42
7.0.150.0100.00717.50
7.0.140.0030.04320.94
7.0.130.0060.01517.57
7.0.120.0040.04120.66
7.0.110.0030.01017.12
7.0.100.0030.01617.21
7.0.90.0030.01617.26
7.0.80.0030.01417.45
7.0.70.0040.01117.35
7.0.60.0090.02320.04
7.0.50.0020.02918.88
7.0.40.0030.02617.40
7.0.30.0020.03117.50
7.0.20.0070.02217.46
7.0.10.0020.02917.39
7.0.00.0000.03217.41
5.6.400.0140.01422.71
5.6.390.0160.01022.82
5.6.380.0060.02522.68
5.6.370.0100.01722.80
5.6.360.0060.02222.52
5.6.350.0090.02522.50
5.6.340.0060.02422.70
5.6.330.0070.02322.76
5.6.320.0040.02322.61
5.6.310.0100.01722.49
5.6.300.0030.02422.63
5.6.290.0000.03222.37
5.6.280.0100.05026.09
5.6.270.0060.03222.73
5.6.260.0160.01322.32
5.6.250.0140.01722.58
5.6.240.0130.01722.87
5.6.230.0030.02322.86
5.6.220.0190.01622.46
5.6.210.0120.05225.67
5.6.200.0120.03224.52
5.6.190.0070.03524.49
5.6.180.0070.03624.41
5.6.170.0070.03924.53
5.6.160.0100.03024.49
5.6.150.0070.03724.45
5.6.140.0120.03224.53
5.6.130.0090.03424.45
5.6.120.0080.03324.41
5.6.110.0030.03724.54
5.6.100.0090.03224.49
5.6.90.0080.04024.55
5.6.80.0160.02524.09
5.6.70.0140.05224.11
5.6.60.0080.05924.18
5.6.50.0100.05723.98
5.6.40.0150.05323.97
5.6.30.0080.03724.05
5.6.20.0110.04424.24
5.6.10.0120.05224.21
5.6.00.0100.05924.02
5.5.380.0100.02622.71
5.5.370.0130.02322.59
5.5.360.0100.02322.60
5.5.350.0220.05425.69
5.5.340.0070.03324.40
5.5.330.0100.03324.55
5.5.320.0030.03724.24
5.5.310.0080.03224.38
5.5.300.0050.03624.36
5.5.290.0100.03424.41
5.5.280.0070.03424.42
5.5.270.0120.05524.42
5.5.260.0150.03924.19
5.5.250.0120.03524.28
5.5.240.0150.05023.94
5.5.230.0150.05224.08
5.5.220.0080.04823.84
5.5.210.0080.05224.07
5.5.200.0080.04123.88
5.5.190.0160.03624.00
5.5.180.0100.05624.17
5.5.170.0090.02222.68
5.5.160.0050.05923.89
5.5.150.0070.05923.93
5.5.140.0130.05424.06
5.5.130.0120.03624.05
5.5.120.0130.03624.11
5.5.110.0080.05624.00
5.5.100.0050.06023.85
5.5.90.0100.03124.00
5.5.80.0150.04723.98
5.5.70.0070.04823.91
5.5.60.0120.05723.89
5.5.50.0080.05523.78
5.5.40.0110.04223.81
5.5.30.0130.04523.94
5.5.20.0190.04823.93
5.5.10.0130.04823.94
5.5.00.0040.04423.98
5.4.450.0050.03523.44
5.4.440.0030.03523.37
5.4.430.0100.04823.39
5.4.420.0060.05423.46
5.4.410.0090.04423.20
5.4.400.0070.03723.02
5.4.390.0050.05923.18
5.4.380.0100.05723.07
5.4.370.0050.05823.19
5.4.360.0100.04823.11
5.4.350.0120.03023.13
5.4.340.0030.05123.21
5.4.330.0070.02118.97
5.4.320.0120.03923.28
5.4.310.0030.05923.09
5.4.300.0150.04823.12
5.4.290.0080.05023.17
5.4.280.0080.03523.18
5.4.270.0180.04423.13
5.4.260.0140.03423.29
5.4.250.0070.05123.14
5.4.240.0100.05323.20
5.4.230.0090.03223.20
5.4.220.0220.04023.25
5.4.210.0030.03923.13
5.4.200.0070.03423.29
5.4.190.0100.03423.35
5.4.180.0150.04823.07
5.4.170.0140.04423.26
5.4.160.0090.05123.01
5.4.150.0070.03323.12
5.4.140.0080.05021.90
5.4.130.0100.05321.87
5.4.120.0200.03521.81
5.4.110.0070.04721.90
5.4.100.0080.03321.81
5.4.90.0150.04721.91
5.4.80.0040.03822.08
5.4.70.0180.04621.76
5.4.60.0080.04421.85
5.4.50.0150.04321.83
5.4.40.0050.05821.85
5.4.30.0050.05521.92
5.4.20.0130.05021.78
5.4.10.0070.06021.81
5.4.00.0050.04621.62
5.3.290.0080.04220.58
5.3.280.0120.05220.37
5.3.270.0050.05920.49
5.3.260.0050.04220.54
5.3.250.0100.04620.50
5.3.240.0020.04120.42
5.3.230.0100.04520.45
5.3.220.0100.04320.30
5.3.210.0070.05620.30
5.3.200.0100.04020.40
5.3.190.0130.02820.29
5.3.180.0070.04120.45
5.3.170.0100.05720.48
5.3.160.0180.04220.42
5.3.150.0020.06220.35
5.3.140.0100.05520.40
5.3.130.0080.05920.41
5.3.120.0100.04320.37
5.3.110.0080.05320.46
5.3.100.0120.04920.21
5.3.90.0050.04420.12
5.3.80.0100.05319.98
5.3.70.0110.03820.02
5.3.60.0080.03419.93
5.3.50.0070.04720.07
5.3.40.0030.05620.00
5.3.30.0070.03819.98
5.3.20.0160.04619.73
5.3.10.0070.05719.71
5.3.00.0080.03719.72
5.2.170.0100.06718.40
5.2.160.0030.06718.73
5.2.150.0030.08018.45
5.2.140.0070.03718.45
5.2.130.0070.07718.23
5.2.120.0030.05718.36
5.2.110.0100.07718.36
5.2.100.0130.06318.35
5.2.90.0100.04018.36
5.2.80.0000.04318.35
5.2.70.0070.03718.38
5.2.60.0030.04318.39
5.2.50.0070.08318.34
5.2.40.0030.07718.41
5.2.30.0170.07318.34
5.2.20.0030.06318.35
5.2.10.0070.04018.36
5.2.00.0100.07318.18
5.1.60.0170.05720.16
5.1.50.0000.05020.13
5.1.40.0270.04020.11
5.1.30.0100.07320.51
5.1.20.0100.04720.62
5.1.10.0070.07320.41
5.1.00.0070.04020.37
5.0.50.0030.03718.69
5.0.40.0100.07318.62
5.0.30.0100.06018.40
5.0.20.0070.05318.38
5.0.10.0070.07718.54
5.0.00.0030.05718.43
4.4.90.0200.05316.15
4.4.80.0130.04716.18
4.4.70.0070.06716.17
4.4.60.0000.07016.19
4.4.50.0030.04316.20
4.4.40.0070.06016.20
4.4.30.0000.04316.18
4.4.20.0100.04316.25
4.4.10.0030.04016.23
4.4.00.0000.04316.64
4.3.110.0070.03716.12
4.3.100.0070.03316.12
4.3.90.0030.04016.08
4.3.80.0030.08016.09
4.3.70.0000.05016.06
4.3.60.0070.02715.97
4.3.50.0070.02716.09
4.3.40.0100.06016.02
4.3.30.0100.06014.77
4.3.20.0030.07014.81
4.3.10.0130.06014.82
4.3.00.0000.06714.71

preferences:
35.61 ms | 400 KiB | 5 Q