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.0040.01116.50
8.3.50.0090.00517.23
8.3.40.0000.01418.70
8.3.30.0060.00918.63
8.3.20.0080.00018.92
8.3.10.0060.00318.93
8.3.00.0080.00019.38
8.2.180.0080.00816.62
8.2.170.0070.01522.96
8.2.160.0140.00321.02
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00721.02
8.2.110.0050.00520.47
8.2.100.0060.00617.97
8.2.90.0050.00318.22
8.2.80.0030.00519.21
8.2.70.0040.00417.50
8.2.60.0050.00317.93
8.2.50.0030.00718.07
8.2.40.0040.00418.16
8.2.30.0050.00518.09
8.2.20.0060.00317.72
8.2.10.0040.00417.67
8.2.00.0080.00317.85
8.1.280.0070.01125.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.19
8.1.230.0030.00720.98
8.1.220.0040.00417.77
8.1.210.0060.00318.77
8.1.200.0000.00917.25
8.1.190.0080.00017.53
8.1.180.0040.00418.10
8.1.170.0040.00418.89
8.1.160.0040.00418.80
8.1.150.0030.00618.55
8.1.140.0040.00417.44
8.1.130.0040.00417.73
8.1.120.0000.00817.36
8.1.110.0030.00517.48
8.1.100.0040.00417.29
8.1.90.0000.00717.35
8.1.80.0000.00717.35
8.1.70.0070.00417.48
8.1.60.0000.00717.59
8.1.50.0000.00717.47
8.1.40.0000.00817.42
8.1.30.0080.00017.54
8.1.20.0000.00817.64
8.1.10.0040.00417.48
8.1.00.0040.00417.45
8.0.300.0080.00020.04
8.0.290.0040.00416.63
8.0.280.0000.00718.52
8.0.270.0000.00717.13
8.0.260.0030.00316.82
8.0.250.0040.00417.01
8.0.240.0030.00316.85
8.0.230.0070.00016.94
8.0.220.0000.00816.95
8.0.210.0050.00216.91
8.0.200.0000.00716.84
8.0.190.0000.00816.97
8.0.180.0040.00416.97
8.0.170.0000.00816.82
8.0.160.0040.00416.94
8.0.150.0080.00016.85
8.0.140.0040.00416.88
8.0.130.0000.00613.28
8.0.120.0080.00016.81
8.0.110.0070.00016.89
8.0.100.0060.00316.68
8.0.90.0040.00416.84
8.0.80.0040.01116.95
8.0.70.0030.00516.76
8.0.60.0030.00516.70
8.0.50.0000.00716.74
8.0.30.0140.00417.04
8.0.20.0120.00917.04
8.0.10.0040.00417.05
8.0.00.0080.01216.78
7.4.330.0000.00512.96
7.4.320.0060.00016.46
7.4.300.0030.00316.49
7.4.290.0030.00316.63
7.4.280.0020.00516.61
7.4.270.0030.00316.59
7.4.260.0030.00313.27
7.4.250.0050.00316.41
7.4.240.0000.00716.59
7.4.230.0080.00016.63
7.4.220.0030.02116.49
7.4.210.0100.00516.53
7.4.200.0080.00016.66
7.4.190.0040.00416.66
7.4.160.0070.01016.42
7.4.150.0090.00916.59
7.4.140.0050.01216.48
7.4.130.0100.00716.55
7.4.120.0030.01316.40
7.4.110.0100.00716.47
7.4.100.0130.00316.61
7.4.90.0190.00616.34
7.4.80.0100.00619.39
7.4.70.0100.01316.63
7.4.60.0120.00616.46
7.4.50.0030.00716.46
7.4.40.0110.00816.33
7.4.30.0080.00816.67
7.4.10.0040.01114.89
7.4.00.0110.00614.85
7.3.330.0070.00013.02
7.3.320.0000.00713.18
7.3.310.0070.00016.11
7.3.300.0000.00716.27
7.3.290.0130.00316.26
7.3.280.0070.01216.27
7.3.270.0100.00616.64
7.3.260.0120.00616.59
7.3.250.0080.01316.45
7.3.240.0080.01116.34
7.3.230.0120.00616.38
7.3.210.0000.01816.33
7.3.200.0060.01216.61
7.3.190.0070.01016.57
7.3.180.0130.01016.47
7.3.170.0080.00816.36
7.3.160.0040.01316.48
7.3.130.0130.00615.11
7.3.120.0070.01014.93
7.3.110.0070.01014.81
7.3.100.0050.00814.81
7.3.90.0050.01015.00
7.3.80.0040.00914.94
7.3.70.0070.00914.83
7.3.60.0050.00814.96
7.3.50.0110.00314.87
7.3.40.0060.00614.91
7.3.30.0080.00314.83
7.3.20.0060.01016.81
7.3.10.0100.00516.81
7.3.00.0050.00816.53
7.2.330.0030.01416.66
7.2.320.0040.01916.45
7.2.310.0090.00916.62
7.2.300.0100.00716.70
7.2.290.0060.01116.50
7.2.260.0040.01515.21
7.2.250.0100.00915.01
7.2.240.0080.00514.97
7.2.230.0030.01315.21
7.2.220.0090.00715.17
7.2.210.0050.01015.09
7.2.200.0050.01015.09
7.2.190.0050.01214.94
7.2.180.0080.00714.95
7.2.170.0050.00814.99
7.2.160.0080.00815.03
7.2.150.0060.01016.98
7.2.140.0060.00916.94
7.2.130.0030.01217.03
7.2.120.0070.00717.05
7.2.110.0080.00817.02
7.2.100.0080.01017.00
7.2.90.0060.00916.78
7.2.80.0070.00716.96
7.2.70.0110.00316.94
7.2.60.0070.00916.78
7.2.50.0050.01017.07
7.2.40.0020.01416.96
7.2.30.0070.00916.90
7.2.20.0140.00216.95
7.2.10.0110.00616.99
7.2.00.0040.01117.69
7.1.330.0050.01015.79
7.1.320.0100.00315.81
7.1.310.0090.00615.61
7.1.300.0060.00815.80
7.1.290.0060.00815.68
7.1.280.0060.00615.61
7.1.270.0070.00815.88
7.1.260.0070.01015.71
7.1.250.0070.00615.73
7.1.240.0070.00715.79
7.1.230.0040.01115.82
7.1.220.0070.01015.67
7.1.210.0060.01215.70
7.1.200.0090.00616.06
7.1.190.0070.00715.79
7.1.180.0040.01215.77
7.1.170.0030.01015.70
7.1.160.0100.00015.83
7.1.150.0070.00715.73
7.1.140.0000.01915.62
7.1.130.0090.00615.49
7.1.120.0030.01015.96
7.1.110.0040.00415.74
7.1.100.0050.00616.61
7.1.90.0070.00316.05
7.1.80.0070.00315.63
7.1.70.0060.00616.50
7.1.60.0050.00917.73
7.1.50.0040.01216.23
7.1.40.0070.01015.91
7.1.30.0070.01015.43
7.1.20.0000.01615.45
7.1.10.0040.00715.45
7.1.00.0080.03018.99
7.0.330.0080.00315.48
7.0.320.0080.00415.36
7.0.310.0030.00615.54
7.0.300.0070.01015.50
7.0.290.0060.00715.55
7.0.280.0090.00615.48
7.0.270.0000.00815.40
7.0.260.0050.00415.38
7.0.250.0070.00415.64
7.0.240.0040.00715.50
7.0.230.0050.00515.23
7.0.220.0030.00515.34
7.0.210.0090.00615.59
7.0.200.0050.00415.83
7.0.190.0070.01015.51
7.0.180.0100.00615.35
7.0.170.0030.01015.60
7.0.160.0080.00315.47
7.0.150.0060.00815.52
7.0.140.0050.03818.70
7.0.130.0090.00615.18
7.0.120.0040.03718.71
7.0.110.0040.01115.21
7.0.100.0040.00415.38
7.0.90.0040.00415.57
7.0.80.0080.00415.46
7.0.70.0000.01315.46
7.0.60.0030.03417.74
7.0.50.0030.02716.68
7.0.40.0140.02015.67
7.0.30.0050.02315.52
7.0.20.0070.02215.54
7.0.10.0020.02715.54
7.0.00.0050.02515.60
5.6.400.0110.00814.80
5.6.390.0070.00714.46
5.6.380.0120.00614.14
5.6.370.0030.00914.57
5.6.360.0030.01414.72
5.6.350.0060.00914.50
5.6.340.0030.01714.51
5.6.330.0060.00914.34
5.6.320.0040.01114.11
5.6.310.0060.00614.48
5.6.300.0090.00314.84
5.6.290.0100.00314.77
5.6.280.0040.04017.62
5.6.270.0040.01214.37
5.6.260.0070.00714.77
5.6.250.0030.01014.57
5.6.240.0030.00514.51
5.6.230.0070.00714.75
5.6.220.0040.01114.37
5.6.210.0050.04417.69
5.6.200.0080.02316.40
5.6.190.0030.02516.32
5.6.180.0090.02016.54
5.6.170.0090.01916.38
5.6.160.0120.01716.47
5.6.150.0080.02316.32
5.6.140.0050.02316.44
5.6.130.0030.02516.22
5.6.120.0030.02716.40
5.6.110.0020.02716.40
5.6.100.0020.02916.27
5.6.90.0020.02516.32
5.6.80.0020.02616.13
5.6.70.0030.02515.87
5.6.60.0050.02616.00
5.6.50.0070.04216.07
5.6.40.0070.04215.99
5.6.30.0080.03915.92
5.6.20.0080.02315.85
5.6.10.0080.02015.97
5.6.00.0110.03616.05
5.5.380.0070.01014.61
5.5.370.0000.00814.45
5.5.360.0030.01014.30
5.5.350.0200.02817.45
5.5.340.0080.02216.25
5.5.330.0020.02616.18
5.5.320.0060.02216.02
5.5.310.0030.02716.18
5.5.300.0030.02316.15
5.5.290.0030.02916.27
5.5.280.0070.02016.11
5.5.270.0080.02016.37
5.5.260.0120.02016.21
5.5.250.0030.02316.06
5.5.240.0080.01815.95
5.5.230.0000.02515.95
5.5.220.0030.04115.89
5.5.210.0080.03315.67
5.5.200.0030.04715.84
5.5.190.0080.02615.86
5.5.180.0030.04515.94
5.5.170.0000.01714.10
5.5.160.0100.03815.72
5.5.150.0020.03715.90
5.5.140.0090.03415.63
5.5.130.0130.03515.61
5.5.120.0050.03515.94
5.5.110.0100.03815.82
5.5.100.0070.02015.88
5.5.90.0030.03115.63
5.5.80.0080.02715.80
5.5.70.0050.04115.71
5.5.60.0030.02315.83
5.5.50.0070.04615.69
5.5.40.0100.03715.89
5.5.30.0070.03815.69
5.5.20.0100.02815.68
5.5.10.0040.02515.77
5.5.00.0080.04015.84
5.4.450.0060.02115.24
5.4.440.0070.01915.20
5.4.430.0030.02415.27
5.4.420.0030.02115.23
5.4.410.0060.02115.23
5.4.400.0030.02215.17
5.4.390.0060.02015.06
5.4.380.0030.02715.12
5.4.370.0030.04015.00
5.4.360.0120.02515.03
5.4.350.0050.04215.00
5.4.340.0080.04514.83
5.4.330.0030.00711.15
5.4.320.0100.03814.93
5.4.310.0070.02014.88
5.4.300.0060.03815.06
5.4.290.0080.03914.88
5.4.280.0020.02915.02
5.4.270.0030.04314.88
5.4.260.0070.02215.12
5.4.250.0090.01715.00
5.4.240.0050.02515.04
5.4.230.0050.02815.15
5.4.220.0070.03815.14
5.4.210.0050.03515.05
5.4.200.0070.03914.98
5.4.190.0040.02714.95
5.4.180.0100.03415.05
5.4.170.0070.01915.04
5.4.160.0060.04114.98
5.4.150.0020.02915.06
5.4.140.0030.03813.71
5.4.130.0070.03513.56
5.4.120.0070.04313.78
5.4.110.0040.04613.75
5.4.100.0050.02313.52
5.4.90.0130.02813.70
5.4.80.0020.04413.74
5.4.70.0080.03013.66
5.4.60.0020.04413.77
5.4.50.0090.02613.81
5.4.40.0050.04113.80
5.4.30.0060.03913.67
5.4.20.0060.01813.69
5.4.10.0000.02613.85
5.4.00.0050.02113.38
5.3.290.0040.02312.50
5.3.280.0050.02312.56
5.3.270.0050.02012.60
5.3.260.0070.02512.58
5.3.250.0050.03312.49
5.3.240.0050.04012.45
5.3.230.0080.03912.44
5.3.220.0070.03712.50
5.3.210.0100.03712.38
5.3.200.0090.02312.48
5.3.190.0050.04612.54
5.3.180.0090.03212.37
5.3.170.0060.03712.58
5.3.160.0080.03512.54
5.3.150.0030.04312.49
5.3.140.0060.03912.60
5.3.130.0020.04812.48
5.3.120.0050.02212.36
5.3.110.0080.02812.58
5.3.100.0030.02912.33
5.3.90.0060.01812.29
5.3.80.0050.04112.04
5.3.70.0070.02412.22
5.3.60.0030.02712.27
5.3.50.0030.04412.13
5.3.40.0030.04012.04
5.3.30.0000.02512.08
5.3.20.0020.02312.04
5.3.10.0050.04111.92
5.3.00.0060.03511.90
5.2.170.0070.05711.14
5.2.160.0070.04310.99
5.2.150.0030.03011.07
5.2.140.0100.05710.97
5.2.130.0030.05311.02
5.2.120.0030.03010.95
5.2.110.0070.05011.11
5.2.100.0070.06310.94
5.2.90.0000.03711.08
5.2.80.0000.03711.24
5.2.70.0030.03011.07
5.2.60.0070.06011.04
5.2.50.0100.03310.97
5.2.40.0000.06710.79
5.2.30.0200.04011.12
5.2.20.0070.06010.97
5.2.10.0100.06010.88
5.2.00.0030.06710.72
5.1.60.0030.03010.21
5.1.50.0030.05310.04
5.1.40.0070.0439.92
5.1.30.0100.05310.35
5.1.20.0000.05710.57
5.1.10.0030.04310.12
5.1.00.0000.0609.99
5.0.50.0030.0479.12
5.0.40.0030.0409.12
5.0.30.0100.0609.12
5.0.20.0070.0439.12
5.0.10.0100.0409.12
5.0.00.0000.0639.12
4.4.90.0000.0339.12
4.4.80.0030.0209.12
4.4.70.0070.0309.12
4.4.60.0070.0239.12
4.4.50.0030.0309.12
4.4.40.0030.0409.12
4.4.30.0030.0279.12
4.4.20.0000.0339.12
4.4.10.0000.0379.12
4.4.00.0030.0439.12
4.3.110.0070.0309.12
4.3.100.0030.0339.12
4.3.90.0030.0339.12
4.3.80.0000.0279.12
4.3.70.0070.0309.12
4.3.60.0100.0079.12
4.3.50.0000.0179.12
4.3.40.0000.0309.12
4.3.30.0030.0139.12
4.3.20.0000.0409.12
4.3.10.0000.0309.12
4.3.00.0000.0379.12

preferences:
45.08 ms | 401 KiB | 5 Q