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(); print_r($arrayVal); print_r($arrayUrl); 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]; } }

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.0100.00316.63
8.3.50.0220.00618.23
8.3.40.0170.00018.84
8.3.30.0110.00318.83
8.3.20.0030.00618.77
8.3.10.0040.00420.48
8.3.00.0080.00019.25
8.2.180.0150.00918.41
8.2.170.0150.00622.96
8.2.160.0110.00721.05
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00021.25
8.2.110.0100.00022.25
8.2.100.0060.00617.78
8.2.90.0040.00418.03
8.2.80.0000.00817.50
8.2.70.0050.00317.63
8.2.60.0050.00318.05
8.2.50.0060.00318.07
8.2.40.0000.00920.95
8.2.30.0000.00718.08
8.2.20.0080.00017.60
8.2.10.0070.00017.73
8.2.00.0050.00317.62
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.45
8.1.230.0040.00822.82
8.1.220.0000.00917.78
8.1.210.0040.00418.91
8.1.200.0030.00617.22
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0080.00318.93
8.1.150.0000.00818.54
8.1.140.0050.00517.49
8.1.130.0030.00317.78
8.1.120.0040.00417.43
8.1.110.0000.00717.36
8.1.100.0070.00017.49
8.1.90.0040.00317.36
8.1.80.0000.00717.49
8.1.70.0030.00317.34
8.1.60.0040.00417.59
8.1.50.0070.00017.38
8.1.40.0000.00917.43
8.1.30.0040.00417.47
8.1.20.0030.00617.66
8.1.10.0000.00717.46
8.1.00.0000.00917.43
8.0.300.0080.00019.95
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0000.00818.00
8.0.260.0000.00716.69
8.0.250.0000.00716.95
8.0.240.0030.00716.96
8.0.230.0040.00416.84
8.0.220.0030.00316.92
8.0.210.0080.00016.82
8.0.200.0030.00316.99
8.0.190.0050.00217.02
8.0.180.0040.00416.77
8.0.170.0050.00516.94
8.0.160.0000.00816.88
8.0.150.0070.00016.80
8.0.140.0030.00616.79
8.0.130.0030.00313.30
8.0.120.0040.00416.75
8.0.110.0040.00416.88
8.0.100.0000.00716.84
8.0.90.0040.00416.88
8.0.80.0090.00616.89
8.0.70.0000.00716.87
8.0.60.0080.00016.86
8.0.50.0000.00816.73
8.0.30.0110.00717.28
8.0.20.0140.00517.03
8.0.10.0040.00417.01
8.0.00.0100.01016.66
7.4.330.0030.00313.01
7.4.320.0000.00716.61
7.4.300.0000.00616.49
7.4.290.0030.00316.58
7.4.280.0070.00016.61
7.4.270.0000.00616.44
7.4.260.0030.00313.28
7.4.250.0030.00516.48
7.4.240.0050.00216.55
7.4.230.0070.00016.54
7.4.220.0110.01516.59
7.4.210.0100.00816.48
7.4.200.0040.00416.50
7.4.190.0040.00416.54
7.4.160.0090.01516.44
7.4.150.0120.00816.51
7.4.140.0080.01016.39
7.4.130.0110.00916.56
7.4.120.0090.00816.62
7.4.110.0180.00616.56
7.4.100.0100.00716.41
7.4.90.0070.01116.41
7.4.80.0130.00319.39
7.4.70.0070.01516.56
7.4.60.0070.01016.34
7.4.50.0090.00316.48
7.4.40.0070.00716.50
7.4.30.0080.00816.72
7.4.00.0050.01214.75
7.3.330.0030.00313.19
7.3.320.0030.00413.18
7.3.310.0060.00016.21
7.3.300.0030.00316.33
7.3.290.0140.00716.36
7.3.280.0090.00916.33
7.3.270.0000.01616.28
7.3.260.0090.00916.39
7.3.250.0120.00616.42
7.3.240.0110.00616.45
7.3.230.0040.01716.33
7.3.210.0100.00616.36
7.3.200.0030.01316.34
7.3.190.0070.01116.47
7.3.180.0030.01316.26
7.3.170.0090.01216.59
7.3.160.0120.00416.52
7.3.120.0050.01114.84
7.3.110.0060.01014.49
7.3.100.0030.01014.66
7.3.90.0030.00614.96
7.3.80.0070.00714.60
7.3.70.0000.01514.48
7.3.60.0040.00814.83
7.3.50.0060.01014.80
7.3.40.0090.00614.79
7.3.30.0040.01114.96
7.3.20.0090.00616.62
7.3.10.0100.00416.56
7.3.00.0090.00616.75
7.2.330.0180.00016.38
7.2.320.0110.00716.60
7.2.310.0030.02016.45
7.2.300.0090.01216.71
7.2.290.0140.00416.59
7.2.250.0090.00615.32
7.2.240.0030.01215.00
7.2.230.0070.00715.04
7.2.220.0030.01015.18
7.2.210.0060.01214.81
7.2.200.0030.01314.95
7.2.190.0090.00615.13
7.2.180.0030.01715.18
7.2.170.0030.01314.86
7.2.130.0090.00516.97
7.2.120.0090.00316.87
7.2.110.0060.00716.59
7.2.100.0080.00516.89
7.2.90.0080.00516.92
7.2.80.0060.00616.74
7.2.70.0080.00416.85
7.2.60.0070.00716.84
7.2.50.0020.00816.76
7.2.40.0050.00716.68
7.2.30.0080.00316.53
7.2.20.0090.00416.75
7.2.10.0060.00616.48
7.2.00.0050.00817.76
7.1.330.0060.00915.79
7.1.320.0000.01215.86
7.1.310.0060.01015.82
7.1.300.0070.01015.87
7.1.290.0080.00815.75
7.1.280.0080.00415.61
7.1.270.0000.01515.55
7.1.260.0100.00315.68
7.1.250.0080.01015.70
7.1.240.0070.00715.79
7.1.230.0070.00715.86
7.1.220.0100.00315.83
7.1.210.0060.00915.56
7.1.200.0030.01015.89
7.1.190.0140.00715.59
7.1.180.0130.00315.68
7.1.170.0030.00915.35
7.1.160.0070.01115.31
7.1.150.0060.00615.50
7.1.140.0080.00415.15
7.1.130.0070.00715.44
7.1.120.0060.00615.48
7.1.110.0070.00715.33
7.1.100.0040.01116.90
7.1.90.0120.00315.63
7.1.80.0050.00515.63
7.1.70.0060.00616.33
7.1.60.0100.00817.47
7.1.50.0120.00716.34
7.1.40.0090.00615.78
7.1.30.0110.00015.41
7.1.20.0120.00315.68
7.1.10.0140.00315.39
7.1.00.0050.03019.10
7.0.330.0110.00315.26
7.0.320.0110.00415.27
7.0.310.0070.01014.89
7.0.300.0090.00615.17
7.0.290.0110.00315.15
7.0.280.0140.00415.00
7.0.270.0100.00715.24
7.0.260.0040.00715.20
7.0.250.0150.00015.07
7.0.240.0070.00714.95
7.0.230.0070.00715.17
7.0.220.0130.00315.09
7.0.210.0080.00815.19
7.0.200.0100.00715.96
7.0.190.0100.00315.32
7.0.180.0110.00715.13
7.0.170.0000.00915.04
7.0.160.0030.01215.15
7.0.150.0100.00015.39
7.0.140.0100.03718.58
7.0.130.0100.00715.41
7.0.120.0050.04018.77
7.0.110.0140.00315.39
7.0.100.0130.00015.22
7.0.90.0060.00915.32
7.0.80.0070.00715.01
7.0.70.0100.00714.93
7.0.60.0100.04317.63
7.0.50.0100.02316.64
7.0.40.0030.02715.55
7.0.30.0050.04915.45
7.0.20.0050.02715.55
7.0.10.0090.04215.53
7.0.00.0070.04515.37
5.6.380.0070.00314.05
5.6.370.0040.00714.22
5.6.360.0030.00614.33
5.6.350.0090.00313.77
5.6.340.0000.01214.25
5.6.330.0030.00614.50
5.6.320.0060.00314.24
5.6.310.0070.00714.64
5.6.300.0040.00814.03
5.6.290.0000.01314.59
5.6.280.0010.04117.80
5.6.270.0040.00814.21
5.6.260.0060.00613.92
5.6.250.0000.00914.22
5.6.240.0100.00314.11
5.6.230.0100.00313.94
5.6.220.0120.00314.30
5.6.210.0100.04217.39
5.6.200.0120.03316.24
5.6.190.0080.02416.31
5.6.180.0050.04716.18
5.6.170.0090.02616.21
5.6.160.0120.03416.12
5.6.150.0070.03016.12
5.6.140.0120.03816.17
5.6.130.0050.04916.19
5.6.120.0020.04116.30
5.6.110.0060.04816.28
5.6.100.0080.04016.12
5.6.90.0110.03215.98
5.6.80.0080.02415.94
5.6.70.0090.03015.78
5.6.60.0120.04115.79
5.6.50.0080.03915.81
5.6.40.0050.04715.72
5.6.30.0070.04115.81
5.6.20.0090.04115.88
5.6.10.0130.03815.76
5.6.00.0040.04715.72
5.5.380.0060.01211.41
5.5.370.0110.00611.15
5.5.360.0060.00811.16
5.5.350.0190.04015.88
5.5.340.0060.03114.69
5.5.330.0050.02914.47
5.5.320.0150.01814.64
5.5.310.0110.03514.66
5.5.300.0040.03114.61
5.5.290.0120.02314.50
5.5.280.0080.03314.53
5.5.270.0040.04114.67
5.5.260.0130.04214.56
5.5.250.0130.04014.47
5.5.240.0040.02714.22
5.5.230.0050.04314.44
5.5.220.0100.02314.35
5.5.210.0050.04714.22
5.5.200.0080.04014.22
5.5.190.0070.03714.31
5.5.180.0090.04114.19
5.5.170.0120.00311.02
5.5.160.0040.03414.34
5.5.150.0090.02414.26
5.5.140.0080.04114.29
5.5.130.0130.03214.09
5.5.120.0120.03214.17
5.5.110.0050.03814.20
5.5.100.0070.02413.98
5.5.90.0070.04013.91
5.5.80.0080.03514.01
5.5.70.0050.02214.06
5.5.60.0080.02814.01
5.5.50.0040.03213.95
5.5.40.0080.03213.96
5.5.30.0120.03114.03
5.5.20.0070.03714.16
5.5.10.0110.03813.89
5.5.00.0050.03414.00
5.4.450.0130.02715.44
5.4.440.0080.04115.35
5.4.430.0090.02315.32
5.4.420.0160.04115.31
5.4.410.0140.03515.33
5.4.400.0120.03414.95
5.4.390.0090.04415.14
5.4.380.0080.02915.05
5.4.370.0060.04115.15
5.4.360.0100.02015.30
5.4.350.0250.02715.09
5.4.340.0110.03015.18
5.4.330.0130.00311.32
5.4.320.0130.04015.04
5.4.310.0020.04415.13
5.4.300.0050.04515.08
5.4.290.0080.03715.20
5.4.280.0100.03114.96
5.4.270.0130.03515.12
5.4.260.0050.04214.82
5.4.250.0030.04314.93
5.4.240.0070.03314.77
5.4.230.0040.02014.91
5.4.220.0050.03814.86
5.4.210.0080.04015.01
5.4.200.0050.04514.74
5.4.190.0120.01714.81
5.4.180.0090.03714.90
5.4.170.0000.03414.91
5.4.160.0040.02714.92
5.4.150.0090.01714.79
5.4.140.0060.04213.47
5.4.130.0020.04013.77
5.4.120.0020.03213.48
5.4.110.0060.02613.60
5.4.100.0020.03913.81
5.4.90.0040.02613.61
5.4.80.0050.03213.52
5.4.70.0060.03213.64
5.4.60.0090.03713.75
5.4.50.0120.03513.49
5.4.40.0110.02713.80
5.4.30.0050.04013.55
5.4.20.0020.04313.59
5.4.10.0060.03313.57
5.4.00.0070.03713.30
5.3.290.0100.03612.58
5.3.280.0050.02512.54
5.3.270.0050.04012.68
5.3.260.0080.02412.55
5.3.250.0080.01812.66
5.3.240.0050.03012.75
5.3.230.0050.02312.58
5.3.220.0080.03612.48
5.3.210.0050.03612.49
5.3.200.0030.04312.68
5.3.190.0110.03512.62
5.3.180.0060.03812.63
5.3.170.0030.02412.57
5.3.160.0000.04812.75
5.3.150.0080.03812.62
5.3.140.0030.03612.62
5.3.130.0110.03812.61
5.3.120.0040.03512.60
5.3.110.0060.04212.72
5.3.100.0120.03512.25
5.3.90.0030.02512.26
5.3.80.0050.04312.28
5.3.70.0010.02612.19
5.3.60.0030.02012.35
5.3.50.0040.01812.19
5.3.40.0050.02112.13
5.3.30.0040.02012.29
5.3.20.0040.02012.25
5.3.10.0050.01912.00
5.3.00.0020.02412.00
5.2.170.0030.01610.36
5.2.160.0050.01610.26
5.2.150.0050.01610.40
5.2.140.0080.01310.24
5.2.130.0020.01910.16
5.2.120.0070.01410.21
5.2.110.0060.01510.42
5.2.100.0030.03310.35
5.2.90.0000.03710.18
5.2.80.0050.01610.21
5.2.70.0070.01510.28
5.2.60.0020.0179.98
5.2.50.0040.01910.23
5.2.40.0040.03510.11
5.2.30.0030.01810.21
5.2.20.0030.01810.22
5.2.10.0030.01610.12
5.2.00.0020.01910.00
5.1.60.0000.0199.22
5.1.50.0020.0179.21
5.1.40.0050.0149.24
5.1.30.0050.0149.49
5.1.20.0050.0129.55
5.1.10.0020.0169.33
5.1.00.0050.0139.34
5.0.50.0010.0148.53
5.0.40.0000.0148.35
5.0.30.0000.0198.29
5.0.20.0030.0108.25
5.0.10.0030.0108.27
5.0.00.0000.0188.23
4.4.90.0040.0088.04
4.4.80.0030.0198.04
4.4.70.0020.0128.04
4.4.60.0040.0098.04
4.4.50.0060.0068.04
4.4.40.0040.0118.04
4.4.30.0020.0108.04
4.4.20.0000.0108.04
4.4.10.0020.0108.04
4.4.00.0040.0128.04
4.3.110.0030.0088.04
4.3.100.0010.0118.04
4.3.90.0000.0098.04
4.3.80.0020.0138.04
4.3.70.0050.0078.04
4.3.60.0000.0118.04
4.3.50.0020.0108.04
4.3.40.0000.0148.04
4.3.30.0010.0098.04
4.3.20.0000.0118.04
4.3.10.0000.0108.04
4.3.00.0030.0078.04

preferences:
47.23 ms | 401 KiB | 5 Q