3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [0, 1, 2]; $ref =& $array; // Necessary to trigger the old behavior foreach ($array as $val) { var_dump($val); unset($array[1]); }

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.0110.01118.27
8.3.50.0130.00822.12
8.3.40.0130.01018.64
8.3.30.0090.00618.48
8.3.20.0080.00020.17
8.3.10.0060.00323.66
8.3.00.0020.00519.85
8.2.180.0110.00718.41
8.2.170.0120.00322.96
8.2.160.0130.00720.39
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0050.00319.32
8.2.120.0080.00026.35
8.2.110.0060.00322.32
8.2.100.0000.01118.05
8.2.90.0070.00019.28
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0000.00717.93
8.2.50.0070.00318.07
8.2.40.0000.00822.38
8.2.30.0000.00720.73
8.2.20.0040.00417.74
8.2.10.0070.00018.05
8.2.00.0020.00518.04
8.1.280.0140.00325.92
8.1.270.0040.00420.33
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0100.00724.02
8.1.230.0110.00019.10
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.46
8.1.160.0040.00420.68
8.1.150.0040.00418.94
8.1.140.0040.00419.45
8.1.130.0070.00017.60
8.1.120.0030.00517.39
8.1.110.0040.00417.37
8.1.100.0040.00417.36
8.1.90.0030.00517.45
8.1.80.0000.00717.48
8.1.70.0000.00717.39
8.1.60.0000.00817.59
8.1.50.0060.00317.55
8.1.40.0000.00817.57
8.1.30.0040.00417.66
8.1.20.0020.00517.56
8.1.10.0040.00417.34
8.1.00.0040.00417.43
8.0.300.0050.00518.77
8.0.290.0040.00416.75
8.0.280.0000.00818.43
8.0.270.0040.00417.17
8.0.260.0030.00317.15
8.0.250.0070.00017.00
8.0.240.0070.00016.96
8.0.230.0040.00417.01
8.0.220.0000.00716.83
8.0.210.0030.00516.94
8.0.200.0000.00816.95
8.0.190.0050.00216.98
8.0.180.0040.00416.95
8.0.170.0000.01116.86
8.0.160.0100.00016.82
8.0.150.0040.00416.73
8.0.140.0040.00416.86
8.0.130.0000.00513.24
8.0.120.0030.00616.86
8.0.110.0050.00316.93
8.0.100.0070.00016.79
8.0.90.0040.00416.69
8.0.80.0090.00916.89
8.0.70.0040.00416.76
8.0.60.0070.00016.85
8.0.50.0040.00416.83
8.0.30.0090.01117.02
8.0.20.0100.01017.40
8.0.10.0070.00016.90
8.0.00.0140.00516.79
7.4.330.0000.00616.70
7.4.320.0070.00016.52
7.4.300.0030.00316.50
7.4.290.0040.00416.59
7.4.280.0080.00016.63
7.4.270.0000.00716.48
7.4.260.0030.00516.53
7.4.250.0040.00416.47
7.4.240.0040.00316.63
7.4.230.0030.00316.60
7.4.220.0120.00616.35
7.4.210.0060.00916.64
7.4.200.0000.00816.43
7.4.160.0110.00416.46
7.4.150.0100.00717.40
7.4.140.0090.01217.86
7.4.130.0020.01516.58
7.4.120.0110.00716.46
7.4.110.0090.00916.30
7.4.100.0070.01016.52
7.4.90.0120.00616.41
7.4.80.0120.01019.39
7.4.70.0070.01416.43
7.4.60.0120.00416.39
7.4.50.0040.01516.36
7.4.40.0030.01616.54
7.4.30.0100.00716.46
7.4.10.0000.01714.44
7.4.00.0070.00915.04
7.3.330.0000.00613.06
7.3.320.0030.00313.20
7.3.310.0050.00216.25
7.3.300.0030.00316.17
7.3.290.0070.00716.22
7.3.280.0060.01116.30
7.3.270.0140.00317.40
7.3.260.0150.00916.73
7.3.250.0090.01116.27
7.3.240.0100.00716.37
7.3.230.0100.00716.51
7.3.210.0140.00416.50
7.3.200.0110.00516.11
7.3.190.0060.01216.29
7.3.180.0030.01416.53
7.3.170.0060.01316.39
7.3.160.0110.00416.20
7.3.130.0070.00714.96
7.3.120.0070.00814.70
7.3.110.0090.00814.93
7.3.100.0080.00614.79
7.3.90.0050.01014.79
7.3.80.0080.00714.60
7.3.70.0100.00514.86
7.3.60.0050.00714.84
7.3.50.0060.01114.82
7.3.40.0070.00414.59
7.3.30.0050.00914.74
7.3.20.0090.00716.71
7.3.10.0040.00816.66
7.3.00.0050.00816.64
7.2.330.0120.00616.66
7.2.320.0060.01216.63
7.2.310.0070.01616.68
7.2.300.0150.01216.58
7.2.290.0100.01316.53
7.2.260.0030.01614.89
7.2.250.0050.01115.00
7.2.240.0090.00714.89
7.2.230.0020.01314.93
7.2.220.0080.01014.93
7.2.210.0020.01114.87
7.2.200.0080.01015.02
7.2.190.0070.00915.12
7.2.180.0090.00915.04
7.2.170.0020.01114.95
7.2.160.0100.00314.90
7.2.150.0100.00616.90
7.2.140.0080.00416.57
7.2.130.0100.00616.97
7.2.120.0050.01116.85
7.2.110.0070.00516.80
7.2.100.0030.01016.66
7.2.90.0070.00416.89
7.2.80.0050.00716.98
7.2.70.0060.00916.71
7.2.60.0130.01116.78
7.2.50.0050.00916.85
7.2.40.0060.00816.73
7.2.30.0070.00516.88
7.2.20.0020.01116.77
7.2.10.0070.00816.64
7.2.00.0070.00717.64
7.1.330.0020.01215.75
7.1.320.0060.00815.89
7.1.310.0070.00715.61
7.1.300.0050.00915.67
7.1.290.0000.01415.72
7.1.280.0030.01215.74
7.1.270.0070.00515.69
7.1.260.0030.00915.72
7.1.250.0050.01115.80
7.1.240.0040.00415.79
7.1.230.0070.00315.55
7.1.220.0080.00415.57
7.1.210.0000.01615.73
7.1.200.0080.00515.84
7.1.190.0000.01116.02
7.1.180.0000.01215.95
7.1.170.0060.01015.92
7.1.160.0030.00915.75
7.1.150.0040.01115.75
7.1.140.0040.00715.78
7.1.130.0140.00015.84
7.1.120.0100.00315.50
7.1.110.0060.00315.62
7.1.100.0090.00516.93
7.1.90.0050.00315.56
7.1.80.0030.00715.76
7.1.70.0050.00716.40
7.1.60.0090.00917.73
7.1.50.0040.00816.30
7.1.40.0140.00015.61
7.1.30.0030.00615.67
7.1.20.0110.00015.87
7.1.10.0030.00615.66
7.1.00.0050.04018.92
7.0.330.0060.00915.35
7.0.320.0090.00615.53
7.0.310.0100.00715.30
7.0.300.0060.00915.32
7.0.290.0030.01015.59
7.0.280.0030.00715.24
7.0.270.0040.00415.20
7.0.260.0060.00915.44
7.0.250.0060.00615.18
7.0.240.0000.01015.34
7.0.230.0000.01115.48
7.0.220.0030.01015.53
7.0.210.0060.00615.52
7.0.200.0100.00715.14
7.0.190.0000.00915.22
7.0.180.0060.01015.33
7.0.170.0000.01115.29
7.0.160.0060.00915.18
7.0.150.0060.00915.49
7.0.140.0060.00615.43
7.0.130.0030.01215.32
7.0.120.0080.00415.34
7.0.110.0030.00915.51
7.0.100.0040.00814.97
7.0.90.0070.00715.54
7.0.80.0000.01115.66
7.0.70.0070.00315.45
7.0.60.0080.02517.66
7.0.50.0070.04316.58
7.0.40.0080.02516.73
7.0.30.0200.03216.79
7.0.20.0180.04316.75
7.0.10.0080.03716.68
7.0.00.0070.04416.76
5.6.400.0040.00414.32
5.6.390.0030.00614.31
5.6.380.0040.00914.26
5.6.370.0060.00314.40
5.6.360.0000.00914.61
5.6.350.0070.00314.40
5.6.340.0080.00614.31
5.6.330.0060.00614.40
5.6.320.0070.00714.08
5.6.310.0100.00714.33
5.6.300.0000.01114.28
5.6.290.0090.00314.31
5.6.280.0070.01717.48
5.6.270.0040.00814.20
5.6.260.0030.01014.42
5.6.250.0000.01414.32
5.6.240.0030.01214.36
5.6.230.0090.00014.30
5.6.220.0080.00414.24
5.6.210.0050.04917.31
5.6.200.0130.03716.38
5.6.190.0110.04717.30
5.6.180.0100.02817.28
5.6.170.0200.02417.26
5.6.160.0090.04317.37
5.6.150.0130.02816.19
5.6.140.0100.04216.21
5.6.130.0030.04516.26
5.6.120.0050.04317.53
5.6.110.0050.05017.71
5.6.100.0060.03117.51
5.6.90.0030.03517.61
5.6.80.0070.03517.25
5.6.70.0050.00514.14
5.6.60.0170.00014.22
5.6.50.0080.00414.07
5.6.40.0060.00914.40
5.6.30.0040.01114.02
5.6.20.0030.00914.23
5.6.10.0000.01414.14
5.6.00.0060.00314.13
5.5.380.0060.01013.92
5.5.370.0000.01714.53
5.5.360.0030.01013.94
5.5.350.0120.03217.41
5.5.340.0060.03816.06
5.5.330.0080.04017.04
5.5.320.0330.02517.19
5.5.310.0120.03117.31
5.5.300.0070.02516.07
5.5.290.0050.02316.09
5.5.280.0100.02817.38
5.5.270.0090.04417.39
5.5.260.0130.04217.66
5.5.250.0080.04317.38
5.5.240.0250.03717.03
5.5.230.0070.00414.30
5.5.220.0060.00614.25
5.5.210.0100.00314.10
5.5.200.0100.00314.17
5.5.190.0070.00714.38
5.5.180.0040.01113.99
5.5.170.0090.00614.34
5.5.160.0100.00714.32
5.5.150.0030.00614.17
5.5.140.0080.00013.84
5.5.130.0040.00414.03
5.5.120.0120.00314.29
5.5.110.0070.00714.38
5.5.100.0030.01014.23
5.5.90.0070.00713.92
5.5.80.0040.00414.17
5.5.70.0000.01414.07
5.5.60.0030.00714.03
5.5.50.0040.00814.24
5.5.40.0030.01014.04
5.5.30.0000.00813.99
5.5.20.0090.00314.29
5.5.10.0070.00714.25
5.5.00.0030.00913.83

preferences:
55.21 ms | 401 KiB | 5 Q