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); if (!strstr($title, 'ตัวอย่าง')) { $title = strtolower($title); $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); $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); $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.0070.00718.43
8.3.50.0140.00721.79
8.3.40.0100.01018.55
8.3.30.0070.01419.00
8.3.20.0040.00420.26
8.3.10.0060.00323.65
8.3.00.0070.00317.25
8.2.180.0130.00318.16
8.2.170.0110.00422.96
8.2.160.0070.01120.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0070.00022.18
8.2.110.0000.01021.01
8.2.100.0040.00817.78
8.2.90.0080.00019.04
8.2.80.0000.01017.97
8.2.70.0060.00317.50
8.2.60.0050.00217.93
8.2.50.0070.00018.10
8.2.40.0040.00420.42
8.2.30.0000.00720.96
8.2.20.0000.00717.54
8.2.10.0020.00517.92
8.2.00.0050.00319.38
8.1.280.0100.00725.92
8.1.270.0030.00523.90
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00519.32
8.1.230.0070.00317.64
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.25
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0000.00718.61
8.1.150.0020.00518.69
8.1.140.0000.00717.30
8.1.130.0030.00317.69
8.1.120.0030.00317.31
8.1.110.0050.00217.34
8.1.100.0070.00017.20
8.1.90.0000.00717.29
8.1.80.0040.00417.23
8.1.70.0030.00317.28
8.1.60.0000.01017.48
8.1.50.0050.00317.38
8.1.40.0000.00717.37
8.1.30.0040.00417.44
8.1.20.0040.00417.49
8.1.10.0050.00317.38
8.1.00.0040.00417.38
8.0.300.0000.00818.77
8.0.290.0000.01016.63
8.0.280.0040.00418.40
8.0.270.0030.00617.12
8.0.260.0030.00317.17
8.0.250.0030.00316.87
8.0.240.0000.00716.79
8.0.230.0070.00016.80
8.0.220.0000.00616.75
8.0.210.0030.00316.73
8.0.200.0030.00316.83
8.0.190.0000.00816.70
8.0.180.0080.00016.66
8.0.170.0050.00316.80
8.0.160.0000.00716.66
8.0.150.0000.00916.77
8.0.140.0060.00316.70
8.0.130.0090.00013.40
8.0.120.0080.00016.69
8.0.110.0050.00216.76
8.0.100.0000.00716.62
8.0.90.0070.00016.77
8.0.80.0090.00616.71
8.0.70.0020.00516.64
8.0.60.0040.00416.70
8.0.50.0040.00416.60
8.0.30.0160.00616.85
8.0.20.0070.01117.40
8.0.10.0000.00716.66
8.0.00.0080.01216.58
7.4.330.0000.00515.00
7.4.320.0070.00016.41
7.4.300.0030.00316.49
7.4.290.0030.00316.35
7.4.280.0000.00816.43
7.4.270.0000.00616.44
7.4.260.0040.00416.32
7.4.250.0030.00516.34
7.4.240.0020.00516.40
7.4.230.0050.00316.26
7.4.220.0060.01116.56
7.4.210.0070.00616.40
7.4.200.0000.00716.36
7.4.160.0120.00316.21
7.4.150.0090.00917.40
7.4.140.0150.00517.86
7.4.130.0140.00716.44
7.4.120.0090.01016.45
7.4.110.0090.00916.33
7.4.100.0060.01416.45
7.4.90.0090.00916.41
7.4.80.0140.00319.39
7.4.70.0120.00316.15
7.4.60.0130.00316.50
7.4.50.0000.00416.28
7.4.40.0070.01016.26
7.4.30.0080.00816.38
7.3.330.0040.00413.02
7.3.320.0000.00513.04
7.3.310.0000.00716.12
7.3.300.0030.00316.20
7.3.290.0080.00616.25
7.3.280.0090.00816.17
7.3.270.0040.01417.40
7.3.260.0110.00616.45
7.3.250.0100.00716.28
7.3.240.0160.00716.34
7.3.230.0100.00716.39
7.3.210.0060.01316.35
7.3.200.0000.02219.39
7.3.190.0070.01016.54
7.3.180.0030.01316.36
7.3.170.0080.00816.27
7.3.160.0090.00616.29
7.2.330.0080.00816.55
7.2.320.0120.00616.60
7.2.310.0170.00616.29
7.2.300.0060.01216.55
7.2.290.0120.00916.52
5.4.340.0050.03611.99
5.4.320.0050.03712.45
5.4.310.0090.05012.45
5.4.300.0040.03912.45
5.4.290.0050.04512.45
5.4.280.0070.03412.35
5.4.270.0040.03712.34
5.4.260.0040.03912.34
5.4.250.0040.04912.35
5.4.240.0090.03512.34
5.4.230.0070.04212.34
5.4.220.0070.03812.34
5.4.210.0090.04312.34
5.4.200.0050.03812.34
5.4.190.0080.03712.33
5.4.180.0040.04112.33
5.4.170.0060.04112.35
5.4.160.0060.03612.34
5.4.150.0040.03812.34
5.4.140.0070.03812.02
5.4.130.0060.03512.01
5.4.120.0040.04511.97
5.4.110.0090.03911.96
5.4.100.0010.03911.96
5.4.90.0040.03911.96
5.4.80.0100.04111.97
5.4.70.0090.03211.96
5.4.60.0090.03411.96
5.4.50.0080.03511.96
5.4.40.0090.03111.95
5.4.30.0070.03611.95
5.4.20.0060.03611.95
5.4.10.0060.03511.95
5.4.00.0050.03711.44

preferences:
46.88 ms | 401 KiB | 5 Q