3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ Array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 250, 'id_funcion' => 907, ), Array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 300, 'id_funcion' => 907, ), Array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 350, 'id_funcion' => 907, ), Array ( 'nombre_entrada' => '2 entradas x', 'precio_productor' => 400, 'id_funcion' => 907, ) ]; $array2 = [ Array ( 'nombre_entrada' => 'Entrada General', 'precio_productor' => 350, 'id_funcion' => 907, ), Array ( 'nombre_entrada' => '2 entradas x', 'precio_productor' => 400, 'id_funcion' => 907, ), ]; $newArray = []; foreach ($array2 as $item) { $newArray[serialize($item)] = $item; } // next - filter your first array: $filteredArray = array_filter( $array1, function($v) use ($newArray) { // here serialize `$v` and check if key // same as serialized `$v` exists in $newArray return !isset($newArray[serialize($v)]); } ); print_r($filteredArray);

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.5.00.0140.00719.89
8.4.150.0020.00014.05
8.4.140.0130.00917.56
8.4.130.0130.00719.47
8.4.120.0050.00322.44
8.4.110.0160.00418.79
8.4.100.0040.00518.84
8.4.90.0110.00820.52
8.4.80.0110.01020.42
8.4.70.0040.00617.89
8.4.60.0130.00718.62
8.4.50.0030.00618.79
8.4.40.0030.01619.48
8.4.30.0070.01120.34
8.4.20.0030.01620.61
8.4.10.0100.00717.72
8.3.280.0140.00618.57
8.3.270.0140.00516.43
8.3.260.0060.00316.61
8.3.250.0080.00717.33
8.3.240.0130.00616.87
8.3.230.0110.00816.66
8.3.220.0080.01019.11
8.3.210.0060.00216.61
8.3.200.0040.00416.66
8.3.190.0110.00817.16
8.3.180.0070.00317.22
8.3.170.0080.00618.82
8.3.160.0110.00716.98
8.3.150.0120.00617.00
8.3.140.0040.00418.87
8.3.130.0000.00818.58
8.3.120.0080.00020.61
8.3.110.0080.00016.75
8.3.100.0070.00424.06
8.3.90.0050.00326.77
8.3.80.0030.00916.75
8.3.70.0120.00616.75
8.3.60.0110.00418.30
8.3.50.0080.00721.96
8.3.40.0070.00718.73
8.3.30.0150.00418.55
8.3.20.0040.00721.93
8.3.10.0050.00220.33
8.3.00.0070.00022.43
8.2.290.0090.00922.14
8.2.280.0040.00518.45
8.2.270.0030.01417.46
8.2.260.0040.00418.86
8.2.250.0040.00416.59
8.2.240.0030.00617.18
8.2.230.0040.00420.94
8.2.220.0050.00337.54
8.2.210.0120.00326.77
8.2.200.0100.00016.63
8.2.190.0070.01016.58
8.2.180.0120.00325.92
8.2.170.0130.00618.95
8.2.160.0110.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00220.92
8.2.110.0030.00622.22
8.2.100.0100.00317.91
8.2.90.0040.00417.75
8.2.80.0000.00818.92
8.2.70.0080.00017.93
8.2.60.0030.00618.08
8.2.50.0000.00818.10
8.2.40.0080.00019.25
8.2.30.0040.00419.16
8.2.20.0040.00418.21
8.2.10.0040.00419.21
8.2.00.0040.00419.32
8.1.330.0110.00921.92
8.1.320.0090.00717.68
8.1.310.0040.00418.66
8.1.300.0120.00618.50
8.1.290.0030.00630.84
8.1.280.0040.01425.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0090.00022.04
8.1.230.0080.00317.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0050.00517.25
8.1.190.0000.00917.23
8.1.180.0030.00618.10
8.1.170.0080.00018.51
8.1.160.0000.00718.91
8.1.150.0000.00718.85
8.1.140.0040.00420.85
8.1.130.0030.00320.14
8.1.120.0050.00317.42
8.1.110.0070.00217.45
8.1.100.0040.00417.42
8.1.90.0050.00317.51
8.1.80.0040.00817.48
8.1.70.0090.00217.46
8.1.60.0050.00817.60
8.1.50.0110.00417.55
8.1.40.0070.00717.54
8.1.30.0110.00317.60
8.1.20.0090.00517.54
8.1.10.0080.00517.56
8.1.00.0120.00317.50
8.0.300.0000.00818.77
8.0.290.0080.00016.75
8.0.280.0030.00318.38
8.0.270.0030.00417.25
8.0.260.0060.00320.08
8.0.250.0070.00016.96
8.0.240.0060.00016.96
8.0.230.0070.00016.90
8.0.220.0110.00016.77
8.0.210.0040.00616.75
8.0.200.0080.00316.82
8.0.190.0060.00716.75
8.0.180.0060.00516.85
8.0.170.0080.00516.83
8.0.160.0060.00516.86
8.0.150.0050.00516.72
8.0.140.0090.00216.77
8.0.130.0060.00415.12
8.0.120.0080.00316.87
8.0.110.0070.00416.87
8.0.100.0050.00616.83
8.0.90.0060.00716.84
8.0.80.0090.00716.85
8.0.70.0100.00316.81
8.0.60.0100.00316.78
8.0.50.0070.00516.83
8.0.30.0140.00417.01
8.0.20.0110.01116.98
8.0.10.0080.00416.92
8.0.00.0080.01116.90
7.4.330.0030.00315.55
7.4.320.0030.00316.52
7.4.300.0030.00516.54
7.4.290.0090.00416.46
7.4.280.0080.00516.52
7.4.270.0070.00616.52
7.4.260.0080.00416.54
7.4.250.0090.00316.55
7.4.240.0050.00416.52
7.4.230.0090.00016.39
7.4.220.0090.00116.62
7.4.210.0110.00316.51
7.4.200.0090.00216.44
7.4.190.0150.00016.63
7.4.180.0050.00516.47
7.4.160.0130.00316.70
7.4.150.0070.00716.35
7.4.140.0100.00517.20
7.4.130.0050.01016.49
7.4.120.0100.00516.53
7.4.110.0080.00616.56
7.4.100.0020.01116.49
7.4.90.0060.00816.39
7.4.80.0100.00817.88
7.4.70.0090.00716.43
7.4.60.0080.00816.50
7.4.50.0050.01116.38
7.4.40.0090.00716.42
7.4.30.0090.00416.42
7.4.20.0040.00916.43
7.4.10.0050.01115.71
7.4.00.0060.00815.47
7.3.330.0090.00214.69
7.3.320.0060.00414.71
7.3.310.0050.00616.36
7.3.300.0080.00316.29
7.3.290.0080.00716.34
7.3.280.0050.01116.41
7.3.270.0100.00516.16
7.3.260.0100.00816.49
7.3.250.0000.01516.25
7.3.240.0070.00716.34
7.3.230.0140.00516.38
7.3.220.0120.00416.32
7.3.210.0100.00716.43
7.3.200.0130.00516.30
7.3.190.0090.00716.38
7.3.180.0120.00316.28
7.3.170.0120.00316.35
7.3.160.0110.00516.47
7.3.150.0140.00016.34
7.3.140.0080.00816.37
7.3.130.0080.00915.56
7.3.120.0080.00815.62
7.3.110.0120.00615.45
7.3.100.0090.00515.59
7.3.90.0060.00615.48
7.3.80.0090.00515.50
7.3.70.0060.00715.24
7.3.60.0060.00715.36
7.3.50.0070.00515.32
7.3.40.0070.00815.35
7.3.30.0050.01015.42
7.3.20.0120.00516.62
7.3.10.0110.00516.54
7.3.00.0080.00916.57
7.2.340.0110.00416.40
7.2.330.0110.00616.58
7.2.320.0070.00916.50
7.2.310.0120.00316.59
7.2.300.0040.01316.46
7.2.290.0080.00716.55
7.2.280.0120.00316.43
7.2.270.0130.00316.42
7.2.260.0090.00515.65
7.2.250.0090.00615.57
7.2.240.0070.00715.57
7.2.230.0090.00815.59
7.2.220.0110.00515.55
7.2.210.0080.00615.60
7.2.200.0090.00515.59
7.2.190.0070.00815.53
7.2.180.0080.00615.46
7.2.170.0090.00715.55
7.2.160.0110.00415.49
7.2.150.0120.00516.90
7.2.140.0100.00816.93
7.2.130.0110.00816.82
7.2.120.0100.00416.83
7.2.110.0110.00716.91
7.2.100.0100.00516.92
7.2.90.0090.00616.70
7.2.80.0090.00816.75
7.2.70.0070.00716.85
7.2.60.0150.00316.80
7.2.50.0110.00616.75
7.2.40.0130.00716.68
7.2.30.0080.00916.91
7.2.20.0100.00716.84
7.2.10.0140.00316.86
7.2.00.0120.00516.82
7.1.330.0070.00916.47
7.1.320.0060.00716.66
7.1.310.0060.00816.58
7.1.300.0100.00515.61
7.1.290.0050.01115.58
7.1.280.0110.00615.69
7.1.270.0100.00615.62
7.1.260.0090.00615.71
7.1.250.0130.00515.68
7.1.240.0130.00316.59
7.1.230.0070.00916.64
7.1.220.0100.00616.54
7.1.210.0090.00716.54
7.1.200.0120.00316.66
7.1.190.0080.00516.60
7.1.180.0090.00616.36
7.1.170.0100.00616.35
7.1.160.0120.00216.46
7.1.150.0090.00516.45
7.1.140.0090.00816.57
7.1.130.0080.00616.42
7.1.120.0100.00416.44
7.1.110.0070.00816.56
7.1.100.0090.00616.46
7.1.90.0100.00416.33
7.1.80.0100.00316.50
7.1.70.0120.00316.47
7.1.60.0110.00316.48
7.1.50.0110.00416.49
7.1.40.0130.00216.60
7.1.30.0060.01116.63
7.1.20.0110.00516.53
7.1.10.0130.00416.49
7.1.00.0110.00516.31

preferences:
35.19 ms | 403 KiB | 5 Q