3v4l.org

run code in 300+ PHP versions simultaneously
<?php $team1="U23 Benfica:Vitoria Guimaraes"; $team2="Benfica (U23):Vitoria Guimaraes U23"; var_dump(match($team1, $team2)); $team1="U23 Benfica:Vitoria Guimaraes"; $team2="Benfica U23:Vitoria Guimaraes(U23)"; var_dump(match($team1, $team2)); $team1="Benfica U23:Vitoria Guimaraes(U23)"; $team2="Benfica (U23):Vitoria Guimaraes U23"; var_dump(match($team1, $team2)); function match($s1, $s2){ $s1 = str_replace(["(",")"], " ", $s1); $s2 = str_replace(["(",")"], " ", $s2); $delimiters = [" ", ":"]; $arr1 = array_filter(multiexplode($delimiters,$s1)); $arr2 = array_filter(multiexplode($delimiters,$s2)); //var_dump($arr1, $arr2); $intersect = count(array_unique(array_intersect($arr1, $arr2))); if($intersect == count(array_unique($arr1)) && $intersect == count(array_unique($arr2))){ return true; }else{ return false; } } function multiexplode ($delimiters,$string) { $ready = str_replace($delimiters, $delimiters[0], $string); $launch = explode($delimiters[0], $ready); return $launch; }

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.5.10.0090.00916.52
8.5.00.0120.00920.05
8.4.150.0030.00014.05
8.4.140.0110.01017.53
8.4.130.0120.00717.83
8.4.120.0090.01122.36
8.4.110.0120.00822.63
8.4.100.0120.01024.61
8.4.90.0080.01218.54
8.4.80.0060.00418.04
8.4.70.0100.00918.18
8.4.60.0060.00320.84
8.4.50.0060.00420.56
8.4.40.0100.01019.69
8.4.30.0120.00617.63
8.4.20.0160.00620.54
8.4.10.0000.00917.74
8.3.280.0070.01218.29
8.3.270.0100.00816.97
8.3.260.0130.00716.56
8.3.250.0090.01018.97
8.3.240.0110.00816.70
8.3.230.0130.00716.58
8.3.220.0100.00617.39
8.3.210.0120.00418.75
8.3.200.0100.00916.86
8.3.190.0110.00817.11
8.3.180.0050.00619.13
8.3.170.0090.00919.04
8.3.160.0060.01320.29
8.3.150.0090.00916.89
8.3.140.0090.00916.63
8.3.130.0080.00018.39
8.3.120.0000.00820.55
8.3.110.0000.01216.75
8.3.100.0100.01016.57
8.3.90.0120.00626.77
8.3.80.0030.00618.43
8.3.70.0070.01116.61
8.3.60.0000.01518.43
8.3.50.0070.01118.32
8.3.40.0140.00418.75
8.3.30.0090.00618.76
8.3.20.0040.00420.85
8.3.10.0070.00021.84
8.3.00.0060.00319.38
8.2.290.0090.00820.23
8.2.280.0080.00218.25
8.2.270.0000.00917.23
8.2.260.0060.00316.41
8.2.250.0040.00416.75
8.2.240.0000.01416.79
8.2.230.0060.00320.94
8.2.220.0030.00624.06
8.2.210.0160.00326.77
8.2.200.0030.00616.50
8.2.190.0150.00016.58
8.2.180.0140.00416.75
8.2.170.0060.00922.96
8.2.160.0140.00020.89
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00020.90
8.2.110.0000.00922.25
8.2.100.0000.01217.41
8.2.90.0080.00017.75
8.2.80.0030.00618.04
8.2.70.0040.00417.64
8.2.60.0070.00018.03
8.2.50.0000.00818.10
8.2.40.0090.00019.23
8.2.30.0030.00518.96
8.2.20.0000.00717.96
8.2.10.0040.00419.09
8.2.00.0030.00517.80
8.1.330.0100.00921.89
8.1.320.0110.00916.09
8.1.310.0070.01018.17
8.1.300.0030.00618.02
8.1.290.0030.00630.84
8.1.280.0160.00325.92
8.1.270.0000.00818.52
8.1.260.0080.00026.35
8.1.250.0090.00628.09
8.1.240.0110.00320.02
8.1.230.0100.00020.88
8.1.220.0040.00717.74
8.1.210.0030.00518.77
8.1.200.0030.00617.00
8.1.190.0000.00816.88
8.1.180.0080.00018.10
8.1.170.0080.00018.48
8.1.160.0040.00418.79
8.1.150.0040.00418.66
8.1.140.0070.00018.73
8.1.130.0020.00718.67
8.1.120.0080.00218.26
8.1.110.0070.00217.31
8.1.100.0070.00217.24
8.1.90.0070.00218.18
8.1.80.0080.00117.36
8.1.70.0070.00217.32
8.1.60.0050.00317.42
8.1.50.0050.00417.36
8.1.40.0060.00417.34
8.1.30.0060.00517.31
8.1.20.0070.00417.30
8.1.10.0080.00317.28
8.1.00.0040.00617.27
8.0.300.0040.00719.72
8.0.290.0000.00716.58
8.0.280.0030.00318.39
8.0.270.0040.00417.16
8.0.260.0090.00017.65
8.0.250.0060.00516.96
8.0.240.0080.00316.93
8.0.230.0040.00516.92
8.0.220.0030.00716.86
8.0.210.0040.00716.90
8.0.200.0050.00616.87
8.0.190.0060.00416.88
8.0.180.0110.00016.86
8.0.170.0080.00316.90
8.0.160.0060.00416.91
8.0.150.0090.00316.81
8.0.140.0030.00716.84
8.0.130.0040.00615.74
8.0.120.0050.00516.84
8.0.110.0030.00516.82
8.0.100.0090.00116.79
8.0.90.0010.00816.85
8.0.80.0070.00616.82
8.0.70.0060.00316.83
8.0.60.0040.00516.84
8.0.50.0050.00316.87
8.0.30.0100.00416.85
8.0.20.0090.00516.87
8.0.10.0070.00216.88
8.0.00.0080.00916.71
7.4.330.0060.00116.25
7.4.320.0070.00316.69
7.4.300.0060.00416.67
7.4.290.0020.00916.72
7.4.280.0020.00716.67
7.4.270.0070.00216.62
7.4.260.0030.00616.66
7.4.250.0060.00316.70
7.4.240.0070.00316.74
7.4.230.0020.00716.64
7.4.220.0080.00216.74
7.4.210.0060.00816.58
7.4.200.0070.00216.56
7.4.190.0080.00216.76
7.4.180.0070.00416.82
7.4.160.0080.00616.54
7.4.150.0090.00216.77
7.4.140.0060.00917.03
7.4.130.0100.00416.57
7.4.120.0050.00816.62
7.4.110.0050.00916.59
7.4.100.0110.00616.67
7.4.90.0060.00816.58
7.4.80.0070.00817.31
7.4.70.0100.00616.63
7.4.60.0070.00916.53
7.4.50.0080.00616.54
7.4.40.0080.00516.58
7.4.30.0090.00416.51
7.4.20.0110.00316.62
7.4.10.0080.00716.15
7.4.00.0080.00616.01
7.3.330.0060.00715.53
7.3.320.0110.00215.57
7.3.310.0110.00216.47
7.3.300.0090.00416.46
7.3.290.0100.00316.53
7.3.280.0100.00716.41
7.3.270.0130.00316.67
7.3.260.0100.00716.59
7.3.250.0100.00716.51
7.3.240.0100.00616.45
7.3.230.0090.00816.50
7.3.220.0100.00916.45
7.3.210.0120.00516.44
7.3.200.0110.00616.47
7.3.190.0120.00616.49
7.3.180.0100.00816.52
7.3.170.0080.00916.54
7.3.160.0140.00216.52
7.3.150.0160.00416.44
7.3.140.0140.00216.54
7.3.130.0110.00616.16
7.3.120.0150.00416.13
7.3.110.0110.00816.03
7.3.100.0100.00616.09
7.3.90.0100.00616.06
7.3.80.0070.00916.05
7.3.70.0130.00416.15
7.3.60.0090.00515.97
7.3.50.0090.00616.12
7.3.40.0070.00916.07
7.3.30.0100.00716.13
7.3.20.0170.00517.15
7.3.10.0310.00716.73
7.3.00.0330.01016.80
7.2.340.0090.00916.59
7.2.330.0100.00716.70
7.2.320.0130.00516.64
7.2.310.0110.00516.60
7.2.300.0080.01016.68
7.2.290.0120.00516.60
7.2.280.0110.00816.60
7.2.270.0120.00716.71
7.2.260.0090.01016.25
7.2.250.0130.00616.26
7.2.240.0090.00716.26
7.2.230.0090.00716.29
7.2.220.0100.00616.14
7.2.210.0090.00816.29
7.2.200.0120.00616.23
7.2.190.0120.00416.26
7.2.180.0100.00516.19
7.2.170.0100.00516.25
7.2.160.0100.00816.18
7.2.150.0120.00617.36
7.2.140.0110.00817.56
7.2.130.0290.00916.97
7.2.120.2060.00416.95
7.2.110.1720.00717.10
7.2.100.1550.00617.00
7.2.90.1700.00617.01
7.2.80.1560.00716.89
7.2.70.1760.00816.92
7.2.60.1460.00816.83
7.2.50.1630.00817.08
7.2.40.1340.00617.02
7.2.30.1340.00717.00
7.2.20.0300.00717.05
7.2.10.0830.00916.93
7.2.00.1750.00616.96
7.1.330.0130.00716.39
7.1.320.0170.00416.55
7.1.310.0130.00816.62
7.1.300.0140.00616.55
7.1.290.0160.00516.48
7.1.280.0130.00716.50
7.1.270.0160.00716.56
7.1.260.0130.00616.38
7.1.250.0910.00515.94
7.1.240.0150.00516.42
7.1.230.0130.00816.45
7.1.220.0160.00516.40
7.1.210.0150.00616.37
7.1.200.0140.00716.48
7.1.190.0140.00816.50
7.1.180.0130.00816.50
7.1.170.0120.00816.49
7.1.160.0150.00616.41
7.1.150.0130.00716.41
7.1.140.0090.00816.50
7.1.130.0130.00416.52
7.1.120.0090.01216.44
7.1.110.0120.00616.48
7.1.100.0180.00316.46
7.1.90.0110.00916.38
7.1.80.0100.01016.54
7.1.70.0110.00816.38
7.1.60.0120.00816.51
7.1.50.0130.00716.55
7.1.40.0120.00616.55
7.1.30.0170.00616.49
7.1.20.0130.00616.50
7.1.10.0160.00316.47
7.1.00.0150.00316.41

preferences:
35.47 ms | 403 KiB | 5 Q