3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Create an array $array=array('a','b','c','d','e','f','g'); //Loop over the array by reference foreach($array as &$a){ } //Loop again over the array foreach($array as $a){ } //Print the array print_r($array);

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.00718.18
8.3.50.0100.00318.17
8.3.40.0140.00018.67
8.3.30.0080.00618.84
8.3.20.0050.00320.16
8.3.10.0030.00521.92
8.3.00.0040.00422.53
8.2.180.0090.00616.50
8.2.170.0150.00022.96
8.2.160.0070.00718.96
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00619.36
8.2.110.0090.00022.13
8.2.100.0080.00419.64
8.2.90.0050.00219.05
8.2.80.0040.00417.97
8.2.70.0100.00017.63
8.2.60.0050.00318.04
8.2.50.0060.00318.07
8.2.40.0040.00418.32
8.2.30.0070.00017.93
8.2.20.0000.00717.63
8.2.10.0000.00717.75
8.2.00.0000.00817.66
8.1.270.0080.00022.05
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0040.00423.98
8.1.230.0070.00418.97
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00617.52
8.1.180.0040.00418.85
8.1.170.0040.00418.54
8.1.160.0000.00722.11
8.1.150.0000.00718.48
8.1.140.0060.00317.45
8.1.130.0030.00317.82
8.1.120.0040.00417.37
8.1.110.0040.00417.41
8.1.100.0000.00717.49
8.1.90.0030.00317.43
8.1.80.0040.00417.43
8.1.70.0070.00017.48
8.1.60.0030.00517.46
8.1.50.0030.00617.52
8.1.40.0000.00817.52
8.1.30.0040.00417.59
8.1.20.0020.00517.63
8.1.10.0000.01017.31
8.1.00.0030.00717.39
8.0.300.0050.00318.77
8.0.290.0000.00717.03
8.0.280.0000.00718.34
8.0.270.0030.00317.24
8.0.260.0060.00016.84
8.0.250.0000.00716.93
8.0.240.0000.00816.84
8.0.230.0000.00616.82
8.0.220.0030.00316.86
8.0.210.0020.00516.90
8.0.200.0060.00016.95
8.0.190.0040.00416.93
8.0.180.0040.00416.87
8.0.170.0040.00416.83
8.0.160.0060.00316.82
8.0.150.0000.00716.80
8.0.140.0030.00516.73
8.0.130.0000.00613.33
8.0.120.0040.00416.88
8.0.110.0040.00416.86
8.0.100.0070.00016.78
8.0.90.0000.00716.82
8.0.80.0070.00716.91
8.0.70.0030.00516.88
8.0.60.0050.00316.70
8.0.50.0040.00416.67
8.0.30.0110.01117.11
8.0.20.0090.00917.40
8.0.10.0040.00416.93
8.0.00.0080.01316.71
7.4.330.0000.00515.00
7.4.320.0030.00316.58
7.4.300.0060.00016.58
7.4.290.0050.00216.52
7.4.280.0030.00316.57
7.4.270.0060.00016.61
7.4.260.0050.00516.38
7.4.250.0000.00716.46
7.4.240.0040.00416.52
7.4.230.0050.00216.59
7.4.220.0060.01316.53
7.4.210.0050.01116.54
7.4.200.0000.00816.67
7.4.190.0040.00416.64
7.4.160.0120.00416.41
7.4.150.0110.00717.40
7.4.140.0110.00617.86
7.4.130.0110.00816.50
7.4.120.0060.01016.46
7.4.110.0110.00516.39
7.4.100.0100.00716.50
7.4.90.0030.01316.51
7.4.80.0040.01219.39
7.4.70.0120.00416.36
7.4.60.0080.00816.45
7.4.50.0050.00016.45
7.4.40.0100.00622.77
7.4.30.0100.00616.45
7.4.00.0060.00614.80
7.3.330.0050.00013.16
7.3.320.0000.00612.97
7.3.310.0030.00316.27
7.3.300.0000.00616.30
7.3.290.0100.01016.25
7.3.280.0050.01416.25
7.3.270.0070.01017.40
7.3.260.0030.01516.48
7.3.250.0100.00716.39
7.3.240.0160.00616.48
7.3.230.0140.00316.63
7.3.210.0110.00716.32
7.3.200.0160.00619.39
7.3.190.0040.01516.59
7.3.180.0030.01216.59
7.3.170.0090.01316.37
7.3.160.0080.00916.51
7.3.120.0070.01014.70
7.3.10.0030.00916.19
7.3.00.0000.01316.45
7.2.330.0120.01316.50
7.2.320.0000.02016.46
7.2.310.0100.00716.72
7.2.300.0030.01316.60
7.2.290.0170.00016.66
7.2.130.0110.00716.69
7.2.120.0100.00616.46
7.2.110.0060.00916.46
7.2.100.0140.00516.18
7.2.90.0090.00416.51
7.2.80.0100.00016.67
7.2.70.0040.01216.19
7.2.60.0090.00716.83
7.2.50.0150.00616.92
7.2.40.0180.00316.41
7.2.30.0100.00616.49
7.2.20.0000.01316.59
7.2.10.0100.00716.64
7.2.00.0040.00918.04
7.1.250.0090.00615.31
7.1.200.0030.00915.82
7.1.100.0000.01218.20
7.1.70.0040.00416.80
7.1.60.0030.02019.82
7.1.50.0090.00316.87
7.1.00.0100.07722.30
7.0.200.0030.00716.64
7.0.140.0070.07021.98
7.0.60.0030.04019.91
7.0.50.0100.06317.86
7.0.40.0070.06720.25
7.0.30.0200.04720.07
7.0.20.0200.04720.09
7.0.10.0370.07320.10
7.0.00.0100.05320.22
5.6.280.0100.06721.13
5.6.210.0130.07720.76
5.6.200.0070.07018.22
5.6.190.0070.08320.65
5.6.180.3370.04320.41
5.6.170.0430.07020.50
5.6.160.0030.04320.46
5.6.150.0070.07318.28
5.6.140.0070.05018.18
5.6.130.0070.05018.27
5.6.120.0070.07320.98
5.6.110.0100.08020.97
5.6.100.0130.05721.07
5.6.90.0030.04321.12
5.6.80.0070.03720.39
5.6.70.4400.03720.35
5.5.350.0030.07320.38
5.5.340.0070.05718.07
5.5.330.0070.05020.57
5.5.320.0230.05320.34
5.5.310.0230.07320.26
5.5.300.0130.07718.03
5.5.290.0100.04017.94
5.5.280.0170.07720.87
5.5.270.0100.08720.64
5.5.260.0130.07320.76
5.5.250.0070.06320.49
5.5.240.0130.07720.34
5.4.450.0530.04719.61
5.4.440.0600.05719.58
5.4.430.0700.04719.57
5.4.420.0500.05319.44
5.4.410.0700.07019.42
5.4.400.1000.00018.81
5.4.390.0800.00018.82
5.4.380.0370.05718.84
5.4.370.0800.04718.59
5.4.360.0170.05318.72
5.4.350.0270.05718.55
5.4.340.0300.05318.74
5.4.320.0130.04612.48
5.4.310.0110.04512.48
5.4.300.0070.03612.48
5.4.290.0070.05212.48
5.4.280.0050.03512.38
5.4.270.0060.03512.38
5.4.260.0100.05018.88
5.4.250.0130.05319.00
5.4.240.0130.06018.95
5.4.230.0170.06018.74
5.4.220.0070.05318.91
5.4.210.0130.05718.63
5.4.200.0130.05718.88
5.4.190.0100.05018.99
5.4.180.0170.04318.87
5.4.170.0100.06318.98
5.4.160.0100.05318.71
5.4.150.0070.08319.02
5.4.140.0030.06716.57
5.4.130.0100.05016.38
5.4.120.0130.05016.50
5.4.110.0030.06016.54
5.4.100.0100.05016.31
5.4.90.0130.06716.36
5.4.80.0030.05316.52
5.4.70.0170.05716.45
5.4.60.0200.03716.61
5.4.50.0130.04716.36
5.4.40.0070.05016.39
5.4.30.0170.05016.42
5.4.20.0230.04016.46
5.4.10.0170.05716.46
5.4.00.0030.05715.88
5.3.290.0100.03412.80
5.3.280.0130.05014.69
5.3.270.0100.05714.67
5.3.260.0130.06714.52
5.3.250.0070.05314.66
5.3.240.0200.05014.77
5.3.230.0130.07014.67
5.3.220.0070.06014.57
5.3.210.0070.08014.55
5.3.200.0070.06014.63
5.3.190.0100.04714.55
5.3.180.0070.06714.77
5.3.170.0170.06314.72
5.3.160.0070.05014.52
5.3.150.0030.05714.64
5.3.140.0130.04714.62
5.3.130.0230.06314.53
5.3.120.0170.06714.54
5.3.110.0100.05314.51
5.3.100.0100.04714.02
5.3.90.0170.05714.23
5.3.80.0100.06714.01
5.3.70.0170.05314.17
5.3.60.0070.06014.07
5.3.50.0130.04714.02
5.3.40.0230.04014.16
5.3.30.0070.05013.73
5.3.20.0100.06313.77
5.3.10.0130.06013.86
5.3.00.0100.05313.62
5.2.170.0130.05011.20
5.2.160.0100.03711.35
5.2.150.0100.04711.31
5.2.140.0000.05011.21
5.2.130.0100.05011.06
5.2.120.0100.06011.06
5.2.110.0200.04311.25
5.2.100.0070.05311.09
5.2.90.0000.05311.25
5.2.80.0070.05311.05
5.2.70.0100.04711.07
5.2.60.0130.04711.14
5.2.50.0030.04311.09
5.2.40.0100.03710.95
5.2.30.0070.05310.79
5.2.20.0130.04011.03
5.2.10.0070.04010.75
5.2.00.0030.04710.87
5.1.60.0000.0439.84
5.1.50.0030.05010.18
5.1.40.0130.03710.16
5.1.30.0170.03710.39
5.1.20.0000.04310.41
5.1.10.0000.04010.12
5.1.00.0000.04710.30
5.0.50.0030.0278.46
5.0.40.0030.0278.37
5.0.30.0000.0508.28
5.0.20.0070.0338.39
5.0.10.0000.0338.13
5.0.00.0030.0438.30
4.4.90.0030.0306.69
4.4.80.0070.0276.69
4.4.70.0070.0176.69
4.4.60.0000.0306.69
4.4.50.0100.0136.69
4.4.40.0070.0306.69
4.4.30.0000.0276.69
4.4.20.0070.0176.69
4.4.10.0000.0236.69
4.4.00.0030.0376.69
4.3.110.0000.0236.69
4.3.100.0030.0206.69
4.3.90.0100.0176.69
4.3.80.0070.0306.69
4.3.70.0000.0236.69
4.3.60.0000.0206.69
4.3.50.0070.0206.69
4.3.40.0000.0436.69
4.3.30.0070.0176.69
4.3.20.0070.0236.69
4.3.10.0030.0236.69
4.3.00.0130.0206.83

preferences:
44.43 ms | 400 KiB | 5 Q