3v4l.org

run code in 300+ PHP versions simultaneously
<? $title = "ดูซีรี่ย์ฝรั่ง&nbsp;Arrow Season 3 Ep.1-1"; $title = trim(trim($title, chr(0xC2).chr(0xA0))); $title = preg_replace("/&#?[a-z0-9]+;/i","",$title); echo $title."\n"; $title = strtolower($title); echo $title."\n"; $pattern = array("~\s*(season)\s*(\d+[-]?[0-9]*).*\s*(?:ep[.]?|episode)\s*(\d+[-]?[0-9]*)(\s*)~", "~\s*(?:ep[.]?|episode)\s*(\d+[-]?[0-9]*)(\s*)~"); $title = preg_replace($pattern, array(" $1 $2 ep. $3"," ep. $1"), $title, -1); $title = ucwords($title); echo $title."\n"; $episodename = str_replace("’","'",$title); $pttr = '/[ก-๙]/ui'; $new_str = preg_replace($pttr, '', $episodename); $new_str = preg_replace('/\s+/', ' ', $new_str); $new_str = str_replace('..', '', $new_str); $new_str = trim($new_str); $new_str = ucwords($new_str); $episode = $new_str; echo $episode."\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.00618.31
8.3.50.0130.00821.90
8.3.40.0120.00318.63
8.3.30.0110.00319.00
8.3.20.0040.00420.16
8.3.10.0000.00723.39
8.3.00.0030.00717.38
8.2.180.0060.00916.38
8.2.170.0040.01122.96
8.2.160.0070.00720.45
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00022.07
8.2.110.0000.00920.39
8.2.100.0110.00018.09
8.2.90.0070.00019.09
8.2.80.0050.00317.97
8.2.70.0070.00717.00
8.2.60.0080.00417.80
8.2.50.0060.00618.07
8.2.40.0000.00819.83
8.2.30.0040.00417.92
8.2.20.0020.00517.45
8.2.10.0050.00317.92
8.2.00.0030.00517.41
8.1.280.0110.00625.92
8.1.270.0040.00423.77
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0030.00623.91
8.1.230.0090.00319.01
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0040.00417.10
8.1.190.0030.00517.00
8.1.180.0000.00818.10
8.1.170.0040.00418.58
8.1.160.0000.00821.84
8.1.150.0030.00618.65
8.1.140.0070.00017.18
8.1.130.0030.00317.66
8.1.120.0040.00317.21
8.1.110.0050.00217.20
8.1.100.0030.00317.33
8.1.90.0050.00217.31
8.1.80.0040.00417.19
8.1.70.0030.00317.20
8.1.60.0070.00417.39
8.1.50.0050.00317.29
8.1.40.0040.00417.38
8.1.30.0040.00417.46
8.1.20.0000.00817.51
8.1.10.0040.00417.45
8.1.00.0000.00817.37
8.0.300.0050.00318.77
8.0.290.0040.00416.63
8.0.280.0040.00418.43
8.0.270.0040.00417.18
8.0.260.0030.00317.18
8.0.250.0030.00316.78
8.0.240.0030.00316.71
8.0.230.0030.00316.75
8.0.220.0000.00716.79
8.0.210.0030.00316.77
8.0.200.0030.00316.82
8.0.190.0000.00816.81
8.0.180.0080.00016.74
8.0.170.0000.00816.61
8.0.160.0000.00716.79
8.0.150.0070.00416.70
8.0.140.0030.00316.74
8.0.130.0000.00713.54
8.0.120.0080.00016.69
8.0.110.0030.00516.78
8.0.100.0050.00216.66
8.0.90.0080.00016.81
8.0.80.0060.00916.79
8.0.70.0050.00216.66
8.0.60.0070.00016.64
8.0.50.0040.00416.54
8.0.30.0130.01016.82
8.0.20.0090.01317.40
8.0.10.0070.00016.67
8.0.00.0100.01016.67
7.4.330.0030.00315.05
7.4.320.0000.00616.46
7.4.300.0030.00316.40
7.4.290.0030.00316.38
7.4.280.0000.00916.37
7.4.270.0040.00316.35
7.4.260.0040.00416.44
7.4.250.0030.00516.33
7.4.240.0040.00316.48
7.4.230.0040.00416.27
7.4.220.0060.01016.50
7.4.210.0110.00616.36
7.4.200.0050.00216.20
7.4.160.0130.00316.26
7.4.150.0070.01117.40
7.4.140.0080.00817.86
7.4.130.0120.00916.46
7.4.120.0070.01116.46
7.4.110.0120.00716.39
7.4.100.0070.01316.34
7.4.90.0120.00616.34
7.4.80.0190.00319.39
7.4.70.0130.00316.36
7.4.60.0110.00716.41
7.4.50.0000.00616.43
7.4.40.0100.00716.38
7.4.30.0100.00616.23
7.4.00.0060.00914.72
7.3.330.0040.00413.26
7.3.320.0030.00313.34
7.3.310.0000.00716.09
7.3.300.0000.00616.08
7.3.290.0070.00716.14
7.3.280.0090.00816.08
7.3.270.0090.00917.40
7.3.260.0100.00616.39
7.3.250.0100.00716.38
7.3.240.0100.00716.43
7.3.230.0030.01316.39
7.3.210.0130.00416.18
7.3.200.0060.01219.39
7.3.190.0120.00416.25
7.3.180.0060.01016.31
7.3.170.0090.00616.27
7.3.160.0060.01216.41
7.2.330.0130.00616.55
7.2.320.0070.01116.30
7.2.310.0060.01216.13
7.2.300.0040.01216.49
7.2.290.0060.01216.51
7.2.80.0100.00316.78
7.2.60.0130.00016.75
7.2.50.0060.00916.93
7.1.200.0030.01316.02
7.1.70.0160.00017.37
7.1.60.0100.01419.32
7.1.50.0000.01417.13
7.1.00.0000.08022.46
7.0.200.0040.00416.94
7.0.140.0130.06022.12
7.0.60.0100.06019.96
7.0.50.0030.05017.92
7.0.40.0070.09020.27
7.0.30.0170.06020.22
7.0.20.0330.07320.15
7.0.10.0070.04020.36
7.0.00.0030.05720.11
5.6.280.0030.07720.82
5.6.210.0100.08320.72
5.6.200.0070.06018.21
5.6.190.0000.08720.48
5.6.180.0030.05020.41
5.6.170.0230.04720.42
5.6.160.0070.05720.61
5.6.150.0100.07718.13
5.6.140.0070.08318.15
5.6.130.0130.04018.11
5.6.120.0070.03721.15
5.6.110.0130.08021.02
5.6.100.0130.07020.94
5.6.90.0200.06020.88
5.6.80.0030.05720.54
5.6.70.4230.03720.37
5.5.350.0130.08320.38
5.5.340.0000.08717.95
5.5.330.0130.07320.43
5.5.320.0430.06320.32
5.5.310.0200.03720.29
5.5.300.0000.08318.02
5.5.290.0100.06017.92
5.5.280.0130.08020.88
5.5.270.0100.07320.80
5.5.260.0170.08020.76
5.5.250.0100.08320.69
5.5.240.0170.08020.16
5.4.450.0500.04019.14
5.4.440.0300.05019.55
5.4.430.0500.03719.41
5.4.420.0630.00019.63
5.4.410.0630.00019.20
5.4.400.0700.00019.05
5.4.390.0630.00019.05
5.4.380.0700.00019.07
5.4.370.0630.00018.95
5.4.360.0630.00019.05
5.4.350.0630.00019.18
5.4.340.0080.03611.98
5.4.320.0040.03912.45
5.4.310.0040.04212.45
5.4.300.0070.03612.45
5.4.290.0050.04612.45
5.4.280.0070.03512.35
5.4.270.0090.03412.34
5.4.260.0060.04712.35
5.4.250.0060.04212.35
5.4.240.0070.03912.35
5.4.230.0080.03512.34
5.4.220.0100.03712.34
5.4.210.0100.03512.34
5.4.200.0050.04712.34
5.4.190.0090.04712.33
5.4.180.0070.04112.33
5.4.170.0040.03912.34
5.4.160.0050.03712.34
5.4.150.0040.05112.34
5.4.140.0060.04012.02
5.4.130.0030.03912.01
5.4.120.0080.03711.97
5.4.110.0090.03411.96
5.4.100.0040.03811.96
5.4.90.0060.03711.96
5.4.80.0050.03811.96
5.4.70.0060.03511.96
5.4.60.0070.03911.96
5.4.50.0030.03711.96
5.4.40.0080.03311.95
5.4.30.0070.04511.95
5.4.20.0090.03411.95
5.4.10.0050.03511.95
5.4.00.0060.03611.43
5.3.290.0080.03812.80
5.3.280.0040.04012.70
5.3.270.0050.04012.72
5.3.260.0090.03712.72
5.3.250.0090.03712.72
5.3.240.0060.04012.72
5.3.230.0060.04512.71
5.3.220.0080.04112.68
5.3.210.0110.03412.68
5.3.200.0070.03712.68
5.3.190.0060.04012.68
5.3.180.0050.04112.67
5.3.170.0060.04112.67
5.3.160.0100.04112.67
5.3.150.0060.03912.68
5.3.140.0080.04012.66
5.3.130.0060.04312.65
5.3.120.0070.04112.65
5.3.110.0080.03912.66
5.3.100.0070.03512.12
5.3.90.0070.03512.08
5.3.80.0040.03812.07
5.3.70.0060.03612.08
5.3.60.0050.03612.06
5.3.50.0090.03312.00
5.3.40.0070.03712.00
5.3.30.0030.03911.94
5.3.20.0040.03611.71
5.3.10.0080.03511.69
5.3.00.0060.03711.68
5.2.170.0040.0359.17
5.2.160.0030.0389.17
5.2.150.0030.0319.18
5.2.140.0060.0329.17
5.2.130.0020.0319.13
5.2.120.0040.0299.13
5.2.110.0050.0309.14
5.2.100.0100.0229.14
5.2.90.0050.0299.14
5.2.80.0060.0339.13
5.2.70.0060.0299.13
5.2.60.0040.0339.09
5.2.50.0060.0289.06
5.2.40.0050.0299.04
5.2.30.0030.0319.00
5.2.20.0050.0289.00
5.2.10.0040.0328.92
5.2.00.0030.0308.77
5.1.60.0030.0258.06
5.1.50.0030.0268.05
5.1.40.0080.0258.04
5.1.30.0090.0278.39
5.1.20.0060.0268.41
5.1.10.0040.0308.13
5.1.00.0050.0338.13
5.0.50.0030.0246.61
5.0.40.0040.0216.48
5.0.30.0040.0336.28
5.0.20.0030.0206.25
5.0.10.0020.0216.24
5.0.00.0020.0326.23
4.4.90.0050.0164.78
4.4.80.0060.0154.76
4.4.70.0040.0174.76
4.4.60.0020.0164.75
4.4.50.0030.0174.77
4.4.40.0050.0284.71
4.4.30.0050.0194.76
4.4.20.0030.0164.85
4.4.10.0050.0214.85
4.4.00.0030.0244.76
4.3.110.0050.0144.67
4.3.100.0030.0154.67
4.3.90.0030.0204.63
4.3.80.0020.0254.58
4.3.70.0080.0134.63
4.3.60.0030.0164.63
4.3.50.0020.0164.63
4.3.40.0030.0244.54
4.3.30.0020.0213.28
4.3.20.0020.0213.25
4.3.10.0030.0203.21
4.3.00.0030.01710.13

preferences:
37.28 ms | 401 KiB | 5 Q