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: '; 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.0090.00616.75
8.3.50.0120.01016.53
8.3.40.0110.00418.59
8.3.30.0120.00318.69
8.3.20.0000.00818.73
8.3.10.0080.00018.83
8.3.00.0030.00619.51
8.2.180.0120.00318.16
8.2.170.0140.00322.96
8.2.160.0060.01221.18
8.2.150.0030.00325.66
8.2.140.0130.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00419.23
8.2.110.0080.00320.89
8.2.100.0110.00017.78
8.2.90.0090.00019.47
8.2.80.0070.00019.23
8.2.70.0040.00417.50
8.2.60.0030.00517.80
8.2.50.0030.00518.07
8.2.40.0060.00318.34
8.2.30.0000.00817.98
8.2.20.0030.00517.59
8.2.10.0040.00417.81
8.2.00.0030.00617.75
8.1.280.0110.00425.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0060.00322.45
8.1.230.0040.00721.03
8.1.220.0030.00617.74
8.1.210.0080.00018.79
8.1.200.0030.00817.13
8.1.190.0000.00917.53
8.1.180.0040.00418.10
8.1.170.0040.00418.65
8.1.160.0050.00318.79
8.1.150.0040.00418.63
8.1.140.0040.00417.46
8.1.130.0000.00717.73
8.1.120.0000.00817.51
8.1.110.0000.00817.45
8.1.100.0020.00517.45
8.1.90.0000.00817.39
8.1.80.0050.00217.51
8.1.70.0000.00817.41
8.1.60.0000.00717.50
8.1.50.0000.00717.41
8.1.40.0000.00817.46
8.1.30.0040.00417.60
8.1.20.0050.00217.58
8.1.10.0040.00417.53
8.1.00.0000.00817.55
8.0.300.0070.00019.86
8.0.290.0080.00016.63
8.0.280.0030.00318.45
8.0.270.0000.00717.13
8.0.260.0000.00816.73
8.0.250.0040.00416.91
8.0.240.0000.00716.87
8.0.230.0000.00716.92
8.0.220.0030.00316.81
8.0.210.0030.00316.82
8.0.200.0000.00816.95
8.0.190.0070.00016.96
8.0.180.0040.00416.80
8.0.170.0030.00616.89
8.0.160.0000.00716.92
8.0.150.0000.00816.79
8.0.140.0060.00216.85
8.0.130.0050.00013.31
8.0.120.0040.00416.87
8.0.110.0000.00716.91
8.0.100.0000.00716.95
8.0.90.0040.00416.72
8.0.80.0000.01416.82
8.0.70.0000.00716.99
8.0.60.0050.00316.87
8.0.50.0050.00217.00
8.0.30.0140.01117.01
8.0.20.0100.00916.97
8.0.10.0070.00016.94
8.0.00.0160.00816.64
7.4.330.0030.00313.04
7.4.320.0070.00016.65
7.4.300.0000.00616.63
7.4.290.0070.00016.51
7.4.280.0040.00416.45
7.4.270.0000.00716.58
7.4.260.0050.00013.29
7.4.250.0040.00416.61
7.4.240.0020.00616.51
7.4.230.0030.00316.53
7.4.220.0140.01116.65
7.4.210.0070.00816.60
7.4.200.0030.00316.70
7.4.190.0080.00016.69
7.4.160.0100.00616.47
7.4.150.0150.00616.61
7.4.140.0150.00516.59
7.4.130.0040.01216.44
7.4.120.0080.00916.54
7.4.110.0120.00616.43
7.4.100.0100.00716.60
7.4.90.0130.00916.72
7.4.80.0130.00919.39
7.4.70.0090.00616.73
7.4.60.0030.01316.50
7.4.50.0090.00316.56
7.4.40.0080.00916.63
7.4.30.0110.00816.41
7.4.00.0040.00714.78
7.3.330.0000.00613.25
7.3.320.0000.00713.07
7.3.310.0030.00316.39
7.3.300.0000.00716.21
7.3.290.0110.00916.35
7.3.280.0050.01216.31
7.3.270.0090.00916.39
7.3.260.0140.01116.42
7.3.250.0120.01016.51
7.3.240.0210.00316.71
7.3.230.0000.01716.46
7.3.210.0100.00616.43
7.3.200.0060.01016.56
7.3.190.0090.01216.43
7.3.180.0000.01616.50
7.3.170.0030.01216.39
7.3.160.0030.01316.49
7.3.120.0060.00615.08
7.3.10.0000.01116.64
7.3.00.0090.00316.57
7.2.330.0070.01016.80
7.2.320.0070.01116.57
7.2.310.0060.01216.61
7.2.300.0150.00916.81
7.2.290.0030.01316.83
7.2.130.0080.00416.63
7.2.120.0060.00317.01
7.2.110.0070.00316.98
7.2.100.0040.00416.98
7.2.90.0040.00816.99
7.2.80.0080.00516.73
7.2.70.0030.01016.84
7.2.60.0060.00616.91
7.2.50.0060.00917.07
7.2.40.0040.01116.68
7.2.30.0110.00717.15
7.2.20.0080.00416.80
7.2.10.0070.00716.92
7.2.00.0040.00716.78
7.1.250.0090.00615.64
7.1.200.0030.00915.97
7.1.100.0030.01418.39
7.1.70.0030.00717.38
7.1.60.0070.01719.40
7.1.50.0110.01117.02
7.1.00.0070.07322.45
7.0.200.0030.00916.78
7.0.140.0030.07322.15
7.0.120.0030.07322.05
7.0.60.0200.07019.93
7.0.50.0100.07317.89
7.0.40.0100.06717.66
7.0.30.0070.08017.69
7.0.20.0000.08317.65
7.0.10.0100.08017.69
7.0.00.0070.08317.68
5.6.280.0000.07720.86
5.6.210.0170.06320.71
5.6.200.0030.05018.23
5.6.190.0170.07318.18
5.6.180.0100.07718.17
5.6.170.0030.07718.18
5.6.160.0170.07018.15
5.6.150.0070.04318.21
5.6.140.0070.07718.22
5.6.130.0000.06018.18
5.6.120.0030.04318.12
5.6.110.0070.08018.16
5.6.100.0030.05018.16
5.6.90.0100.06018.13
5.6.80.0100.03717.53
5.6.70.0130.03317.54
5.6.60.0100.04717.48
5.6.50.0130.06717.60
5.6.40.0100.07317.48
5.6.30.0070.05717.51
5.6.20.0100.07317.56
5.6.10.0070.06317.52
5.6.00.0130.07017.46
5.5.350.0070.08020.41
5.5.340.0030.05017.92
5.5.330.0100.05718.02
5.5.320.0130.04318.02
5.5.310.0070.08317.92
5.5.300.0070.08017.98
5.5.290.0170.07018.02
5.5.280.0100.08017.91
5.5.270.0100.07717.95
5.5.260.0100.03717.99
5.5.250.0030.06317.73
5.5.240.0030.04017.34
5.5.230.0000.05717.33
5.5.220.0030.05717.32
5.5.210.0030.06317.27
5.5.200.0130.04717.26
5.5.190.0000.05317.27
5.5.180.0070.07717.22
5.5.160.0100.04317.33
5.5.150.0070.04317.37
5.5.140.0030.04317.33
5.5.130.0100.07717.36
5.5.120.0130.07317.22
5.5.110.0070.06717.31
5.5.100.0130.05317.14
5.5.90.0000.05317.16
5.5.80.0030.06717.16
5.5.70.0000.04317.16
5.5.60.0070.04317.18
5.5.50.0030.06317.16
5.5.40.0030.06017.16
5.5.30.0170.05317.22
5.5.20.0100.07317.22
5.5.10.0130.06717.21
5.5.00.0130.07017.21
5.4.450.0130.07719.41
5.4.440.0070.04019.44
5.4.430.0170.06719.30
5.4.420.0100.07719.41
5.4.410.0130.06719.40
5.4.400.0130.06019.21
5.4.390.0030.05318.98
5.4.380.0070.03718.98
5.4.370.0070.05719.07
5.4.360.0070.04719.07
5.4.350.0070.07719.13
5.4.340.0070.07719.01
5.4.320.0000.08018.99
5.4.310.0070.07319.03
5.4.300.0070.03719.07
5.4.290.0100.07719.02
5.4.280.0070.07019.09
5.4.270.0070.07718.79
5.4.260.0030.05019.20
5.4.250.0170.06718.98
5.4.240.0100.04719.07
5.4.230.0100.04019.12
5.4.220.0100.07719.03
5.4.210.0030.07318.98
5.4.200.0030.07718.98
5.4.190.0100.06019.19
5.4.180.0100.06719.23
5.4.170.0070.05018.81
5.4.160.0100.07719.07
5.4.150.0070.06719.10
5.4.140.0070.07316.30
5.4.130.0100.07316.23
5.4.120.0030.07316.28
5.4.110.0170.06316.27
5.4.100.0130.06716.33
5.4.90.0030.04016.27
5.4.80.0030.07716.25
5.4.70.0130.05016.41
5.4.60.0070.07016.39
5.4.50.0100.06016.50
5.4.40.0100.04016.30
5.4.30.0030.06016.25
5.4.20.0030.03716.34
5.4.10.0000.05016.25
5.4.00.0070.04715.78
5.3.290.0000.05714.53
5.3.280.0070.03714.60
5.3.270.0070.08014.56
5.3.260.0030.06314.59
5.3.250.0100.07014.55
5.3.240.0070.08014.39
5.3.230.0130.07014.58
5.3.220.0000.05714.55
5.3.210.0070.07714.66
5.3.200.0100.07014.49
5.3.190.0070.03714.53
5.3.180.0070.05314.49
5.3.170.0100.05714.51
5.3.160.0070.07314.53
5.3.150.0130.06014.42
5.3.140.0100.05014.39
5.3.130.0000.05014.39
5.3.120.0100.07714.50
5.3.110.0100.03714.52
5.3.100.0030.07714.01
5.3.90.0030.03713.98
5.3.80.0070.03313.97
5.3.70.0130.07313.80
5.3.60.0030.08013.77
5.3.50.0130.04314.03
5.3.40.0070.05013.93
5.3.30.0070.06713.69
5.3.20.0030.07713.78
5.3.10.0030.04713.74
5.3.00.0070.06713.62
5.2.170.0130.03011.09
5.2.160.0100.05011.19
5.2.150.0000.06311.05
5.2.140.0000.06711.18
5.2.130.0130.05711.01
5.2.120.0030.04711.07
5.2.110.0170.05011.10
5.2.100.0000.07011.07
5.2.90.0070.06011.11
5.2.80.0070.06011.02
5.2.70.0030.06011.07
5.2.60.0070.05310.91
5.2.50.0070.05011.01
5.2.40.0030.04710.97
5.2.30.0030.04310.94
5.2.20.0070.03010.94
5.2.10.0030.03010.85
5.2.00.0070.05710.71
5.1.60.0070.0279.98
5.1.50.0030.05010.05
5.1.40.0130.0309.98
5.1.30.0000.05010.33
5.1.20.0070.03310.45
5.1.10.0030.04710.15
5.1.00.0100.04710.17
5.0.50.0000.0478.86
5.0.40.0030.0438.86
5.0.30.0000.0478.86
5.0.20.0070.0378.86
5.0.10.0070.0308.86
5.0.00.0000.0408.86
4.4.90.0030.0338.86
4.4.80.0030.0308.86
4.4.70.0000.0178.86
4.4.60.0070.0108.86
4.4.50.0000.0338.86
4.4.40.0030.0438.86
4.4.30.0000.0308.86
4.4.20.0030.0308.86
4.4.10.0000.0338.86
4.4.00.0030.0608.86
4.3.110.0030.0308.86
4.3.100.0030.0208.86
4.3.90.0000.0378.86
4.3.80.0030.0338.86
4.3.70.0030.0138.86
4.3.60.0000.0378.86
4.3.50.0030.0338.86
4.3.40.0030.0478.86
4.3.30.0000.0278.86
4.3.20.0030.0208.86
4.3.10.0030.0138.86
4.3.00.0000.0178.86

preferences:
45.42 ms | 401 KiB | 5 Q