3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,2,3]; foreach ($array as $elt) { var_dump($elt); unset($array[2]); }

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.1.130.0040.00420.31
8.1.120.0030.00317.49
8.1.110.0040.00417.46
8.1.100.0000.00717.43
8.1.90.0040.00417.47
8.1.80.0060.00317.45
8.1.70.0060.00317.37
8.1.60.0030.00617.60
8.1.50.0070.00017.55
8.1.40.0000.00817.52
8.1.30.0060.00317.68
8.1.20.0000.00817.71
8.1.10.0040.00417.50
8.1.00.0040.00417.49
8.0.260.0000.00620.20
8.0.250.0030.00316.95
8.0.240.0000.00717.00
8.0.230.0030.00316.84
8.0.220.0070.00016.79
8.0.210.0000.00716.91
8.0.200.0000.00716.95
8.0.190.0040.00416.95
8.0.180.0050.00316.81
8.0.170.0040.00416.93
8.0.160.0000.00816.97
8.0.150.0070.00016.85
8.0.140.0000.00816.84
8.0.130.0050.00013.28
8.0.120.0000.00716.89
8.0.110.0000.00716.71
8.0.100.0040.00416.93
8.0.90.0070.00016.72
8.0.80.0120.00416.94
8.0.70.0050.00316.90
8.0.60.0000.00716.81
8.0.50.0040.00416.92
8.0.30.0100.00717.14
8.0.20.0110.00817.14
8.0.10.0050.00317.06
8.0.00.0060.01216.86
7.4.330.0000.00515.55
7.4.320.0060.00016.46
7.4.300.0030.00616.64
7.4.290.0070.00016.36
7.4.280.0080.00016.55
7.4.270.0030.00316.53
7.4.260.0030.00313.30
7.4.250.0030.00616.60
7.4.240.0030.00316.60
7.4.230.0030.00316.30
7.4.220.0050.00216.64
7.4.210.0110.00816.51
7.4.200.0030.00316.58
7.4.130.0140.00416.52
7.4.120.0100.01016.61
7.4.110.0090.01116.56
7.4.100.0150.00916.50
7.4.90.0090.01316.37
7.4.80.0090.00916.46
7.4.70.0110.00816.60
7.4.60.0100.01016.42
7.4.50.0100.00816.34
7.4.40.0070.01116.57
7.4.30.0080.01116.34
7.4.20.0140.00416.47
7.4.10.0100.01316.53
7.4.00.0120.00616.24
7.3.330.0070.00016.14
7.3.320.0030.00313.10
7.3.310.0000.00716.35
7.3.300.0070.00016.21
7.3.290.0000.00716.07
7.3.260.0030.01616.67
7.3.240.0080.01016.49
7.3.230.0100.00916.09
7.3.220.0110.00716.54
7.3.210.0140.00516.34
7.3.200.0100.00916.31
7.3.190.0110.01016.56
7.3.180.0070.01116.40
7.3.170.0050.01316.42
7.3.160.0110.00816.35
7.3.150.0110.00916.45
7.3.140.0100.01116.32
7.3.130.0150.00616.28
7.3.120.0120.01016.41
7.3.110.0090.01116.31
7.3.100.0110.01116.43
7.3.90.0110.01216.32
7.3.80.0080.01016.26
7.3.70.0100.00916.18
7.3.60.0100.00916.32
7.3.50.0110.01216.18
7.3.40.0140.00916.15
7.3.30.0100.01316.23
7.3.20.0150.00516.29
7.3.10.0150.00416.22
7.3.00.0130.00716.38
7.2.340.0120.00916.54
7.2.330.0110.00816.67
7.2.320.0060.01616.52
7.2.310.0110.00816.50
7.2.300.0100.01316.38
7.2.290.0050.01516.27
7.2.280.0160.00716.63
7.2.270.0150.00616.41
7.2.260.0150.00916.37
7.2.250.0120.00916.29
7.2.240.0090.01516.44
7.2.230.0080.01716.44
7.2.220.0090.01416.64
7.2.210.0130.00916.43
7.2.200.0140.00916.43
7.2.190.0090.00916.49
7.2.180.0110.01216.41
7.2.170.0130.00616.44
7.2.160.0130.00916.40
7.2.150.0140.00616.55
7.2.140.0070.01616.60
7.2.130.0100.00816.60
7.2.120.0150.00616.48
7.2.110.0120.01216.52
7.2.100.0220.00916.51
7.2.90.0130.01216.57
7.2.80.0190.00416.54
7.2.70.0140.01016.53
7.2.60.0120.01016.55
7.2.50.0130.01316.48
7.2.40.0140.00716.47
7.2.30.0140.01316.56
7.2.20.0140.00916.57
7.2.10.0090.01416.54
7.2.00.0210.00516.46
7.1.330.0240.01215.45
7.1.320.0230.01115.52
7.1.310.0250.00315.67
7.1.300.0270.00915.59
7.1.290.0330.00515.49
7.1.280.0140.02315.37
7.1.270.0280.00615.73
7.1.260.0790.00615.45
7.1.250.0270.00315.34
7.1.240.0330.00315.45
7.1.230.0210.01315.55
7.1.220.0200.01015.59
7.1.210.0280.01015.38
7.1.200.0260.01015.56
7.1.190.0210.00915.56
7.1.180.0360.01415.36
7.1.170.0250.01815.32
7.1.160.0260.01415.39
7.1.150.0240.01015.54
7.1.140.0470.01015.41
7.1.130.0320.01015.51
7.1.120.0320.00715.47
7.1.110.0250.01115.34
7.1.100.0480.01015.59
7.1.90.0290.00915.48
7.1.80.0390.00615.77
7.1.70.0220.01015.39
7.1.60.0210.01515.48
7.1.50.0180.01515.55
7.1.40.0210.01115.43
7.1.30.0320.01015.58
7.1.20.0260.00815.50
7.1.10.0190.01315.33
7.1.00.0250.01415.47
7.0.330.0190.00715.28
7.0.320.0210.00715.34
7.0.310.0270.00715.27
7.0.300.0290.00815.26
7.0.290.0200.01015.21
7.0.280.0130.02415.18
7.0.270.0220.01015.36
7.0.260.0290.00615.18
7.0.250.0270.00815.29
7.0.240.0210.01215.34
7.0.230.0280.00315.25
7.0.220.0170.01415.13
7.0.210.0310.00615.24
7.0.200.0260.00415.21
7.0.190.0320.00015.21
7.0.180.0240.00915.14
7.0.170.0250.01215.06
7.0.160.0230.01215.14
7.0.150.0230.00615.29
7.0.140.0240.01315.23
7.0.130.0200.01215.16
7.0.120.0220.00815.38
7.0.110.0170.01415.27
7.0.100.0260.01315.05
7.0.90.0650.01115.14
7.0.80.0210.01415.31
7.0.70.0190.01715.18
7.0.60.0290.00415.27
7.0.50.0240.01015.17
7.0.40.0270.00615.06
7.0.30.0340.00315.26
7.0.20.0200.01015.10
7.0.10.0300.01115.24
7.0.00.0340.00415.20
5.6.400.0180.01916.11
5.6.390.0200.01115.88
5.6.380.0300.00615.85
5.6.370.0210.01615.93
5.6.360.0230.01215.81
5.6.350.0170.01715.99
5.6.340.0310.01015.63
5.6.330.0200.01715.87
5.6.320.0150.01615.89
5.6.310.0300.00716.02
5.6.300.0240.02015.76
5.6.290.0170.01815.72
5.6.280.0220.01116.06
5.6.270.0170.01515.97
5.6.260.0250.00516.04
5.6.250.0250.01015.82
5.6.240.0230.01315.91
5.6.230.0270.01415.97
5.6.220.0220.01515.95
5.6.210.0180.01815.83
5.6.200.0210.01315.88
5.6.190.0320.00815.87
5.6.180.0210.01915.89
5.6.170.0270.01115.86
5.6.160.0200.01715.86
5.6.150.0210.01416.08
5.6.140.0270.01315.87
5.6.130.0340.00815.84
5.6.120.0230.01815.84
5.6.110.0130.02715.70
5.6.100.0230.01115.83
5.6.90.0200.01915.97
5.6.80.0220.00915.94
5.6.70.0250.00915.86
5.6.60.0210.01115.75
5.6.50.0270.00415.76
5.6.40.0210.01215.60
5.6.30.0130.02115.79
5.6.20.0310.00615.78
5.6.10.0240.01215.79
5.6.00.0180.01715.80
5.5.380.0320.00815.81
5.5.370.0300.00815.77
5.5.360.0240.01115.73
5.5.350.0260.01015.70
5.5.340.0230.01515.87
5.5.330.0290.01015.81
5.5.320.0210.01815.71
5.5.310.0220.01315.86
5.5.300.0320.00615.83
5.5.290.0140.01915.89
5.5.280.0170.01716.01
5.5.270.0260.01015.87
5.5.260.0210.01315.84
5.5.250.0230.01015.71
5.5.240.0160.02015.61
5.5.230.0150.01515.80
5.5.220.0210.01115.66
5.5.210.0150.02515.76
5.5.200.0190.01215.77
5.5.190.0140.01715.83
5.5.180.0240.00715.76
5.5.170.0180.01415.60
5.5.160.0190.01915.97
5.5.150.0230.01216.04
5.5.140.0160.01715.43
5.5.130.0280.00615.81
5.5.120.0180.01515.70
5.5.110.0340.00615.44
5.5.100.0190.01615.65
5.5.90.0220.01215.72
5.5.80.0140.01415.89
5.5.70.0240.01115.70
5.5.60.0180.01515.48
5.5.50.0270.01015.80
5.5.40.0280.01015.69
5.5.30.0260.01415.85
5.5.20.0200.01615.86
5.5.10.0230.01315.44
5.5.00.0160.01715.81
5.4.450.0220.00814.22
5.4.440.0180.01114.22
5.4.430.0170.00714.22
5.4.420.0240.00514.22
5.4.410.0250.00014.22
5.4.400.0210.00414.22
5.4.390.0170.00814.22
5.4.380.0080.01414.22
5.4.370.0140.01014.22
5.4.360.0170.00614.22
5.4.350.0220.00614.22
5.4.340.0180.00714.22
5.4.330.0190.00414.22
5.4.320.0240.00314.22
5.4.310.0170.00814.22
5.4.300.0220.00014.22
5.4.290.0130.01314.22
5.4.280.0190.00814.22
5.4.270.0230.00414.22
5.4.260.0160.00614.22
5.4.250.0220.00214.22
5.4.240.0210.00314.22
5.4.230.0170.01214.22
5.4.220.0210.00714.22
5.4.210.0200.00414.22
5.4.200.0250.00414.22
5.4.190.0190.00914.22
5.4.180.0180.01014.22
5.4.170.0230.00614.22
5.4.160.0140.00814.22
5.4.150.0170.00714.22
5.4.140.0140.01414.22
5.4.130.0210.00514.22
5.4.120.0240.00314.22
5.4.110.0180.00914.22
5.4.100.0150.01214.22
5.4.90.0110.01414.22
5.4.80.0230.00314.22
5.4.70.0070.01814.22
5.4.60.0200.00714.22
5.4.50.0140.01114.22
5.4.40.0210.01014.22
5.4.30.0200.00614.22
5.4.20.0170.00914.22
5.4.10.0140.01514.22
5.4.00.0210.00514.22
5.3.290.0220.00714.22
5.3.280.0180.01214.22
5.3.270.0210.01114.22
5.3.260.0190.00814.22
5.3.250.0130.02014.22
5.3.240.0220.00614.22
5.3.230.0150.01014.22
5.3.220.0200.00814.22
5.3.210.0170.01614.22
5.3.200.0190.00614.22
5.3.190.0200.00814.22
5.3.180.0220.00814.22
5.3.170.0180.01114.22
5.3.160.0280.00414.22
5.3.150.0160.01314.22
5.3.140.0220.00814.22
5.3.130.0200.01014.22
5.3.120.0240.00714.22
5.3.110.0130.01314.22
5.3.100.0110.01214.22
5.3.90.0180.00914.22
5.3.80.0190.01014.22
5.3.70.0140.01814.22
5.3.60.0120.01214.22
5.3.50.0130.01314.22
5.3.40.0210.00814.22
5.3.30.0250.00614.22
5.3.20.0160.01014.22
5.3.10.0190.00814.22
5.3.00.0150.00914.22
5.2.170.0170.00414.22
5.2.160.0210.00714.22
5.2.150.0180.00714.22
5.2.140.0190.00714.22
5.2.130.0080.01514.22
5.2.120.0040.01914.22
5.2.110.0170.00714.22
5.2.100.0150.00714.22
5.2.90.0150.00614.22
5.2.80.0110.01214.22
5.2.70.0140.01014.22
5.2.60.0170.00314.22
5.2.50.0170.00614.22
5.2.40.0150.00414.22
5.2.30.0180.00314.22
5.2.20.0130.01014.22
5.2.10.0110.00814.22
5.2.00.0120.00614.22
5.1.60.0130.00314.22
5.1.50.0120.00614.22
5.1.40.0080.00814.22
5.1.30.0120.00714.22
5.1.20.0180.00014.22
5.1.10.0150.00614.22
5.1.00.0090.00914.22
5.0.50.0110.00414.22
5.0.40.0100.00714.22
5.0.30.0120.00814.22
5.0.20.0110.00414.22
5.0.10.0110.00814.22
5.0.00.0080.00814.22
4.4.90.0110.00014.22
4.4.80.0060.00314.22
4.4.70.0090.00214.22
4.4.60.0070.00314.22
4.4.50.0070.00314.22
4.4.40.0110.00014.22
4.4.30.0070.00314.22
4.4.20.0080.00314.22
4.4.10.0100.00014.22
4.4.00.0090.00214.22
4.3.110.0020.00714.22
4.3.100.0020.00714.22
4.3.90.0130.00014.22
4.3.80.0080.00314.22
4.3.70.0060.00314.22
4.3.60.0070.00314.22
4.3.50.0070.00414.22
4.3.40.0120.00014.22
4.3.30.0060.00314.22
4.3.20.0050.00314.22
4.3.10.0060.00314.22
4.3.00.0040.00414.22

preferences:
14.4 ms | 406 KiB | 5 Q