3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => 'string1', 1 => 'string2', 2 => 'string3', 3 => 'string4'); $arrays =$array; print_r($array); $array=array(); $i=0; foreach($arrays as $k => $item) { if($item == 'string2'){ unset($arrays[$k]); } $i++; } print_r(array_values($arrays));

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.0100.01018.20
8.3.50.0140.00716.48
8.3.40.0100.01018.89
8.3.30.0110.00418.91
8.3.20.0080.00020.21
8.3.10.0000.00723.65
8.3.00.0030.00619.14
8.2.180.0140.00716.50
8.2.170.0060.00918.92
8.2.160.0090.00922.96
8.2.150.0030.00624.18
8.2.140.0170.00324.66
8.2.130.0080.00026.16
8.2.120.0100.01021.04
8.2.110.0030.00720.98
8.2.100.0080.00317.91
8.2.90.0080.00019.17
8.2.80.0090.00017.97
8.2.70.0080.00017.63
8.2.60.0030.00618.16
8.2.50.0040.00418.10
8.2.40.0030.00718.09
8.2.30.0040.00418.18
8.2.20.0000.00717.75
8.2.10.0030.00518.11
8.2.00.0080.00018.12
8.1.280.0110.00425.92
8.1.270.0000.00820.28
8.1.260.0020.00526.35
8.1.250.0050.00228.09
8.1.240.0030.00622.61
8.1.230.0070.00420.95
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0080.00017.23
8.1.180.0050.00318.10
8.1.170.0080.00018.66
8.1.160.0070.00022.01
8.1.150.0070.00018.96
8.1.140.0050.00217.38
8.1.130.0000.00717.79
8.1.120.0070.00017.49
8.1.110.0030.00517.36
8.1.100.0070.00017.46
8.1.90.0050.00217.43
8.1.80.0000.00917.44
8.1.70.0040.00417.49
8.1.60.0000.00817.56
8.1.50.0000.00817.54
8.1.40.0080.00017.45
8.1.30.0030.00517.57
8.1.20.0020.00517.53
8.1.10.0000.00717.39
8.1.00.0000.00817.29
8.0.300.0000.00918.77
8.0.290.0040.00416.63
8.0.280.0000.00718.36
8.0.270.0000.00717.31
8.0.260.0000.00617.31
8.0.250.0050.00316.83
8.0.240.0040.00416.85
8.0.230.0030.00316.86
8.0.220.0040.00416.93
8.0.210.0000.00716.96
8.0.200.0030.00316.97
8.0.190.0060.00316.91
8.0.180.0000.00716.81
8.0.170.0000.00716.93
8.0.160.0070.00016.74
8.0.150.0050.00316.72
8.0.140.0100.00016.88
8.0.130.0040.00413.27
8.0.120.0000.00716.82
8.0.110.0000.00716.83
8.0.100.0030.00316.81
8.0.90.0000.00716.70
8.0.80.0060.00916.86
8.0.70.0000.00816.80
8.0.60.0070.00016.81
8.0.50.0040.00416.86
8.0.30.0070.01516.85
8.0.20.0130.01017.40
8.0.10.0060.00316.93
8.0.00.0050.01216.82
7.4.330.0000.00615.13
7.4.320.0000.00716.50
7.4.300.0000.00616.57
7.4.290.0000.00716.46
7.4.280.0040.00416.41
7.4.270.0000.00816.50
7.4.260.0090.00016.66
7.4.250.0070.00016.53
7.4.240.0040.00316.52
7.4.230.0070.00016.59
7.4.220.0100.00916.68
7.4.210.0040.01216.57
7.4.200.0070.00016.72
7.4.160.0110.00416.45
7.4.150.0080.01617.40
7.4.140.0080.01117.86
7.4.130.0150.01016.46
7.4.120.0140.00716.53
7.4.110.0070.01116.33
7.4.100.0150.01016.59
7.4.90.0090.00916.45
7.4.80.0140.00319.39
7.4.70.0040.01416.27
7.4.60.0130.00316.51
7.4.50.0040.00416.52
7.4.40.0060.01016.47
7.4.30.0090.00916.59
7.4.00.0030.01315.03
7.3.330.0000.00613.09
7.3.320.0030.00313.23
7.3.310.0000.00716.24
7.3.300.0040.00416.33
7.3.290.0080.00616.31
7.3.280.0090.00816.32
7.3.270.0080.00817.40
7.3.260.0090.00616.35
7.3.240.0160.00316.56
7.3.230.0060.01216.46
7.3.210.0070.01116.43
7.3.200.0090.01219.39
7.3.190.0100.00616.23
7.3.180.0030.01516.61
7.3.170.0130.00716.52
7.3.160.0040.01216.36
7.3.120.0140.00317.15
7.3.110.0060.00917.15
7.3.100.0030.01017.15
7.3.90.0000.01017.15
7.3.80.0090.00317.15
7.3.70.0070.00717.15
7.3.60.0030.01017.15
7.3.50.0070.00717.15
7.3.40.0030.00717.15
7.3.30.0090.00017.15
7.3.20.0070.01017.15
7.3.10.0060.00817.15
7.3.00.0030.00917.15
7.2.330.0100.00716.65
7.2.320.0120.00416.65
7.2.310.0070.01016.50
7.2.300.0060.01016.64
7.2.290.0070.01516.77
7.2.240.0060.00617.15
7.2.230.0060.00617.15
7.2.220.0030.01317.15
7.2.210.0090.00417.15
7.2.200.0080.00417.15
7.2.190.0000.01617.15
7.2.180.0040.00417.15
7.2.170.0030.00917.15
7.2.160.0100.00317.15
7.2.150.0040.01117.15
7.2.140.0130.00317.15
7.2.130.0070.00717.15
7.2.120.0000.01117.15
7.2.110.0100.00717.15
7.2.100.0100.00717.15
7.2.90.0000.01217.15
7.2.80.0120.00317.15
7.2.70.0000.01717.15
7.2.60.0050.00816.97
7.2.50.0000.01417.15
7.2.40.0080.00817.15
7.2.30.0070.00317.15
7.2.20.0070.01117.15
7.2.10.0060.00617.15
7.2.00.0030.01218.12
7.1.330.0100.00617.15
7.1.320.0100.00317.15
7.1.310.0040.01117.15
7.1.300.0000.01517.15
7.1.290.0040.00817.15
7.1.280.0090.00817.15
7.1.270.0070.00717.15
7.1.260.0060.00617.15
7.1.250.0130.00317.15
7.1.100.0030.01217.73
7.1.70.0000.01316.83
7.1.60.0030.00917.25
7.1.50.0090.00916.96
7.1.00.0000.08022.35
7.0.200.0050.00216.68
7.0.60.0000.04719.95
7.0.50.0100.05717.80
7.0.40.0130.05020.12
7.0.30.0300.08020.30
7.0.20.0370.07020.24
7.0.10.0070.08720.05
7.0.00.0070.07020.06
5.6.280.0000.07721.06
5.6.210.0100.08020.46
5.6.200.0030.04018.19
5.6.190.0130.08020.63
5.6.180.0400.06720.48
5.6.170.0130.04320.58
5.6.160.0070.08720.71
5.6.150.0070.05018.27
5.6.140.0070.05318.19
5.6.130.0170.07018.23
5.6.120.0170.03720.99
5.6.110.0130.07720.89
5.6.100.0070.08720.97
5.6.90.0130.08021.05
5.6.80.0130.06320.53
5.5.350.0230.04320.34
5.5.340.0000.04718.09
5.5.330.0130.08020.40
5.5.320.0230.04020.41
5.5.310.0200.07320.32
5.5.300.0130.06718.09
5.5.290.0100.03317.96
5.5.280.0070.05720.88
5.5.270.0030.07020.87
5.5.260.0070.08720.63
5.5.250.0170.07020.77
5.5.240.0100.07020.18
5.4.450.0570.05019.63
5.4.440.1000.04319.19
5.4.430.0200.04319.55
5.4.420.0200.04319.68
5.4.410.0070.08019.21
5.4.400.0130.06019.11
5.4.390.0170.04719.06
5.4.380.0100.05719.11
5.4.370.0170.05019.20
5.4.360.0100.05019.09
5.4.350.0100.06019.11
5.4.340.0030.05719.13
5.4.320.0130.05019.11
5.4.310.0070.05719.26
5.4.300.0200.05019.04
5.4.290.0030.05719.16
5.4.280.0100.05319.15
5.4.270.0100.05019.09
5.4.260.0070.05319.00
5.4.250.0170.04719.04
5.4.240.0070.05718.98
5.4.230.0070.05319.05
5.4.220.0130.05019.10
5.4.210.0130.05019.11
5.4.200.0070.05016.70
5.4.190.0100.05019.09
5.4.180.0030.05719.14
5.4.170.0030.06019.11
5.4.160.0200.04019.18
5.4.150.0100.05019.10
5.4.140.0070.05316.42
5.4.130.0170.05316.41
5.4.120.0200.03716.64
5.4.110.0100.04316.24
5.4.100.0000.06016.40
5.4.90.0100.04716.63
5.4.80.0130.04316.60
5.4.70.0000.05716.46
5.4.60.0100.05016.68
5.4.50.0230.03316.55
5.4.40.0130.04716.21
5.4.30.0200.03716.55
5.4.20.0000.05716.59
5.4.10.0000.05716.45
5.4.00.0130.04315.77
5.3.290.0130.05014.56
5.3.280.0130.04714.44
5.3.270.0100.05014.51
5.3.260.0130.04714.63
5.3.250.0000.06014.71
5.3.240.0000.05714.57
5.3.230.0130.04714.51
5.3.220.0070.05314.61
5.3.210.0070.05314.48
5.3.200.0070.05314.54
5.3.190.0130.04714.62
5.3.180.0070.05014.61
5.3.170.0070.05014.62
5.3.160.0130.04314.41
5.3.150.0070.05314.46
5.3.140.0070.05314.53
5.3.130.0130.05314.46
5.3.120.0200.04314.46
5.3.110.0130.05014.57
5.3.100.0070.05314.08
5.3.90.0100.05013.92
5.3.80.0030.05313.97
5.3.70.0130.05014.13
5.3.60.0130.04314.06
5.3.50.0100.05313.95
5.3.40.0070.05313.89
5.3.30.0130.04313.80
5.3.20.0170.04013.59
5.3.10.0070.04713.76
5.3.00.0200.03713.70
5.2.170.0100.04011.30
5.2.160.0030.04311.05
5.2.150.0070.06011.30
5.2.140.0130.05311.07
5.2.130.0030.05711.16
5.2.120.0030.04311.01
5.2.110.0030.04311.21
5.2.100.0070.04011.00
5.2.90.0170.03311.16
5.2.80.0100.04011.16
5.2.70.0070.04311.08
5.2.60.0030.04710.96
5.2.50.0000.04710.98
5.2.40.0100.03710.90
5.2.30.0130.03311.03
5.2.20.0100.03710.91
5.2.10.0100.03711.01
5.2.00.0130.03310.77
5.1.60.0070.03310.02
5.1.50.0070.0409.92
5.1.40.0030.0379.89
5.1.30.0100.03310.38
5.1.20.0130.03010.44
5.1.10.0030.0379.98
5.1.00.0070.0379.91
5.0.50.0070.0278.47
5.0.40.0100.0208.45
5.0.30.0070.0408.30
5.0.20.0030.0278.11
5.0.10.0100.0208.09
5.0.00.0000.0438.07
4.4.90.0070.0205.78
4.4.80.0000.0235.82
4.4.70.0000.0235.73
4.4.60.0030.0205.85
4.4.50.0070.0205.77
4.4.40.0030.0335.75
4.4.30.0070.0175.92
4.4.20.0070.0205.92
4.4.10.0100.0175.95
4.4.00.0000.0375.90
4.3.110.0030.0205.73
4.3.100.0000.0235.74
4.3.90.0000.0235.75
4.3.80.0070.0305.64
4.3.70.0070.0175.65
4.3.60.0070.0175.77
4.3.50.0030.0205.64
4.3.40.0000.0375.61
4.3.30.0000.0234.52
4.3.20.0030.0204.47
4.3.10.0030.0204.44
4.3.00.0130.0176.75

preferences:
82.71 ms | 400 KiB | 5 Q