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 } } //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: \n"; foreach ($arrayIdsDifferent as $indexDifferent => $currentIdDifferent) { $output = 'difference ' . ($indexDifferent + 1) . ': '; $output .= 'val = ' . $arrayVal[$currentIdDifferent]; $output .= 'url = ' . $arrayUrl[$currentIdDifferent]; echo $output; } }

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.0160.00316.88
8.3.50.0120.00617.46
8.3.40.0050.01018.61
8.3.30.0070.00718.51
8.3.20.0000.00818.73
8.3.10.0050.00318.88
8.3.00.0090.00019.25
8.2.180.0120.00316.38
8.2.170.0090.00622.96
8.2.160.0120.00820.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.89
8.2.110.0030.00721.12
8.2.100.0060.00617.91
8.2.90.0050.00319.21
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0000.01017.93
8.2.50.0030.00518.10
8.2.40.0060.00318.13
8.2.30.0060.00318.17
8.2.20.0060.00317.72
8.2.10.0000.00717.66
8.2.00.0070.00317.84
8.1.280.0140.00425.92
8.1.270.0040.00424.66
8.1.260.0060.00926.35
8.1.250.0080.00028.09
8.1.240.0060.00323.84
8.1.230.0040.00717.64
8.1.220.0000.00917.79
8.1.210.0030.00618.77
8.1.200.0090.00017.35
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0000.00718.86
8.1.160.0070.00018.88
8.1.150.0000.00718.54
8.1.140.0080.00017.43
8.1.130.0030.00317.74
8.1.120.0040.00417.37
8.1.110.0000.00817.46
8.1.100.0040.00417.37
8.1.90.0000.00717.47
8.1.80.0000.00717.39
8.1.70.0040.00417.38
8.1.60.0020.00717.46
8.1.50.0030.00517.42
8.1.40.0060.00317.39
8.1.30.0040.00417.47
8.1.20.0040.00417.55
8.1.10.0040.00417.63
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0000.00718.44
8.0.270.0050.00317.27
8.0.260.0030.00316.77
8.0.250.0000.00716.96
8.0.240.0000.00716.84
8.0.230.0000.00716.96
8.0.220.0070.00016.80
8.0.210.0040.00416.82
8.0.200.0000.00716.99
8.0.190.0040.00316.92
8.0.180.0050.00316.74
8.0.170.0000.01016.94
8.0.160.0050.00216.80
8.0.150.0040.00416.79
8.0.140.0000.00816.75
8.0.130.0060.00013.33
8.0.120.0000.00816.80
8.0.110.0000.00716.93
8.0.100.0050.00316.70
8.0.90.0000.00716.92
8.0.80.0100.00716.87
8.0.70.0030.00516.84
8.0.60.0050.00316.75
8.0.50.0040.00416.93
8.0.30.0080.01217.23
8.0.20.0160.00617.08
8.0.10.0040.00416.98
8.0.00.0100.01216.86
7.4.330.0000.00512.89
7.4.320.0000.00616.45
7.4.300.0030.00316.51
7.4.290.0070.00016.49
7.4.280.0070.00016.51
7.4.270.0070.00016.48
7.4.260.0000.00513.30
7.4.250.0040.00416.48
7.4.240.0020.00516.47
7.4.230.0000.00716.34
7.4.220.0120.00616.59
7.4.210.0100.00416.57
7.4.200.0000.00716.55
7.4.190.0070.00016.41
7.4.160.0060.01016.49
7.4.150.0100.00716.46
7.4.140.0100.00916.41
7.4.130.0090.00916.53
7.4.120.0080.01016.42
7.4.110.0060.01516.36
7.4.100.0060.01016.42
7.4.90.0140.00316.65
7.4.80.0080.00819.39
7.4.70.0040.01216.59
7.4.60.0090.00616.47
7.4.50.0090.00316.46
7.4.40.0090.00916.49
7.4.30.0030.01216.53
7.4.00.0080.01114.85
7.3.330.0070.00013.03
7.3.320.0040.00313.24
7.3.310.0070.00016.21
7.3.300.0030.00316.10
7.3.290.0000.01416.20
7.3.280.0130.00616.23
7.3.270.0060.00916.22
7.3.260.0080.00816.78
7.3.250.0120.01116.26
7.3.240.0100.00716.44
7.3.230.0140.00616.22
7.3.210.0090.00916.37
7.3.200.0030.01316.38
7.3.190.0130.01016.52
7.3.180.0100.00716.46
7.3.170.0130.00716.29
7.3.160.0100.01316.43
7.3.120.0090.00814.93
7.3.110.0040.01114.70
7.3.100.0060.01014.81
7.3.90.0020.01515.00
7.3.80.0030.01015.05
7.3.70.0070.00414.80
7.3.60.0100.00214.86
7.3.50.0040.01214.69
7.3.40.0090.00314.82
7.3.30.0030.01114.73
7.3.20.0050.01016.68
7.3.10.0050.00816.63
7.3.00.0060.00616.70
7.2.330.0150.00916.79
7.2.320.0120.00616.46
7.2.310.0070.01116.83
7.2.300.0060.01016.50
7.2.290.0000.01816.71
7.2.250.0020.01415.10
7.2.240.0100.00715.17
7.2.230.0100.00215.11
7.2.220.0080.00515.21
7.2.210.0100.00515.03
7.2.200.0040.01114.95
7.2.190.0040.01115.08
7.2.180.0080.00515.01
7.2.170.0050.00814.95
7.2.160.0070.01115.06
7.2.150.0000.01417.11
7.2.140.0070.00717.14
7.2.130.0070.00516.85
7.2.120.0050.01017.00
7.2.110.0050.00816.90
7.2.100.0060.00716.78
7.2.90.0060.00817.02
7.2.80.0090.00416.88
7.2.70.0060.00916.86
7.2.60.0080.00816.95
7.2.50.0050.00716.99
7.2.40.0100.00617.01
7.2.30.0130.00216.93
7.2.20.0060.01016.84
7.2.10.0060.00816.98
7.2.00.0030.01317.49
7.1.330.0050.01015.86
7.1.320.0080.00515.82
7.1.310.0090.00415.77
7.1.300.0050.00715.73
7.1.290.0090.00315.63
7.1.280.0030.01215.62
7.1.270.0050.00915.89
7.1.260.0040.00915.57
7.1.250.0070.00515.83
7.1.240.0000.00915.96
7.1.230.0000.01215.78
7.1.220.0000.01215.54
7.1.210.0000.01615.77
7.1.200.0070.00715.85
7.1.190.0000.01415.85
7.1.180.0000.01215.80
7.1.170.0040.01415.69
7.1.160.0000.01215.87
7.1.150.0030.01015.84
7.1.140.0130.00015.84
7.1.130.0110.00415.82
7.1.120.0100.00715.48
7.1.110.0000.01415.83
7.1.100.0090.00216.82
7.1.90.0090.00615.79
7.1.80.0000.01215.73
7.1.70.0050.00716.58
7.1.60.0080.01017.64
7.1.50.0180.00525.34
7.1.40.0040.01115.69
7.1.30.0030.00515.78
7.1.20.0040.00415.96
7.1.10.0030.01215.76
7.1.00.0060.03619.13
7.0.330.0040.01115.19
7.0.320.0070.00715.59
7.0.310.0000.01415.38
7.0.300.0070.00715.39
7.0.290.0030.01415.48
7.0.280.0000.01415.36
7.0.270.0090.00615.23
7.0.260.0110.00315.21
7.0.250.0110.00315.55
7.0.240.0060.00615.52
7.0.230.0070.00315.32
7.0.220.0000.01415.56
7.0.210.0070.00715.46
7.0.200.0070.00516.11
7.0.190.0030.01015.54
7.0.180.0030.00615.49
7.0.170.0030.01015.46
7.0.160.0030.00915.39
7.0.150.0000.01215.54
7.0.140.0040.04018.69
7.0.130.0040.01115.57
7.0.120.0030.03718.78
7.0.110.0080.00415.10
7.0.100.0000.01215.20
7.0.90.0070.00715.35
7.0.80.0070.00715.61
7.0.70.0040.01115.26
7.0.60.0030.05017.54
7.0.50.0100.04116.58
7.0.40.0100.04015.63
7.0.30.0060.04215.53
7.0.20.0070.04715.67
7.0.10.0050.04015.58
7.0.00.0050.04615.50
5.6.400.0040.00714.65
5.6.390.0060.00914.72
5.6.380.0070.00714.58
5.6.370.0040.01114.38
5.6.360.0000.01514.40
5.6.350.0030.01314.11
5.6.340.0040.01114.68
5.6.330.0070.01114.64
5.6.320.0030.01014.36
5.6.310.0000.01214.27
5.6.300.0000.01214.56
5.6.290.0080.00314.84
5.6.280.0040.04017.79
5.6.270.0040.00714.37
5.6.260.0080.00514.55
5.6.250.0030.01014.37
5.6.240.0000.01314.58
5.6.230.0070.00314.66
5.6.220.0080.00414.37
5.6.210.0070.03517.46
5.6.200.0030.04916.22
5.6.190.0050.04616.30
5.6.180.0050.03816.25
5.6.170.0060.04716.26
5.6.160.0050.03416.29
5.6.150.0070.02716.23
5.6.140.0030.02916.24
5.6.130.0080.04316.33
5.6.120.0070.03516.41
5.6.110.0030.04716.27
5.6.100.0070.03716.29
5.6.90.0110.02216.23
5.6.80.0140.03316.03
5.6.70.0120.04016.08
5.6.60.0080.03515.86
5.6.50.0070.04216.04
5.6.40.0100.04315.94
5.6.30.0040.03115.91
5.6.20.0090.03915.99
5.6.10.0090.03815.95
5.6.00.0070.04115.88
5.5.380.0000.01214.42
5.5.370.0090.00614.43
5.5.360.0100.00714.53
5.5.350.0200.03817.60
5.5.340.0000.03216.10
5.5.330.0090.03816.15
5.5.320.0030.03016.27
5.5.310.0110.04016.14
5.5.300.0070.03216.13
5.5.290.0080.04316.22
5.5.280.0050.04616.13
5.5.270.0110.04316.00
5.5.260.0110.04016.31
5.5.250.0070.04416.07
5.5.240.0030.04315.90
5.5.230.0090.03115.92
5.5.220.0080.04115.82
5.5.210.0130.02815.89
5.5.200.0080.04215.83
5.5.190.0090.04115.86
5.5.180.0050.02715.71
5.5.170.0040.00414.52
5.5.160.0050.04615.92
5.5.150.0030.03115.88
5.5.140.0100.03815.92
5.5.130.0070.02715.78
5.5.120.0030.02515.92
5.5.110.0070.03215.84
5.5.100.0070.03215.84
5.5.90.0050.03915.91
5.5.80.0030.03415.64
5.5.70.0050.02015.63
5.5.60.0020.02515.70
5.5.50.0020.02615.80
5.5.40.0060.02015.79
5.5.30.0020.02715.72
5.5.20.0050.02315.72
5.5.10.0070.02215.66
5.5.00.0000.02715.66
5.4.450.0070.04415.94
5.4.440.0030.04315.93
5.4.430.0080.04015.96
5.4.420.0130.03815.90
5.4.410.0070.03715.85
5.4.400.0020.02915.82
5.4.390.0110.03115.86
5.4.380.0080.03815.80
5.4.370.0100.03815.82
5.4.360.0060.04115.75
5.4.350.0000.04515.86
5.4.340.0070.03615.74
5.4.330.0030.00312.52
5.4.320.0050.03015.76
5.4.310.0050.04415.78
5.4.300.0060.02515.77
5.4.290.0080.02815.80
5.4.280.0060.02215.75
5.4.270.0110.03515.70
5.4.260.0070.02615.73
5.4.250.0100.03615.81
5.4.240.0040.02115.82
5.4.230.0030.02215.86
5.4.220.0080.02315.86
5.4.210.0030.02015.76
5.4.200.0020.02315.67
5.4.190.0030.02315.75
5.4.180.0050.02115.73
5.4.170.0040.02015.75
5.4.160.0060.02315.70
5.4.150.0030.03015.70
5.4.140.0030.02114.49
5.4.130.0040.02114.39
5.4.120.0020.02314.35
5.4.110.0030.02414.39
5.4.100.0070.01714.39
5.4.90.0060.02014.39
5.4.80.0060.01814.40
5.4.70.0070.01814.37
5.4.60.0050.02014.51
5.4.50.0050.02014.40
5.4.40.0020.02114.48
5.4.30.0040.02114.51
5.4.20.0100.01514.39
5.4.10.0030.02214.46
5.4.00.0060.01814.14
5.3.290.0030.04313.59
5.3.280.0050.02013.55
5.3.270.0040.02013.49
5.3.260.0020.02513.55
5.3.250.0080.01813.50
5.3.240.0030.02213.54
5.3.230.0020.02313.55
5.3.220.0020.02113.51
5.3.210.0070.02113.59
5.3.200.0000.02613.54
5.3.190.0020.02313.47
5.3.180.0070.02013.44
5.3.170.0040.01813.54
5.3.160.0030.02013.51
5.3.150.0020.02413.44
5.3.140.0080.01813.54
5.3.130.0020.02513.46
5.3.120.0050.02013.52
5.3.110.0080.02513.51
5.3.100.0020.02213.19
5.3.90.0020.02213.25
5.3.80.0090.01513.24
5.3.70.0020.02213.25
5.3.60.0060.01813.15
5.3.50.0030.01813.22
5.3.40.0030.02113.21
5.3.30.0030.02113.18
5.3.20.0050.03213.09
5.3.10.0030.02213.05
5.3.00.0050.03513.07
5.2.170.0030.02711.16
5.2.160.0070.02310.98
5.2.150.0100.02711.15
5.2.140.0030.06011.09
5.2.130.0100.05711.12
5.2.120.0130.05711.11
5.2.110.0000.04711.01
5.2.100.0030.07011.09
5.2.90.0100.05711.09
5.2.80.0100.06011.04
5.2.70.0030.03011.09
5.2.60.0030.06711.00
5.2.50.0070.05011.02
5.2.40.0070.04010.94
5.2.30.0130.05310.98
5.2.20.0030.05010.76
5.2.10.0100.05310.89
5.2.00.0030.04710.68
5.1.60.0070.0209.95
5.1.50.0030.03710.07
5.1.40.0070.0509.95
5.1.30.0030.04310.38
5.1.20.0030.03010.57
5.1.10.0030.06010.13
5.1.00.0100.05310.28
5.0.50.0030.0238.63
5.0.40.0070.0408.39
5.0.30.0030.0608.22
5.0.20.0030.0438.23
5.0.10.0070.0308.20
5.0.00.0000.0338.24
4.4.90.0000.0377.66
4.4.80.0030.0237.66
4.4.70.0030.0377.66
4.4.60.0000.0407.66
4.4.50.0070.0337.66
4.4.40.0000.0337.66
4.4.30.0000.0377.66
4.4.20.0000.0207.66
4.4.10.0000.0237.66
4.4.00.0000.0577.66
4.3.110.0030.0177.66
4.3.100.0070.0337.66
4.3.90.0000.0337.66
4.3.80.0030.0277.66
4.3.70.0070.0237.66
4.3.60.0030.0307.66
4.3.50.0030.0337.66
4.3.40.0030.0537.66
4.3.30.0000.0377.66
4.3.20.0030.0177.66
4.3.10.0030.0137.66
4.3.00.0070.0107.66

preferences:
45.78 ms | 401 KiB | 5 Q