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]; } }

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.0070.01116.37
8.3.50.0190.01016.48
8.3.40.0090.00618.79
8.3.30.0090.00618.84
8.3.20.0050.00318.76
8.3.10.0060.00320.52
8.3.00.0000.00819.38
8.2.180.0120.00918.54
8.2.170.0110.00422.96
8.2.160.0000.01420.52
8.2.150.0050.00524.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00021.16
8.2.110.0060.00321.05
8.2.100.0120.00017.91
8.2.90.0070.00319.46
8.2.80.0040.00419.40
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0070.00318.07
8.2.40.0000.00818.22
8.2.30.0040.00418.18
8.2.20.0090.00017.75
8.2.10.0050.00317.73
8.2.00.0060.00317.85
8.1.280.0070.00725.92
8.1.270.0030.00624.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.39
8.1.230.0040.00720.84
8.1.220.0080.00017.74
8.1.210.0000.00818.96
8.1.200.0030.00617.11
8.1.190.0040.00417.39
8.1.180.0050.00318.10
8.1.170.0000.00718.73
8.1.160.0030.00518.79
8.1.150.0070.00018.68
8.1.140.0040.00417.36
8.1.130.0070.00017.67
8.1.120.0000.00817.39
8.1.110.0040.00417.38
8.1.100.0080.00017.45
8.1.90.0000.00717.33
8.1.80.0080.00017.30
8.1.70.0030.00317.33
8.1.60.0000.00817.59
8.1.50.0000.00717.46
8.1.40.0080.00017.42
8.1.30.0070.00017.65
8.1.20.0070.00017.63
8.1.10.0040.00417.60
8.1.00.0030.00717.50
8.0.300.0030.00320.03
8.0.290.0040.00416.63
8.0.280.0030.00318.29
8.0.270.0000.00717.21
8.0.260.0030.00316.85
8.0.250.0040.00417.02
8.0.240.0100.00016.98
8.0.230.0030.00316.83
8.0.220.0030.00316.94
8.0.210.0030.00316.91
8.0.200.0070.00016.86
8.0.190.0080.00016.88
8.0.180.0070.00016.90
8.0.170.0060.00316.85
8.0.160.0000.00816.97
8.0.150.0060.00316.72
8.0.140.0040.00416.93
8.0.130.0050.00013.30
8.0.120.0080.00016.75
8.0.110.0050.00316.91
8.0.100.0000.00816.86
8.0.90.0000.00816.78
8.0.80.0000.01416.86
8.0.70.0070.00016.77
8.0.60.0080.00016.76
8.0.50.0000.00716.79
8.0.30.0130.00717.03
8.0.20.0090.01016.92
8.0.10.0060.00917.00
8.0.00.0090.01116.84
7.4.330.0050.00012.97
7.4.320.0000.00616.43
7.4.300.0030.00316.64
7.4.290.0030.00316.52
7.4.280.0030.00516.50
7.4.270.0070.00016.61
7.4.260.0030.00313.36
7.4.250.0050.00316.64
7.4.240.0030.00316.43
7.4.230.0030.00316.62
7.4.220.0140.00516.40
7.4.210.0100.00616.54
7.4.200.0030.00616.61
7.4.190.0050.00216.64
7.4.160.0130.00716.56
7.4.150.0110.00916.62
7.4.140.0100.01116.54
7.4.130.0130.00616.47
7.4.120.0150.00416.52
7.4.110.0100.01016.48
7.4.100.0090.00716.54
7.4.90.0100.00816.57
7.4.80.0140.00816.45
7.4.70.0110.00716.50
7.4.60.0090.00916.36
7.4.50.0070.01116.36
7.4.40.0070.00716.50
7.4.30.0100.01016.48
7.4.20.0150.00516.43
7.4.10.0130.00916.44
7.4.00.0090.00815.34
7.3.330.0000.00713.25
7.3.320.0050.00413.10
7.3.310.0030.00516.47
7.3.300.0030.00316.29
7.3.290.0060.00916.27
7.3.280.0120.00716.26
7.3.270.0100.00916.37
7.3.260.0080.01116.44
7.3.250.0100.00916.47
7.3.240.0080.00716.29
7.3.230.0050.01116.31
7.3.220.0030.01616.25
7.3.210.0140.00516.24
7.3.200.0060.01217.81
7.3.190.0070.01216.45
7.3.180.0080.01416.38
7.3.170.0050.01516.30
7.3.160.0100.00716.43
7.3.150.0150.00416.24
7.3.140.0090.01216.25
7.3.130.0160.00716.23
7.3.120.0010.01515.29
7.3.110.0110.00715.47
7.3.100.0060.00815.37
7.3.90.0120.00515.74
7.3.80.0130.00615.36
7.3.70.0050.01115.65
7.3.60.0180.00715.63
7.3.50.0140.00515.58
7.3.40.0090.00515.49
7.3.30.0090.00715.42
7.3.20.0100.00716.53
7.3.10.0060.01216.50
7.3.00.0220.00616.50
7.2.340.0250.00516.38
7.2.330.0150.00816.67
7.2.320.0160.00816.52
7.2.310.0180.00616.56
7.2.300.0130.00916.41
7.2.290.0160.00716.53
7.2.280.0170.01016.37
7.2.270.0100.01716.37
7.2.260.0120.01716.36
7.2.250.0150.01015.63
7.2.240.0160.01015.81
7.2.230.0130.00915.64
7.2.220.0130.00815.89
7.2.210.0140.01015.58
7.2.200.0140.00715.89
7.2.190.0110.01115.66
7.2.180.0120.01115.86
7.2.170.0110.00915.79
7.2.160.0270.00016.55
7.2.150.0200.01016.52
7.2.140.0140.01416.68
7.2.130.0130.00916.84
7.2.120.0180.00116.72
7.2.110.0130.00516.71
7.2.100.0130.01016.66
7.2.90.0130.00916.71
7.2.80.0130.01016.75
7.2.70.0130.01216.67
7.2.60.0180.00616.76
7.2.50.0300.01116.76
7.2.40.0160.00716.76
7.2.30.0180.01016.79
7.2.20.0120.00916.77
7.2.10.0110.01316.56
7.2.00.0150.00717.60
7.1.330.0140.00815.77
7.1.320.0160.00415.58
7.1.310.0110.00915.77
7.1.300.0150.00715.77
7.1.290.0060.01315.73
7.1.280.0190.00415.71
7.1.270.0150.00615.57
7.1.260.0270.00615.60
7.1.250.0100.01015.56
7.1.240.0180.00615.47
7.1.230.0190.00815.46
7.1.220.0200.00315.58
7.1.210.0270.00315.63
7.1.200.0250.01215.51
7.1.190.0210.00415.49
7.1.180.0130.01015.47
7.1.170.0180.01115.49
7.1.160.0230.00315.47
7.1.150.0160.01215.38
7.1.140.0140.00915.55
7.1.130.0170.00715.55
7.1.120.0180.00515.43
7.1.110.0160.00815.44
7.1.100.0100.01016.73
7.1.90.0990.01015.47
7.1.80.0230.00415.64
7.1.70.0110.01116.27
7.1.60.0130.01317.44
7.1.50.0180.00716.17
7.1.40.0130.01315.52
7.1.30.0120.01515.56
7.1.20.0170.01015.39
7.1.10.0200.00915.45
7.1.00.0070.02818.91
7.0.330.0160.00715.12
7.0.320.0180.00515.18
7.0.310.0180.00515.14
7.0.300.0160.01215.10
7.0.290.0230.00815.08
7.0.280.0220.00315.15
7.0.270.0200.00315.14
7.0.260.0160.00715.13
7.0.250.0170.00715.33
7.0.240.0140.01415.34
7.0.230.0120.01215.34
7.0.220.0200.00815.29
7.0.210.0190.00815.23
7.0.200.0140.00416.04
7.0.190.0210.00715.28
7.0.180.0230.00415.28
7.0.170.0090.01415.33
7.0.160.0190.00615.09
7.0.150.0210.00415.20
7.0.140.0110.04218.70
7.0.130.0200.00515.23
7.0.120.0180.04018.64
7.0.110.0140.01115.25
7.0.100.0100.02015.23
7.0.90.0160.00615.19
7.0.80.0250.00315.18
7.0.70.0140.01215.15
7.0.60.0110.03317.62
7.0.50.0090.02516.49
7.0.40.0100.02416.48
7.0.30.0090.02616.45
7.0.20.0080.03116.42
7.0.10.0110.02316.46
7.0.00.0090.02616.38
5.6.400.0220.00416.04
5.6.390.0160.00815.89
5.6.380.0110.01416.02
5.6.370.0200.01516.04
5.6.360.0170.00816.01
5.6.350.0240.00815.91
5.6.340.0170.00915.84
5.6.330.0150.01216.00
5.6.320.0120.01315.95
5.6.310.0230.00816.00
5.6.300.0170.00815.83
5.6.290.0290.00515.93
5.6.280.0130.04118.51
5.6.270.0140.01715.95
5.6.260.0160.01115.91
5.6.250.0250.00316.07
5.6.240.0190.00515.88
5.6.230.0070.02016.07
5.6.220.0160.01316.05
5.6.210.0130.04318.28
5.6.200.0060.02817.09
5.6.190.0090.03117.11
5.6.180.0140.02517.10
5.6.170.0070.03117.06
5.6.160.0120.02417.06
5.6.150.0070.02717.12
5.6.140.0160.01817.05
5.6.130.0160.02417.08
5.6.120.0090.02617.04
5.6.110.0130.02217.05
5.6.100.0100.03517.08
5.6.90.0090.02617.09
5.6.80.0170.03816.79
5.6.70.0070.03916.82
5.6.60.0150.03916.76
5.6.50.0050.03016.72
5.6.40.0110.02616.73
5.6.30.0170.02716.70
5.6.20.0120.04516.75
5.6.10.0150.03816.69
5.6.00.0190.03716.65
5.5.380.0200.00916.12
5.5.370.0220.01316.04
5.5.360.0250.00015.83
5.5.350.0230.04118.11
5.5.340.0090.02516.89
5.5.330.0140.02216.93
5.5.320.0120.02116.93
5.5.310.0090.02616.88
5.5.300.0080.02616.97
5.5.290.0090.02716.92
5.5.280.0110.02316.90
5.5.270.0140.02216.90
5.5.260.0090.03216.95
5.5.250.0080.02816.79
5.5.240.0150.02216.63
5.5.230.0110.02316.64
5.5.220.0140.03916.56
5.5.210.0180.03216.63
5.5.200.0090.03216.63
5.5.190.0130.03516.62
5.5.180.0120.02816.55
5.5.170.0160.01115.89
5.5.160.0120.03016.57
5.5.150.0100.04616.52
5.5.140.0110.02616.56
5.5.130.0150.02016.43
5.5.120.0140.02316.51
5.5.110.0150.04116.43
5.5.100.0080.03516.57
5.5.90.0140.04216.68
5.5.80.0130.03616.55
5.5.70.0080.04316.59
5.5.60.0110.03816.58
5.5.50.0140.04216.60
5.5.40.0140.03416.52
5.5.30.0080.03116.50
5.5.20.0120.04416.48
5.5.10.0120.03716.46
5.5.00.0090.04016.52
5.4.450.0160.02316.26
5.4.440.0060.02316.19
5.4.430.0090.02716.28
5.4.420.0070.03516.25
5.4.410.0040.02616.08
5.4.400.0100.02816.08
5.4.390.0080.02316.05
5.4.380.0120.01816.10
5.4.370.0050.03616.03
5.4.360.0080.03416.04
5.4.350.0110.04316.05
5.4.340.0150.03816.06
5.4.330.0260.01013.08
5.4.320.0060.02616.01
5.4.310.0120.04316.03
5.4.300.0080.02716.02
5.4.290.0110.02616.08
5.4.280.0090.02616.03
5.4.270.0120.02216.07
5.4.260.0140.03616.04
5.4.250.0120.04116.10
5.4.240.0110.04216.11
5.4.230.0120.03316.07
5.4.220.0140.03716.09
5.4.210.0060.03016.05
5.4.200.0110.03616.09
5.4.190.0090.03715.94
5.4.180.0100.04116.02
5.4.170.0160.03616.03
5.4.160.0140.03716.09
5.4.150.0040.03216.02
5.4.140.0110.03914.62
5.4.130.0090.03614.63
5.4.120.0070.03614.67
5.4.110.0110.02714.63
5.4.100.0130.03014.70
5.4.90.0080.03014.73
5.4.80.0130.01814.62
5.4.70.0100.03514.62
5.4.60.0060.04114.61
5.4.50.0100.02314.61
5.4.40.0060.02814.73
5.4.30.0070.02714.67
5.4.20.0120.03014.78
5.4.10.0110.02114.66
5.4.00.0130.03614.40
5.3.290.0120.04213.96
5.3.280.0030.03513.84
5.3.270.0150.02613.83
5.3.260.0130.02413.88
5.3.250.0120.03713.86
5.3.240.0110.04313.83
5.3.230.0100.03913.81
5.3.220.0090.02413.76
5.3.210.0130.04013.81
5.3.200.0090.04313.80
5.3.190.0110.04013.72
5.3.180.0110.02613.74
5.3.170.0070.02513.90
5.3.160.0110.04013.84
5.3.150.0110.04013.84
5.3.140.0090.02113.73
5.3.130.0050.03213.90
5.3.120.0130.02513.80
5.3.110.0050.04013.92
5.3.100.0100.03613.54
5.3.90.0090.04013.52
5.3.80.0090.02713.54
5.3.70.0150.03613.51
5.3.60.0100.04213.56
5.3.50.0100.03013.56
5.3.40.0060.03113.47
5.3.30.0070.02613.56
5.3.20.0100.03813.28
5.3.10.0080.02913.36
5.3.00.0100.03813.32

preferences:
45.58 ms | 401 KiB | 5 Q