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 .= '; '; $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.60.0090.00616.75
8.3.50.0130.00522.11
8.3.40.0070.00718.96
8.3.30.0140.00019.10
8.3.20.0040.00420.17
8.3.10.0060.00323.59
8.3.00.0080.00018.79
8.2.180.0120.00618.41
8.2.170.0110.00422.96
8.2.160.0070.01022.07
8.2.150.0120.00625.66
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0080.00021.13
8.2.110.0030.00622.10
8.2.100.0040.00720.36
8.2.90.0030.00518.34
8.2.80.0040.00419.09
8.2.70.0040.00418.05
8.2.60.0050.00317.93
8.2.50.0060.00318.10
8.2.40.0040.00420.20
8.2.30.0040.00418.32
8.2.20.0000.00817.66
8.2.10.0040.00418.18
8.2.00.0040.00417.75
8.1.280.0070.01425.92
8.1.270.0000.00723.99
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0100.00723.84
8.1.230.0060.00719.02
8.1.220.0000.00817.78
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0000.00817.11
8.1.180.0000.00718.10
8.1.170.0080.00018.59
8.1.160.0070.00021.94
8.1.150.0030.00518.60
8.1.140.0000.00717.39
8.1.130.0000.00717.45
8.1.120.0040.00417.49
8.1.110.0040.00417.29
8.1.100.0000.00717.39
8.1.90.0030.00417.46
8.1.80.0060.00317.44
8.1.70.0000.00717.33
8.1.60.0030.00617.62
8.1.50.0040.00417.52
8.1.40.0030.00717.41
8.1.30.0030.00517.62
8.1.20.0090.00017.63
8.1.10.0000.00817.47
8.1.00.0040.00417.38
8.0.300.0070.00019.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0030.00317.30
8.0.260.0030.00516.75
8.0.250.0000.00716.93
8.0.240.0040.00416.88
8.0.230.0040.00416.95
8.0.220.0030.00316.89
8.0.210.0070.00016.85
8.0.200.0000.00716.89
8.0.190.0030.00316.80
8.0.180.0070.00016.96
8.0.170.0030.00516.98
8.0.160.0000.00716.84
8.0.150.0030.00516.75
8.0.140.0040.00416.85
8.0.130.0040.00413.32
8.0.120.0080.00016.85
8.0.110.0040.00316.85
8.0.100.0040.00416.80
8.0.90.0000.00716.67
8.0.80.0030.01216.84
8.0.70.0040.00416.78
8.0.60.0040.00416.96
8.0.50.0020.00516.95
8.0.30.0130.00817.18
8.0.20.0090.00817.40
8.0.10.0040.00417.02
8.0.00.0110.00616.63
7.4.330.0000.00515.12
7.4.320.0000.00616.50
7.4.300.0000.00616.61
7.4.290.0030.00316.42
7.4.280.0030.00616.48
7.4.270.0000.00716.61
7.4.260.0030.00316.52
7.4.250.0030.00316.46
7.4.240.0020.00516.61
7.4.230.0030.00316.30
7.4.220.0120.00816.59
7.4.210.0070.00716.54
7.4.200.0070.00016.58
7.4.190.0060.00016.69
7.4.160.0090.00916.48
7.4.150.0100.00917.40
7.4.140.0110.01117.86
7.4.130.0070.01116.40
7.4.120.0040.01316.50
7.4.110.0100.00916.41
7.4.100.0070.01016.46
7.4.90.0070.01016.55
7.4.80.0110.01019.39
7.4.70.0090.00616.55
7.4.60.0160.00016.49
7.4.50.0080.00016.57
7.4.40.0070.01016.58
7.4.30.0080.00816.49
7.4.10.0000.01815.06
7.4.00.0100.00714.91
7.3.330.0000.00613.03
7.3.320.0000.00513.13
7.3.310.0000.00716.41
7.3.300.0040.00416.31
7.3.290.0060.00816.27
7.3.280.0100.00916.29
7.3.270.0080.00917.40
7.3.260.0140.01116.32
7.3.250.0060.01516.40
7.3.240.0100.00716.63
7.3.230.0160.00316.42
7.3.210.0130.00616.61
7.3.200.0120.00919.39
7.3.190.0100.00716.60
7.3.180.0160.00016.26
7.3.170.0090.00616.54
7.3.160.0100.00716.48
7.3.130.0160.00314.68
7.3.120.0060.01114.80
7.3.110.0040.01514.88
7.3.100.0060.00614.92
7.3.90.0070.00714.70
7.3.80.0090.00014.78
7.3.70.0060.00614.63
7.3.60.0060.00614.79
7.3.50.0100.00314.97
7.3.40.0100.00314.70
7.3.30.0000.01515.00
7.3.20.0060.00316.46
7.3.10.0060.01016.67
7.3.00.0070.01016.80
7.2.330.0110.00616.70
7.2.320.0140.00716.70
7.2.310.0120.00616.89
7.2.300.0100.00716.44
7.2.290.0150.00316.81
7.2.260.0130.00615.09
7.2.250.0040.00815.10
7.2.240.0030.01015.07
7.2.230.0000.01815.26
7.2.220.0040.01114.82
7.2.210.0030.01014.93
7.2.200.0000.01015.20
7.2.190.0070.00715.21
7.2.180.0070.00715.30
7.2.170.0040.01215.14
7.2.160.0030.01014.83
7.2.150.0100.00716.91
7.2.140.0070.01016.74
7.2.130.0070.01116.70
7.2.120.0100.00316.82
7.2.110.0040.01116.87
7.2.100.0030.01216.75
7.2.90.0060.00616.87
7.2.80.0000.01417.07
7.2.70.0060.00916.79
7.2.60.0040.00916.68
7.2.50.0040.01217.21
7.2.40.0040.01216.93
7.2.30.0040.01416.90
7.2.20.0030.01317.16
7.2.10.0060.01017.01
7.2.00.0110.00818.11
7.1.330.0090.00616.01
7.1.320.0000.01015.64
7.1.310.0040.01115.91
7.1.300.0060.00315.66
7.1.290.0040.01415.66
7.1.280.0040.00415.62
7.1.270.0000.00915.44
7.1.260.0080.00415.93
7.1.250.0030.01116.03
7.1.240.0100.00315.92
7.1.230.0070.00715.73
7.1.220.0110.00315.84
7.1.210.0000.01115.84
7.1.200.0090.00515.92
7.1.190.0120.00315.62
7.1.180.0100.00315.84
7.1.170.0080.00415.36
7.1.160.0030.01015.81
7.1.150.0000.01315.49
7.1.140.0030.01215.98
7.1.130.0000.01616.00
7.1.120.0070.00715.71
7.1.110.0060.00615.68
7.1.100.0010.01017.11
7.1.90.0000.01015.92
7.1.80.0040.01115.98
7.1.70.0050.00416.60
7.1.60.0080.01017.71
7.1.50.0080.00716.36
7.1.40.0070.00715.90
7.1.30.0030.01015.61
7.1.20.0030.00715.68
7.1.10.0110.00315.86
7.1.00.0070.03819.12
7.0.330.0040.00415.33
7.0.320.0060.01015.61
7.0.310.0030.01015.27
7.0.300.0080.00415.41
7.0.290.0030.01015.51
7.0.280.0060.01015.33
7.0.270.0040.01415.39
7.0.260.0060.00615.43
7.0.250.0070.00415.55
7.0.240.0090.00015.49
7.0.230.0000.01415.21
7.0.220.0000.01315.46
7.0.210.0080.00415.46
7.0.200.0040.00515.96
7.0.190.0000.01415.44
7.0.180.0000.01415.41
7.0.170.0030.00515.46
7.0.160.0040.01115.46
7.0.150.0050.00515.57
7.0.140.0050.03918.61
7.0.130.0040.01115.53
7.0.120.0060.00615.52
7.0.110.0040.00415.18
7.0.100.0050.00515.29
7.0.90.0080.00415.30
7.0.80.0030.00615.48
7.0.70.0050.04218.46
7.0.60.0010.05018.66
7.0.50.0020.03218.85
7.0.40.0040.04516.78
7.0.30.0050.03116.88
7.0.20.0080.04416.85
7.0.10.0070.04416.77
7.0.00.0020.03416.74
5.6.400.0040.01414.63
5.6.390.0000.01314.22
5.6.380.0030.01314.64
5.6.370.0120.00314.67
5.6.360.0110.00714.80
5.6.350.0030.01014.68
5.6.340.0030.01214.54
5.6.330.0100.01014.38
5.6.320.0080.00814.76
5.6.310.0030.00914.65
5.6.300.0030.00614.42
5.6.290.0080.00614.36
5.6.280.0030.03917.54
5.6.270.0100.00314.40
5.6.260.0120.00414.46
5.6.250.0070.00714.54
5.6.240.0030.01014.76
5.6.230.0100.00014.64
5.6.220.0060.04317.48
5.6.210.0080.04617.43
5.6.200.0100.03917.66
5.6.190.0060.04517.71
5.6.180.0040.03417.66
5.6.170.0080.02617.74
5.6.160.0040.03417.79
5.6.150.0150.03817.80
5.6.140.0080.03717.85
5.6.130.0000.03117.83
5.6.120.0060.02817.76
5.6.110.0080.02217.78
5.6.100.0020.03017.97
5.6.90.0030.03017.90
5.6.80.0100.03817.40
5.6.70.0070.02317.38
5.6.60.0020.02517.41
5.6.50.0040.02317.32
5.6.40.0090.02017.49
5.6.30.0070.02317.44
5.6.20.0010.02417.29
5.6.10.0060.02117.37
5.6.00.0050.02617.33
5.5.380.0040.01114.34
5.5.370.0070.00714.41
5.5.360.0090.04317.51
5.5.350.0080.04517.54
5.5.340.0020.03717.79
5.5.330.0020.04817.60
5.5.320.0030.04917.55
5.5.310.0020.03917.61
5.5.300.0080.02117.44
5.5.290.0020.03117.41
5.5.280.0030.02617.51
5.5.270.0070.02217.66
5.5.260.0050.03117.71
5.5.250.0060.02017.41
5.5.240.0100.02217.30
5.5.230.0040.02517.21
5.5.220.0030.02717.38
5.5.210.0030.02317.32
5.5.200.0080.02217.14
5.5.190.0030.02517.20
5.5.180.0080.01817.05
5.5.170.0040.01114.25
5.5.160.0030.02317.24
5.5.150.0030.02417.30
5.5.140.0060.02217.26
5.5.130.0030.03017.23
5.5.120.0050.02217.09
5.5.110.0020.02517.13
5.5.100.0050.02217.11
5.5.90.0040.02417.12
5.5.80.0020.02817.19
5.5.70.0030.02417.28
5.5.60.0030.02317.29
5.5.50.0030.03317.19
5.5.40.0030.02217.06
5.5.30.0050.02517.18
5.5.20.0070.02217.37
5.5.10.0050.02017.10
5.5.00.0040.01917.12
5.4.450.0020.02515.38
5.4.440.0020.02515.16
5.4.430.0060.02115.25
5.4.420.0050.02315.27
5.4.410.0030.02315.03
5.4.400.0080.03415.02
5.4.390.0060.04514.98
5.4.380.0080.01615.07
5.4.370.0070.02015.09
5.4.360.0050.02315.10
5.4.350.0040.02015.06
5.4.340.0020.02415.22
5.4.330.0030.00711.05
5.4.320.0020.02615.04
5.4.310.0080.02015.00
5.4.300.0020.02414.93
5.4.290.0080.01814.94
5.4.280.0090.01715.08
5.4.270.0090.02814.94
5.4.260.0000.02615.04
5.4.250.0060.01915.07
5.4.240.0020.02215.05
5.4.230.0020.02415.09
5.4.220.0060.02015.07
5.4.210.0020.02215.01
5.4.200.0000.02615.13
5.4.190.0040.02215.07
5.4.180.0020.02314.97
5.4.170.0040.03215.03
5.4.160.0060.01814.98
5.4.150.0060.02015.07
5.4.140.0060.01813.72
5.4.130.0060.03913.72
5.4.120.0030.03513.70
5.4.110.0020.03913.66
5.4.100.0000.03013.63
5.4.90.0050.02813.75
5.4.80.0060.04113.71
5.4.70.0060.03613.63
5.4.60.0050.04013.75
5.4.50.0080.03813.62
5.4.40.0030.03213.73
5.4.30.0050.03413.64
5.4.20.0080.03213.68
5.4.10.0000.04613.66
5.4.00.0050.03713.39
5.3.290.0020.02912.78
5.3.280.0030.02312.82
5.3.270.0020.02712.83
5.3.260.0050.01812.82
5.3.250.0030.02212.81
5.3.240.0030.03212.83
5.3.230.0020.03812.78
5.3.220.0040.02912.81
5.3.210.0050.04112.77
5.3.200.0050.03712.81
5.3.190.0030.03812.81
5.3.180.0100.03312.82
5.3.170.0050.03812.80
5.3.160.0030.03912.82
5.3.150.0100.03812.81
5.3.140.0030.04412.75
5.3.130.0080.03612.79
5.3.120.0050.02512.78
5.3.110.0020.02812.80
5.3.100.0060.03612.75
5.3.90.0030.04012.75
5.3.80.0050.03912.75
5.3.70.0020.04412.75
5.3.60.0020.04512.75
5.3.50.0030.03412.75
5.3.40.0050.03012.75
5.3.30.0020.03512.75
5.3.20.0070.03012.75
5.3.10.0050.03712.75
5.3.00.0020.03812.75
5.2.170.0070.06314.44
5.2.160.0000.07014.44
5.2.150.0030.06314.44
5.2.140.0170.05314.44
5.2.130.0030.03014.44
5.2.120.0000.06314.44
5.2.110.0100.05314.44
5.2.100.0000.06314.44
5.2.90.0030.06014.44
5.2.80.0070.06014.44
5.2.70.0100.05014.44
5.2.60.0070.06014.44
5.2.50.0100.05014.44
5.2.40.0030.04314.44
5.2.30.0000.06714.44
5.2.20.0030.06014.44
5.2.10.0030.06314.44
5.2.00.0030.05014.44
5.1.60.0030.03314.44
5.1.50.0030.05314.44
5.1.40.0070.04014.44
5.1.30.0030.03014.44
5.1.20.0000.04014.44
5.1.10.0000.05014.44
5.1.00.0030.05714.44
5.0.50.0000.03714.44
5.0.40.0070.03714.44
5.0.30.0000.06714.44
5.0.20.0000.03714.44
5.0.10.0070.03014.44
5.0.00.0070.05314.44
4.4.90.0000.03714.44
4.4.80.0000.03314.44
4.4.70.0000.03714.44
4.4.60.0030.03314.44
4.4.50.0030.02714.44
4.4.40.0000.03714.44
4.4.30.0000.03714.44
4.4.20.0000.03714.44
4.4.10.0000.03314.44
4.4.00.0030.03714.44
4.3.110.0000.03314.44
4.3.100.0000.03714.44
4.3.90.0000.03314.44
4.3.80.0030.05014.44
4.3.70.0030.03014.44
4.3.60.0030.03014.44
4.3.50.0030.03314.44
4.3.40.0000.05314.44
4.3.30.0000.04014.44
4.3.20.0000.03014.44
4.3.10.0030.02714.44
4.3.00.0000.03714.44

preferences:
50.33 ms | 401 KiB | 5 Q