3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar_val="134567,dogs,food,EEUU"; $ar_url="134567,dogs,toys,EEUU"; $arrayVal = explode($ar_val, ','); $arrayUrl = explode($ar_url, ','); $maxLength = max(sizeof($arrayVal), sizeof($arrayUrl)); $arrayIdsEqual = array(); $arrayIdsDifferent = array(); for ($i = 0; $i < $maxLength; $i++) { if (isset($arrayVal[$i]) && isset($arrayUrl[$i])) { if ($arrayVal[$i] == $arrayUrl[$i]) { $arrayIdsEqual[] = $i; } else { $arrayIdsDifferent[] = $i; } } else { //you arrive here if you have 2 arrays that don't have the same size / sme number of variables } } print_r($arrayIdsDifferent); //assuming your 2 arrays ALWAYS have the same size, you can use the following logic if (empty($arrayIdsDifferent)) { echo '2 arrays are the same'; } else { echo 'Differences: '; foreach ($arrayIdsDifferent as $indexDifferent => $currentIdDifferent) { $output = 'difference ' . $indexDifferent + 1 . ': '; $output .= 'val = ' . $arrayVal[$currentIdDifferent]; $output .= 'url = ' . $arrayUrl[$currentIdDifferent]; } }

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.0070.00716.63
8.3.50.0110.00618.29
8.3.40.0100.00718.79
8.3.30.0140.00718.84
8.3.20.0000.00818.90
8.3.10.0000.00920.52
8.3.00.0030.00519.38
8.2.180.0090.00916.75
8.2.170.0000.01422.96
8.2.160.0140.00421.12
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00621.13
8.2.110.0090.00019.27
8.2.100.0060.00617.78
8.2.90.0000.00817.63
8.2.80.0000.01017.97
8.2.70.0030.00517.93
8.2.60.0040.00418.03
8.2.50.0030.00618.10
8.2.40.0000.01020.57
8.2.30.0000.00717.99
8.2.20.0030.00617.71
8.2.10.0080.00017.63
8.2.00.0030.00617.79
8.1.280.0100.00725.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0090.00317.36
8.1.230.0110.00017.83
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0090.00316.88
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0030.00518.82
8.1.150.0000.00718.64
8.1.140.0040.00417.43
8.1.130.0030.00317.69
8.1.120.0030.00317.51
8.1.110.0000.00717.46
8.1.100.0040.00417.50
8.1.90.0070.00017.38
8.1.80.0040.00417.43
8.1.70.0040.00417.33
8.1.60.0000.00817.47
8.1.50.0000.00817.36
8.1.40.0040.00417.53
8.1.30.0020.00517.54
8.1.20.0000.00717.63
8.1.10.0040.00417.44
8.1.00.0080.00017.52
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0020.00517.27
8.0.260.0030.00316.84
8.0.250.0040.00416.98
8.0.240.0000.00716.83
8.0.230.0030.00517.01
8.0.220.0000.00716.86
8.0.210.0030.00316.75
8.0.200.0030.00316.94
8.0.190.0030.00516.94
8.0.180.0040.00416.75
8.0.170.0000.00916.75
8.0.160.0030.00616.89
8.0.150.0030.00616.79
8.0.140.0000.00916.73
8.0.130.0000.00513.33
8.0.120.0000.00716.86
8.0.110.0000.00716.72
8.0.100.0070.00016.86
8.0.90.0000.00716.96
8.0.80.0070.00716.89
8.0.70.0040.00417.00
8.0.60.0070.00016.90
8.0.50.0040.00416.88
8.0.30.0110.00717.26
8.0.20.0120.00617.28
8.0.10.0030.00517.02
8.0.00.0110.00616.79
7.4.330.0050.00012.96
7.4.320.0000.00716.61
7.4.300.0040.00416.61
7.4.290.0000.00716.59
7.4.280.0070.00016.62
7.4.270.0040.00416.40
7.4.260.0000.00513.23
7.4.250.0040.00416.64
7.4.240.0020.00516.52
7.4.230.0000.00716.48
7.4.220.0100.01016.59
7.4.210.0090.00616.49
7.4.200.0000.00716.60
7.4.190.0050.00216.55
7.4.160.0080.00816.52
7.4.150.0070.01016.64
7.4.140.0110.00916.43
7.4.130.0160.00116.46
7.4.120.0050.01116.55
7.4.110.0130.01016.50
7.4.100.0070.01016.52
7.4.90.0090.00816.45
7.4.80.0170.00019.39
7.4.70.0140.00716.45
7.4.60.0060.01816.66
7.4.50.0040.00916.59
7.4.40.0100.00716.48
7.4.30.0120.00916.38
7.4.00.0060.01214.83
7.3.330.0030.00313.13
7.3.320.0000.00813.19
7.3.310.0040.00416.25
7.3.300.0070.00016.32
7.3.290.0120.00316.25
7.3.280.0110.00616.28
7.3.270.0120.00416.39
7.3.260.0140.00716.47
7.3.250.0110.00616.50
7.3.240.0030.01316.31
7.3.230.0110.00716.56
7.3.210.0080.00816.46
7.3.200.0130.00316.44
7.3.190.0000.01616.58
7.3.180.0060.01616.37
7.3.170.0040.01316.35
7.3.160.0100.00516.50
7.3.120.0030.01314.90
7.2.330.0030.02016.60
7.2.320.0110.01116.49
7.2.310.0030.01516.59
7.2.300.0080.00816.41
7.2.290.0160.00616.82
7.2.00.0040.00819.04
7.1.100.0060.00618.33
7.1.70.0000.00917.22
7.1.60.0030.02119.40
7.1.50.0070.01016.89
7.1.00.0030.04322.57
7.0.200.0130.00316.74
7.0.140.0030.07722.17
7.0.120.0070.06722.23
7.0.60.0070.04019.98
7.0.50.0100.08017.90
7.0.40.0070.07017.79
7.0.30.0070.07717.69
7.0.20.0100.08317.79
7.0.10.0100.07017.73
7.0.00.0130.05017.68
5.6.280.0030.07320.89
5.6.210.0170.07320.60
5.6.200.0030.08318.17
5.6.190.0070.08018.19
5.6.180.0100.04718.15
5.6.170.0100.07018.18
5.6.160.0130.04318.21
5.6.150.0100.07318.12
5.6.140.0100.06018.11
5.6.130.0270.06018.11
5.6.120.0070.05018.21
5.6.110.0000.05718.12
5.6.100.0070.08018.11
5.6.90.0070.07318.07
5.6.80.0030.06717.54
5.6.70.0170.06717.48
5.6.60.0000.07017.55
5.6.50.0100.07017.50
5.6.40.0030.07717.52
5.6.30.0000.04317.57
5.6.20.0030.08017.56
5.6.10.0130.07017.47
5.6.00.0030.06717.46
5.5.350.0300.05020.39
5.5.340.0100.08017.98
5.5.330.0030.06017.89
5.5.320.0030.08317.96
5.5.310.0100.06317.92
5.5.300.0100.03718.00
5.5.290.0030.04318.02
5.5.280.0130.05017.88
5.5.270.0070.05717.95
5.5.260.0170.07017.98
5.5.250.0000.06717.83
5.5.240.0030.08017.36
5.5.230.0100.07317.35
5.5.220.0130.04317.26
5.5.210.0070.04717.30
5.5.200.0070.07717.36
5.5.190.0030.04017.37
5.5.180.0030.04317.27
5.5.160.0100.05017.35
5.5.150.0070.07717.32
5.5.140.0030.05317.27
5.5.130.0170.06717.30
5.5.120.0070.07317.30
5.5.110.0100.04317.36
5.5.100.0100.06717.21
5.5.90.0100.04317.25
5.5.80.0000.06717.22
5.5.70.0070.07717.23
5.5.60.0070.07017.12
5.5.50.0100.07717.26
5.5.40.0070.07317.22
5.5.30.0100.08017.16
5.5.20.0070.06017.25
5.5.10.0030.08317.12
5.5.00.0130.07017.16
5.4.450.0070.06019.45
5.4.440.0100.05319.22
5.4.430.0030.04319.35
5.4.420.0000.04719.32
5.4.410.0000.05719.31
5.4.400.0070.07319.01
5.4.390.0100.07019.07
5.4.380.0070.04019.07
5.4.370.0030.05019.03
5.4.360.0100.07019.08
5.4.350.0030.04318.99
5.4.340.0030.05019.20
5.4.320.0030.07018.82
5.4.310.0030.05318.89
5.4.300.0130.07019.11
5.4.290.0070.06019.12
5.4.280.0000.08318.99
5.4.270.0070.04719.01
5.4.260.0100.07018.98
5.4.250.0230.04719.02
5.4.240.0100.07719.02
5.4.230.0100.07719.11
5.4.220.0070.07719.09
5.4.210.0230.06018.97
5.4.200.0070.07319.20
5.4.190.0100.07318.95
5.4.180.0070.05719.02
5.4.170.0000.05018.95
5.4.160.0070.06019.18
5.4.150.0100.05319.03
5.4.140.0100.04716.18
5.4.130.0070.03716.30
5.4.120.0130.03016.47
5.4.110.0100.06316.48
5.4.100.0000.07716.33
5.4.90.0100.03716.33
5.4.80.0030.03716.26
5.4.70.0070.03316.23
5.4.60.0070.03316.50
5.4.50.0000.07716.39
5.4.40.0030.07716.20
5.4.30.0070.07316.25
5.4.20.0000.07316.36
5.4.10.0100.04316.36
5.4.00.0000.05715.68
5.3.290.0170.06714.59
5.3.280.0070.04714.55
5.3.270.0100.03314.56
5.3.260.0070.07314.61
5.3.250.0000.07314.45
5.3.240.0000.04014.59
5.3.230.0000.05314.46
5.3.220.0070.06314.50
5.3.210.0130.06314.50
5.3.200.0100.05014.54
5.3.190.0070.06014.51
5.3.180.0030.04314.53
5.3.170.0030.03714.66
5.3.160.0130.04714.53
5.3.150.0000.04314.65
5.3.140.0170.07014.52
5.3.130.0070.07314.50
5.3.120.0070.07014.52
5.3.110.0100.03714.42
5.3.100.0100.05714.00
5.3.90.0030.05013.98
5.3.80.0100.06013.98
5.3.70.0130.07313.97
5.3.60.0000.07713.96
5.3.50.0070.05313.74
5.3.40.0130.06013.71
5.3.30.0100.06713.68
5.3.20.0130.03313.63
5.3.10.0100.06713.41
5.3.00.0070.05013.61
5.2.170.0030.06011.14
5.2.160.0030.06311.13
5.2.150.0100.03710.98
5.2.140.0070.03311.13
5.2.130.0000.05311.11
5.2.120.0070.04311.10
5.2.110.0030.03711.14
5.2.100.0070.06311.09
5.2.90.0100.05711.11
5.2.80.0030.05011.07
5.2.70.0030.05711.07
5.2.60.0030.06310.84
5.2.50.0100.05711.03
5.2.40.0000.06010.98
5.2.30.0030.04010.82
5.2.20.0130.05310.94
5.2.10.0000.06010.85
5.2.00.0100.05710.87
5.1.60.0070.05010.05
5.1.50.0030.04710.05
5.1.40.0030.05310.13
5.1.30.0070.04310.24
5.1.20.0000.06310.36
5.1.10.0030.05710.10
5.1.00.0070.05310.10
5.0.50.0000.0278.47
5.0.40.0070.0338.45
5.0.30.0000.0408.26
5.0.20.0070.0438.19
5.0.10.0070.0308.18
5.0.00.0070.0638.16
4.4.90.0030.0137.75
4.4.80.0000.0407.75
4.4.70.0030.0377.75
4.4.60.0030.0307.75
4.4.50.0100.0277.75
4.4.40.0000.0577.75
4.4.30.0000.0307.75
4.4.20.0000.0377.75
4.4.10.0030.0177.75
4.4.00.0070.0537.75
4.3.110.0000.0377.75
4.3.100.0070.0307.75
4.3.90.0000.0377.75
4.3.80.0000.0477.75
4.3.70.0000.0377.75
4.3.60.0070.0307.75
4.3.50.0030.0337.75
4.3.40.0030.0537.75
4.3.30.0000.0377.75
4.3.20.0030.0277.75
4.3.10.0000.0307.75
4.3.00.0000.0377.75

preferences:
42.61 ms | 401 KiB | 5 Q