3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('idproduct' => 1, 'amount' => 5), array('idproduct' => 2, 'amount' => 10), array('idproduct' => 3, 'amount' => 11), array('idproduct' => 4, 'amount' => 5) ); addOrOverride($arr, array('idproduct' => 4, 'amount' => 5)); function addOrOverride($arr, $newItem) { $filtered = array_filter($arr, function($item) use($newItem) { $item['idproduct'] != $newItem['idproduct']; }); var_dump($filtered); if($filtered) die('exists'); }

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.70.0170.00018.36
8.3.60.0100.01016.50
8.3.50.0150.00816.54
8.3.40.0040.01118.70
8.3.30.0140.00418.71
8.3.20.0040.01118.48
8.3.10.0030.00520.59
8.3.00.0080.00019.22
8.2.180.0110.00718.66
8.2.170.0140.00322.96
8.2.160.0120.00320.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00717.63
8.2.110.0060.00319.29
8.2.100.0040.01017.55
8.2.90.0040.00419.34
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0030.00518.11
8.2.30.0030.00618.13
8.2.20.0000.00717.63
8.2.10.0040.00417.61
8.2.00.0050.00517.76
8.1.280.0070.01025.92
8.1.270.0070.00724.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00522.06
8.1.230.0090.00319.01
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0040.00418.82
8.1.160.0020.00518.90
8.1.150.0050.00218.59
8.1.140.0000.00717.41
8.1.130.0030.00317.83
8.1.120.0080.00017.53
8.1.110.0040.00417.49
8.1.100.0000.00717.35
8.1.90.0040.00417.48
8.1.80.0040.00417.37
8.1.70.0000.00717.38
8.1.60.0060.00317.58
8.1.50.0000.00717.41
8.1.40.0000.00717.50
8.1.30.0040.00417.53
8.1.20.0050.00317.64
8.1.10.0000.00717.59
8.1.00.0040.00417.50
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0030.00318.43
8.0.270.0030.00317.16
8.0.260.0070.00016.73
8.0.250.0040.00416.96
8.0.240.0000.00816.93
8.0.230.0030.00316.96
8.0.220.0030.00316.92
8.0.210.0070.00016.87
8.0.200.0060.00016.85
8.0.190.0030.00616.99
8.0.180.0000.00716.93
8.0.170.0090.00016.89
8.0.160.0070.00016.89
8.0.150.0000.00816.72
8.0.140.0000.00716.92
8.0.130.0030.00313.27
8.0.120.0040.00416.73
8.0.110.0050.00316.74
8.0.100.0040.00416.86
8.0.90.0000.00816.72
8.0.80.0070.01016.87
8.0.70.0000.00716.97
8.0.60.0000.00716.89
8.0.50.0040.00416.99
8.0.30.0120.00617.21
8.0.20.0110.00817.06
8.0.10.0040.00416.88
8.0.00.0110.00916.70
7.4.330.0000.00513.01
7.4.320.0060.00016.50
7.4.300.0030.00316.38
7.4.290.0030.00316.56
7.4.280.0000.00816.59
7.4.270.0080.00016.55
7.4.260.0030.00213.20
7.4.250.0000.00716.63
7.4.240.0030.00316.45
7.4.230.0000.00816.41
7.4.220.0090.00916.58
7.4.210.0050.01016.54
7.4.200.0040.00416.57
7.4.190.0000.00716.61
7.4.160.0130.00316.54
7.4.150.0100.01016.40
7.4.140.0080.01416.46
7.4.130.0040.01316.43
7.4.120.0070.00916.54
7.4.110.0100.00716.52
7.4.100.0070.01116.55
7.4.90.0200.00316.55
7.4.80.0160.00619.39
7.4.70.0060.01016.57
7.4.60.0110.00916.21
7.4.50.0050.00316.21
7.4.40.0070.01116.65
7.4.30.0070.01016.36
7.4.00.0120.00314.76
7.3.330.0000.00613.37
7.3.320.0050.00013.32
7.3.310.0070.00016.25
7.3.300.0000.00716.22
7.3.290.0090.00616.21
7.3.280.0080.00816.30
7.3.270.0160.01016.46
7.3.260.0140.00716.53
7.3.250.0110.00816.35
7.3.240.0040.01816.28
7.3.230.0080.00916.57
7.3.210.0150.00616.55
7.3.200.0190.00016.41
7.3.190.0150.00716.35
7.3.180.0070.01716.36
7.3.170.0080.00816.35
7.3.160.0090.00916.59
7.3.120.0080.00614.84
7.3.00.0000.01116.43
7.2.330.0100.01016.71
7.2.320.0030.01316.66
7.2.310.0210.00016.73
7.2.300.0110.00416.60
7.2.290.0070.01016.72
7.2.130.0000.01616.96
7.2.120.0060.00616.92
7.2.110.0030.00717.09
7.2.100.0060.00916.71
7.2.90.0070.00716.59
7.2.80.0140.00016.98
7.2.70.0080.00416.81
7.2.60.0070.00717.00
7.2.50.0030.01017.03
7.2.40.0120.00416.74
7.2.30.0030.00716.86
7.2.20.0120.00316.77
7.2.10.0070.01016.84
7.2.00.0070.00517.97
7.1.250.0130.00615.79
7.1.240.0060.00615.75
7.1.230.0000.01515.48
7.1.220.0090.00615.81
7.1.210.0040.01215.72
7.1.200.0020.01215.79
7.1.190.0030.01015.77
7.1.180.0100.00315.57
7.1.170.0070.01015.66
7.1.160.0160.00015.86
7.1.150.0090.00615.32
7.1.140.0030.00615.73
7.1.130.0060.00315.79
7.1.120.0090.00615.75
7.1.110.0060.00315.95
7.1.100.0070.00716.85
7.1.90.0100.00715.66
7.1.80.0040.01115.91
7.1.70.0030.00816.33
7.1.60.0120.00717.55
7.1.50.0110.00616.29
7.1.40.0070.00715.85
7.1.30.0090.00915.76
7.1.20.0120.00315.63
7.1.10.0090.00915.48
7.1.00.0120.03319.09
7.0.330.0080.00814.99
7.0.320.0060.01215.33
7.0.310.0040.01115.14
7.0.300.0060.00615.13
7.0.290.0060.00915.20
7.0.280.0040.00415.32
7.0.270.0100.00415.17
7.0.260.0030.01015.23
7.0.250.0100.00715.32
7.0.240.0100.00315.26
7.0.230.0150.00315.35
7.0.220.0040.01115.37
7.0.210.0030.01015.31
7.0.200.0100.00814.94
7.0.190.0160.00015.36
7.0.180.0060.00315.29
7.0.170.0000.00815.17
7.0.160.0120.00315.30
7.0.150.0000.01415.21
7.0.140.0060.03718.53
7.0.130.0030.00915.39
7.0.120.0020.03818.76
7.0.110.0000.01015.24
7.0.100.0040.01115.26
7.0.90.0070.00315.21
7.0.80.0070.00415.30
7.0.70.0080.00615.24
7.0.60.0080.04317.71
7.0.50.0040.04416.48
7.0.40.0100.04215.47
7.0.30.0090.03915.47
7.0.20.0090.03915.43
7.0.10.0100.04015.60
7.0.00.0030.04215.48
5.6.380.0070.00714.18
5.6.370.0070.00313.66
5.6.360.0030.00514.19
5.6.350.0040.00713.98
5.6.340.0070.00414.14
5.6.330.0090.00614.40
5.6.320.0070.00714.20
5.6.310.0030.01013.86
5.6.300.0000.01414.19
5.6.290.0040.00813.95
5.6.280.0060.04017.53
5.6.270.0070.00714.21
5.6.260.0060.01014.08
5.6.250.0030.01214.02
5.6.240.0040.00814.06
5.6.230.0090.00614.20
5.6.220.0050.00914.11
5.6.210.0050.03617.26
5.6.200.0060.02816.36
5.6.190.0000.03516.27
5.6.180.0100.04116.29
5.6.170.0050.04616.08
5.6.160.0020.04016.01
5.6.150.0070.04116.14
5.6.140.0030.04116.38
5.6.130.0080.04716.30
5.6.120.0080.04316.01
5.6.110.0090.04016.23
5.6.100.0070.02916.18
5.6.90.0090.03916.05
5.6.80.0050.04315.78
5.6.70.0020.04815.86
5.6.60.0070.04715.77
5.6.50.0070.03715.82
5.6.40.0110.03615.67
5.6.30.0050.04315.74
5.6.20.0080.02615.83
5.6.10.0070.03615.70
5.6.00.0020.02615.82
5.5.380.0070.00010.95
5.5.370.0000.01111.04
5.5.360.0110.00010.90
5.5.350.0020.02715.64
5.5.340.0130.01514.54
5.5.330.0070.02414.52
5.5.320.0030.04014.54
5.5.310.0100.03814.45
5.5.300.0020.04814.44
5.5.290.0020.04314.47
5.5.280.0100.03714.49
5.5.270.0030.03714.46
5.5.260.0100.03014.42
5.5.250.0060.02314.51
5.5.240.0030.03514.25
5.5.230.0050.04214.19
5.5.220.0030.03414.13
5.5.210.0080.03514.20
5.5.200.0060.04014.23
5.5.190.0050.04314.22
5.5.180.0090.02314.12
5.5.170.0050.00210.99
5.5.160.0100.03614.20
5.5.150.0070.04014.10
5.5.140.0170.02514.12
5.5.130.0030.04214.21
5.5.120.0030.02714.09
5.5.110.0050.04214.13
5.5.100.0050.03314.06
5.5.90.0100.03214.11
5.5.80.0050.04414.19
5.5.70.0050.04014.22
5.5.60.0060.03814.12
5.5.50.0080.03214.05
5.5.40.0030.04214.24
5.5.30.0030.03914.16
5.5.20.0050.04314.13
5.5.10.0080.03614.09
5.5.00.0070.02014.11
5.4.450.0110.03515.28
5.4.440.0050.04215.23
5.4.430.0060.03515.20
5.4.420.0040.03615.16
5.4.410.0090.02515.08
5.4.400.0030.02915.05
5.4.390.0070.03815.08
5.4.380.0130.02314.93
5.4.370.0060.03615.01
5.4.360.0070.02815.08
5.4.350.0080.03515.02
5.4.340.0050.02615.07
5.4.330.0000.00810.90
5.4.320.0070.02615.10
5.4.310.0120.03714.96
5.4.300.0080.03815.12
5.4.290.0100.04015.05
5.4.280.0020.03015.17
5.4.270.0050.03714.99
5.4.260.0080.03615.09
5.4.250.0050.04114.97
5.4.240.0030.03515.12
5.4.230.0030.02914.92
5.4.220.0080.04014.97
5.4.210.0120.03415.10
5.4.200.0020.02615.15
5.4.190.0050.03914.96
5.4.180.0100.03515.01
5.4.170.0050.02814.95
5.4.160.0060.03715.07
5.4.150.0060.04114.92
5.4.140.0050.03813.75
5.4.130.0030.02313.64
5.4.120.0050.01813.69
5.4.110.0050.02213.69
5.4.100.0030.03013.72
5.4.90.0070.03713.74
5.4.80.0050.02613.74
5.4.70.0060.02313.76
5.4.60.0040.02213.68
5.4.50.0160.02813.59
5.4.40.0030.03413.77
5.4.30.0060.03613.77
5.4.20.0070.03813.74
5.4.10.0020.02513.79
5.4.00.0050.03813.38
5.3.290.0050.03012.81
5.3.280.0020.02712.76
5.3.270.0060.03212.78
5.3.260.0070.02312.68
5.3.250.0050.02712.76
5.3.240.0110.01912.78
5.3.230.0070.03812.77
5.3.220.0030.02312.76
5.3.210.0080.03512.75
5.3.200.0110.03512.76
5.3.190.0030.03812.79
5.3.180.0030.04012.76
5.3.170.0010.03912.77
5.3.160.0030.02612.75
5.3.150.0070.03712.76
5.3.140.0070.03212.73
5.3.130.0080.02812.75
5.3.120.0050.02212.76
5.3.110.0040.02512.76
5.3.100.0090.03012.49
5.3.90.0050.02012.47
5.3.80.0090.01712.40
5.3.70.0030.03512.45
5.3.60.0020.03412.40
5.3.50.0030.02912.44
5.3.40.0030.04012.44
5.3.30.0030.02712.43
5.3.20.0050.03712.29
5.3.10.0050.03512.22
5.3.00.0030.03712.29
5.2.170.0050.02511.06
5.2.160.0050.03011.06
5.2.150.0030.02311.02
5.2.140.0090.01711.05
5.2.130.0000.02311.11
5.2.120.0070.02810.99
5.2.110.0040.03310.95
5.2.100.0050.02510.93
5.2.90.0060.02310.99
5.2.80.0020.02410.99
5.2.70.0050.01510.94
5.2.60.0060.03111.02
5.2.50.0070.03010.90
5.2.40.0050.03211.05
5.2.30.0030.02810.96
5.2.20.0030.02310.95
5.2.10.0030.02310.88
5.2.00.0040.03010.83
5.1.60.0030.02910.47
5.1.50.0030.02710.49
5.1.40.0060.02510.44
5.1.30.0030.03310.60
5.1.20.0030.02510.64
5.1.10.0050.02810.48
5.1.00.0060.02610.45
5.0.50.0080.0239.76
5.0.40.0060.0109.68
5.0.30.0020.0309.59
5.0.20.0020.0139.65
5.0.10.0050.0159.50
5.0.00.0020.0339.56
4.4.90.0000.0119.43
4.4.80.0000.0189.43
4.4.70.0000.0149.43
4.4.60.0040.0179.43
4.4.50.0010.0099.43
4.4.40.0010.0259.43
4.4.30.0020.0159.43
4.4.20.0000.0169.43
4.4.10.0030.0169.43
4.4.00.0040.0179.43
4.3.110.0040.0159.43
4.3.100.0030.0159.43
4.3.90.0020.0089.43
4.3.80.0040.0179.43
4.3.70.0040.0179.43
4.3.60.0030.0189.43
4.3.50.0030.0189.43
4.3.40.0020.0289.43
4.3.30.0000.0199.43
4.3.20.0020.0149.43
4.3.10.0040.0089.43
4.3.00.0010.0099.43

preferences:
53.16 ms | 401 KiB | 5 Q