3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar_val="134567,dogs,toys,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; echo "\n"; } }

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.0070.01318.55
8.3.60.0100.00316.50
8.3.50.0160.00617.42
8.3.40.0100.01018.84
8.3.30.0110.00418.68
8.3.20.0030.00618.91
8.3.10.0060.00318.48
8.3.00.0000.00919.50
8.2.190.0100.01018.04
8.2.180.0090.00618.09
8.2.170.0090.00622.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00420.96
8.2.110.0030.00619.12
8.2.100.0060.00617.79
8.2.90.0000.00817.61
8.2.80.0000.00917.97
8.2.70.0000.00917.93
8.2.60.0000.00817.97
8.2.50.0040.00418.10
8.2.40.0040.00419.33
8.2.30.0040.00419.23
8.2.20.0050.00517.73
8.2.10.0040.00417.80
8.2.00.0100.00017.68
8.1.280.0200.00025.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0000.01017.76
8.1.230.0110.00019.00
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.00817.23
8.1.190.0030.00517.22
8.1.180.0030.00518.10
8.1.170.0040.00418.59
8.1.160.0070.00018.93
8.1.150.0030.00418.95
8.1.140.0040.00417.45
8.1.130.0000.00717.78
8.1.120.0040.00717.43
8.1.110.0030.00617.33
8.1.100.0030.00317.39
8.1.90.0050.00217.41
8.1.80.0040.00417.49
8.1.70.0030.00617.32
8.1.60.0060.00617.47
8.1.50.0000.00717.46
8.1.40.0070.00317.52
8.1.30.0050.00317.63
8.1.20.0060.00317.55
8.1.10.0000.00817.45
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0050.00516.75
8.0.280.0030.00318.50
8.0.270.0030.00317.17
8.0.260.0050.00516.75
8.0.250.0030.00516.98
8.0.240.0000.00716.84
8.0.230.0040.00416.99
8.0.220.0070.00016.78
8.0.210.0050.00316.88
8.0.200.0000.00616.84
8.0.190.0020.00516.83
8.0.180.0060.00416.93
8.0.170.0030.00616.87
8.0.160.0000.00816.89
8.0.150.0020.00516.74
8.0.140.0000.00716.83
8.0.130.0060.00013.41
8.0.120.0040.00416.82
8.0.110.0040.00416.88
8.0.100.0000.00716.80
8.0.90.0050.00216.91
8.0.80.0000.01516.93
8.0.70.0000.00816.88
8.0.60.0000.00716.82
8.0.50.0020.00516.92
8.0.30.0070.01516.95
8.0.20.0160.00617.07
8.0.10.0040.00417.05
8.0.00.0050.01516.73
7.4.330.0020.00213.10
7.4.320.0030.00316.61
7.4.300.0070.00016.49
7.4.290.0000.00716.52
7.4.280.0000.00816.61
7.4.270.0060.00016.52
7.4.260.0000.00513.25
7.4.250.0070.00016.55
7.4.240.0070.00016.63
7.4.230.0030.00316.63
7.4.220.0030.01616.64
7.4.210.0070.01016.56
7.4.200.0040.00416.45
7.4.190.0080.00016.66
7.4.160.0080.00816.53
7.4.150.0100.00716.63
7.4.140.0110.00916.51
7.4.130.0090.00916.50
7.4.120.0110.00816.44
7.4.110.0030.01416.56
7.4.100.0100.00616.63
7.4.90.0120.00616.56
7.4.80.0120.00619.39
7.4.70.0030.01316.61
7.4.60.0100.00716.46
7.4.50.0060.00616.55
7.4.40.0030.01416.52
7.4.30.0110.00616.52
7.4.00.0050.01214.91
7.3.330.0000.00713.10
7.3.320.0000.00713.18
7.3.310.0000.00716.34
7.3.300.0070.00016.30
7.3.290.0070.01316.30
7.3.280.0070.01216.23
7.3.270.0140.00316.22
7.3.260.0060.01016.54
7.3.250.0150.00716.33
7.3.240.0070.01116.31
7.3.230.0160.00016.43
7.3.210.0160.00616.50
7.3.200.0130.00416.43
7.3.190.0130.00916.38
7.3.180.0030.01516.49
7.3.170.0130.00316.38
7.3.160.0080.00816.32
7.3.120.0080.00814.72
7.3.110.0070.00914.63
7.3.100.0070.00914.63
7.3.90.0060.00714.92
7.3.80.0090.00514.83
7.3.70.0080.00414.57
7.3.60.0050.00814.73
7.3.50.0090.00414.81
7.3.40.0090.00514.79
7.3.30.0070.00714.64
7.3.20.0050.01016.69
7.3.10.0100.00616.51
7.3.00.0050.00816.68
7.2.330.0040.01316.42
7.2.320.0130.00816.42
7.2.310.0120.00916.54
7.2.300.0060.01116.46
7.2.290.0120.00616.69
7.2.250.0110.00714.91
7.2.240.0070.00515.06
7.2.230.0090.00714.78
7.2.220.0050.00515.03
7.2.210.0090.00715.15
7.2.200.0060.00815.11
7.2.190.0020.01415.02
7.2.180.0030.01215.22
7.2.170.0100.00515.11
7.2.160.0120.00315.02
7.2.150.0100.00717.00
7.2.140.0080.00817.05
7.2.130.0030.01316.99
7.2.120.0060.00616.78
7.2.110.0060.00717.04
7.2.100.0050.01017.03
7.2.90.0050.01117.01
7.2.80.0050.01117.01
7.2.70.0030.01116.99
7.2.60.0090.00616.91
7.2.50.0050.01016.99
7.2.40.0060.00916.95
7.2.30.0100.00516.99
7.2.20.0030.00916.72
7.2.10.0020.01316.79
7.2.00.0030.01017.68
7.1.330.0070.00715.81
7.1.320.0050.00715.87
7.1.310.0080.00515.82
7.1.300.0030.01215.84
7.1.290.0070.00615.59
7.1.280.0030.01015.69
7.1.270.0050.01015.82
7.1.260.0050.01015.82
7.1.250.0050.00715.86
7.1.100.0000.01218.09
7.1.70.0000.00816.85
7.1.60.0150.00919.40
7.1.50.0210.00934.77
7.1.00.0100.07022.43
7.0.200.0040.00716.43
7.0.140.0030.07322.01
7.0.120.0070.06322.18
7.0.60.0070.07719.86
7.0.50.0030.07317.79
7.0.40.0070.08717.70
7.0.30.0130.05717.69
7.0.20.0100.08017.72
7.0.10.0170.04017.75
7.0.00.0100.07717.68
5.6.280.0000.07720.99
5.6.210.0030.08320.65
5.6.200.0130.06018.22
5.6.190.0030.06318.16
5.6.180.0100.07318.16
5.6.170.0070.07318.09
5.6.160.0100.06718.12
5.6.150.0070.08718.16
5.6.140.0100.05018.08
5.6.130.0030.08318.14
5.6.120.0000.05018.12
5.6.110.0000.04318.15
5.6.100.0030.04318.18
5.6.90.0070.03718.07
5.6.80.0100.07717.57
5.6.70.0070.07317.46
5.6.60.0070.04717.48
5.6.50.0070.07017.53
5.6.40.0100.07717.57
5.6.30.0130.05017.56
5.6.20.0100.06317.52
5.6.10.0000.06017.47
5.6.00.0070.06317.55
5.5.350.0400.06320.39
5.5.340.0130.06317.91
5.5.330.0070.03717.91
5.5.320.0070.07718.00
5.5.310.0030.08717.95
5.5.300.0030.04717.94
5.5.290.0030.04318.00
5.5.280.0130.03017.92
5.5.270.0170.07317.87
5.5.260.0030.06718.00
5.5.250.0030.04717.83
5.5.240.0130.07317.30
5.5.230.0030.08717.29
5.5.220.0130.07317.34
5.5.210.0070.03717.29
5.5.200.0170.07017.24
5.5.190.0070.03717.22
5.5.180.0030.08017.33
5.5.160.0070.05317.41
5.5.150.0030.08017.23
5.5.140.0070.07717.26
5.5.130.0100.07717.27
5.5.120.0070.04317.22
5.5.110.0100.07317.26
5.5.100.0100.04717.13
5.5.90.0130.07017.16
5.5.80.0030.04017.26
5.5.70.0100.04717.26
5.5.60.0170.07017.14
5.5.50.0100.07317.16
5.5.40.0070.04317.13
5.5.30.0030.08317.15
5.5.20.0130.07017.26
5.5.10.0170.07017.11
5.5.00.0030.07717.19
5.4.450.0070.04019.54
5.4.440.0000.04319.31
5.4.430.0030.07319.21
5.4.420.0030.06019.33
5.4.410.0000.04319.09
5.4.400.0230.06319.21
5.4.390.0130.07319.13
5.4.380.0070.06019.02
5.4.370.0070.07719.01
5.4.360.0070.07719.21
5.4.350.0130.07318.99
5.4.340.0000.08319.03
5.4.320.0030.07718.99
5.4.310.0000.05019.11
5.4.300.0070.05019.11
5.4.290.0070.07318.98
5.4.280.0100.04018.98
5.4.270.0030.03718.99
5.4.260.0130.04319.25
5.4.250.0000.05319.02
5.4.240.0070.04719.02
5.4.230.0100.07318.88
5.4.220.0070.05719.02
5.4.210.0030.06318.96
5.4.200.0000.07019.00
5.4.190.0070.03719.10
5.4.180.0030.06018.98
5.4.170.0100.07718.81
5.4.160.0100.06718.96
5.4.150.0070.08019.01
5.4.140.0100.06016.26
5.4.130.0100.04316.25
5.4.120.0130.07016.33
5.4.110.0030.04716.17
5.4.100.0070.08016.33
5.4.90.0070.07316.23
5.4.80.0100.06316.36
5.4.70.0070.04016.43
5.4.60.0130.07016.22
5.4.50.0030.05716.23
5.4.40.0070.07316.30
5.4.30.0130.05716.25
5.4.20.0070.07716.25
5.4.10.0100.07716.25
5.4.00.0100.06315.74
5.3.290.0030.05714.61
5.3.280.0130.07314.57
5.3.270.0070.06314.61
5.3.260.0030.06714.47
5.3.250.0000.08714.70
5.3.240.0000.05014.39
5.3.230.0030.08314.54
5.3.220.0130.06014.54
5.3.210.0100.03314.57
5.3.200.0030.03714.66
5.3.190.0000.07314.52
5.3.180.0030.07014.52
5.3.170.0100.04714.49
5.3.160.0070.07314.36
5.3.150.0100.07014.40
5.3.140.0070.06714.51
5.3.130.0030.06714.51
5.3.120.0070.05714.64
5.3.110.0170.07314.53
5.3.100.0070.07014.01
5.3.90.0100.04013.96
5.3.80.0170.06313.99
5.3.70.0070.05313.93
5.3.60.0030.07313.86
5.3.50.0030.07313.93
5.3.40.0000.05713.92
5.3.30.0070.06313.69
5.3.20.0130.03313.66
5.3.10.0100.06713.63
5.3.00.0000.07713.41
5.2.170.0130.05011.11
5.2.160.0070.05310.98
5.2.150.0000.04011.12
5.2.140.0030.07011.11
5.2.130.0030.04011.05
5.2.120.0030.06710.94
5.2.110.0070.06010.91
5.2.100.0100.05710.93
5.2.90.0070.06310.89
5.2.80.0100.05010.93
5.2.70.0070.06010.92
5.2.60.0000.05711.09
5.2.50.0100.04010.93
5.2.40.0030.06310.95
5.2.30.0130.05310.95
5.2.20.0030.05010.95
5.2.10.0070.04711.01
5.2.00.0130.03710.73
5.1.60.0070.04710.01
5.1.50.0070.0409.94
5.1.40.0000.0609.91
5.1.30.0030.06010.37
5.1.20.0000.05010.25
5.1.10.0100.05010.24
5.1.00.0100.05310.06
5.0.50.0070.0438.52
5.0.40.0100.0408.44
5.0.30.0070.0608.22
5.0.20.0030.0478.05
5.0.10.0030.0438.14
5.0.00.0030.0678.16
4.4.90.0000.0377.84
4.4.80.0000.0307.84
4.4.70.0030.0377.84
4.4.60.0000.0337.84
4.4.50.0000.0237.84
4.4.40.0000.0437.84
4.4.30.0030.0307.84
4.4.20.0000.0377.84
4.4.10.0000.0407.84
4.4.00.0030.0577.84
4.3.110.0070.0307.84
4.3.100.0070.0237.84
4.3.90.0070.0307.84
4.3.80.0030.0577.84
4.3.70.0030.0337.84
4.3.60.0070.0177.84
4.3.50.0000.0337.84
4.3.40.0100.0477.84
4.3.30.0030.0307.84
4.3.20.0070.0307.84
4.3.10.0030.0337.84
4.3.00.0030.0237.84

preferences:
46.3 ms | 401 KiB | 5 Q