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); $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; $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; ?>

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.0060.00918.18
8.3.50.0260.00821.94
8.3.40.0070.01418.55
8.3.30.0100.00318.83
8.3.20.0030.00520.24
8.3.10.0080.00023.62
8.3.00.0040.00419.11
8.2.180.0000.01516.75
8.2.170.0110.00322.96
8.2.160.0100.00320.11
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00822.18
8.2.110.0040.00420.53
8.2.100.0040.00718.03
8.2.90.0070.00019.18
8.2.80.0000.00817.97
8.2.70.0030.00617.48
8.2.60.0000.01217.68
8.2.50.0000.00818.07
8.2.40.0050.00319.82
8.2.30.0040.00717.83
8.2.20.0000.00717.65
8.2.10.0040.00418.02
8.2.00.0030.00619.23
8.1.280.0180.00025.92
8.1.270.0040.00423.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.90
8.1.230.0070.00319.14
8.1.220.0000.00717.74
8.1.210.0080.00018.77
8.1.200.0060.00317.10
8.1.190.0040.00416.96
8.1.180.0000.00818.10
8.1.170.0050.00318.50
8.1.160.0000.00721.84
8.1.150.0050.00518.73
8.1.140.0040.00417.36
8.1.130.0000.00717.61
8.1.120.0000.00717.36
8.1.110.0080.00017.20
8.1.100.0050.00217.22
8.1.90.0070.00017.20
8.1.80.0000.00717.34
8.1.70.0070.00017.27
8.1.60.0070.00617.52
8.1.50.0030.00617.40
8.1.40.0000.00717.33
8.1.30.0000.00917.52
8.1.20.0030.00517.41
8.1.10.0040.00417.38
8.1.00.0000.00817.29
8.0.300.0030.00518.77
8.0.290.0000.00716.63
8.0.280.0030.00318.29
8.0.270.0000.00717.14
8.0.260.0030.00317.23
8.0.250.0030.00316.71
8.0.240.0040.00416.72
8.0.230.0050.00216.82
8.0.220.0030.00516.71
8.0.210.0000.00716.81
8.0.200.0000.00616.72
8.0.190.0080.00016.85
8.0.180.0070.00016.71
8.0.170.0040.00416.81
8.0.160.0080.00016.63
8.0.150.0060.00316.63
8.0.140.0000.00816.63
8.0.130.0060.00013.67
8.0.120.0000.00716.61
8.0.110.0050.00316.64
8.0.100.0000.00716.70
8.0.90.0030.00516.58
8.0.80.0070.01016.63
8.0.70.0040.00416.62
8.0.60.0050.00216.57
8.0.50.0040.00416.56
8.0.30.0160.00617.02
8.0.20.0080.01117.40
8.0.10.0070.00016.94
8.0.00.0110.00616.58
7.4.330.0000.00615.19
7.4.320.0030.00316.41
7.4.300.0060.00016.36
7.4.290.0050.00216.34
7.4.280.0000.00716.50
7.4.270.0040.00416.41
7.4.260.0050.00216.34
7.4.250.0040.00416.18
7.4.240.0020.00516.37
7.4.230.0030.00316.16
7.4.220.0070.01116.23
7.4.210.0100.00916.32
7.4.200.0000.00816.53
7.4.160.0030.01316.47
7.4.150.0150.00317.40
7.4.140.0130.00717.86
7.4.130.0130.00716.28
7.4.120.0100.00816.38
7.4.110.0130.00616.43
7.4.100.0070.01016.27
7.4.90.0140.00316.39
7.4.80.0100.01319.39
7.4.70.0090.00816.23
7.4.60.0090.00616.46
7.4.50.0080.00015.98
7.4.40.0040.01416.36
7.4.30.0070.01016.34
7.4.00.0040.01115.02
7.3.330.0030.00313.19
7.3.320.0000.00513.38
7.3.310.0030.00616.18
7.3.300.0000.00616.14
7.3.290.0060.00616.10
7.3.280.0070.01016.16
7.3.270.0180.00617.40
7.3.260.0100.00716.50
7.3.250.0100.00716.40
7.3.240.0000.01616.50
7.3.230.0120.00316.45
7.3.210.0110.01316.34
7.3.200.0030.01419.39
7.3.190.0100.01016.46
7.3.180.0100.00716.45
7.3.170.0090.00616.27
7.3.160.0090.00616.45
7.2.330.0140.00816.20
7.2.320.0110.00716.29
7.2.310.0030.01716.21
7.2.300.0070.01016.20
7.2.290.0120.00616.55
7.1.70.0170.00017.52
7.1.60.0000.01517.69
7.1.50.0030.01017.29
7.1.00.0100.07022.34
7.0.200.0040.01317.04
7.0.140.0070.07022.12
7.0.60.0100.08019.83
7.0.50.0100.04717.91
7.0.40.0130.09020.13
7.0.30.0200.06020.04
7.0.20.0270.08020.04
7.0.10.0070.04320.02
7.0.00.0100.04720.11
5.6.280.0130.06320.82
5.6.210.0100.05720.50
5.6.200.0070.08318.12
5.6.190.0100.06320.57
5.6.180.0300.05020.61
5.6.170.0330.04720.42
5.6.160.0030.05020.32
5.6.150.0100.08018.20
5.6.140.0000.07318.21
5.6.130.0030.04718.09
5.6.120.0100.06021.08
5.6.110.0070.08720.98
5.6.100.0130.08321.00
5.6.90.0000.04720.95
5.6.80.0100.04720.28
5.6.70.4400.04320.42
5.5.350.0130.08020.38
5.5.340.0030.08317.90
5.5.330.0030.06020.21
5.5.320.0100.08020.31
5.5.310.0300.07020.28
5.5.300.0070.05718.01
5.5.290.0100.07017.92
5.5.280.0030.08720.87
5.5.270.0130.08020.76
5.5.260.0100.06020.79
5.5.250.0100.06720.64
5.5.240.0230.07020.29
5.4.450.0300.05019.39
5.4.440.0700.04019.21
5.4.430.0170.05019.21
5.4.420.0630.00019.27
5.4.410.0630.00019.32
5.4.400.0630.00018.96
5.4.390.0670.00019.09
5.4.380.0830.00018.98
5.4.370.0630.00019.04
5.4.360.0600.00018.98
5.4.350.0670.00019.09
5.4.340.0050.03911.97
5.4.320.0050.03612.45
5.4.310.0110.03312.45
5.4.300.0070.04812.45
5.4.290.0110.04112.45
5.4.280.0120.03412.34
5.4.270.0060.04212.34
5.4.260.0090.04212.34
5.4.250.0100.03812.34
5.4.240.0080.04412.34
5.4.230.0080.04012.34
5.4.220.0040.03812.34
5.4.210.0040.03712.34
5.4.200.0060.04112.34
5.4.190.0060.04112.34
5.4.180.0110.03212.33
5.4.170.0070.03412.34
5.4.160.0060.03812.34
5.4.150.0070.04012.34
5.4.140.0100.03512.02
5.4.130.0060.03712.01
5.4.120.0070.03611.97
5.4.110.0050.03611.96
5.4.100.0070.04211.96
5.4.90.0060.04111.97
5.4.80.0070.05211.96
5.4.70.0060.04411.96
5.4.60.0080.03311.96
5.4.50.0100.04011.96
5.4.40.0080.03711.95
5.4.30.0080.03611.95
5.4.20.0110.03511.95
5.4.10.0090.03611.95
5.4.00.0050.03611.44
5.3.290.0060.03812.80
5.3.280.0050.04812.71
5.3.270.0030.05812.72
5.3.260.0060.04012.72
5.3.250.0050.04012.72
5.3.240.0070.04312.72
5.3.230.0080.03712.71
5.3.220.0050.04412.68
5.3.210.0050.04912.68
5.3.200.0050.04612.68
5.3.190.0060.04312.68
5.3.180.0090.04312.67
5.3.170.0080.03412.67
5.3.160.0100.03712.67
5.3.150.0060.03612.67
5.3.140.0060.03612.66
5.3.130.0080.03712.66
5.3.120.0100.04512.65
5.3.110.0050.04012.66
5.3.100.0050.03812.12
5.3.90.0060.03612.08
5.3.80.0030.03912.07
5.3.70.0050.03712.08
5.3.60.0070.03712.06
5.3.50.0030.04112.00
5.3.40.0050.03812.00
5.3.30.0060.04511.94
5.3.20.0070.03511.72
5.3.10.0090.03211.69
5.3.00.0080.03411.68
5.2.170.0040.0349.17
5.2.160.0060.0329.18
5.2.150.0040.0329.17
5.2.140.0030.0339.17
5.2.130.0070.0389.13
5.2.120.0060.0329.13
5.2.110.0100.0329.14
5.2.100.0070.0269.13
5.2.90.0050.0339.13
5.2.80.0100.0389.13
5.2.70.0080.0349.13
5.2.60.0060.0349.09
5.2.50.0020.0339.06
5.2.40.0070.0339.04
5.2.30.0070.0399.01
5.2.20.0070.0288.99
5.2.10.0040.0318.91
5.2.00.0060.0348.77
5.1.60.0040.0248.06
5.1.50.0050.0258.06
5.1.40.0050.0328.04
5.1.30.0060.0258.39
5.1.20.0080.0368.41
5.1.10.0050.0328.14
5.1.00.0060.0248.14
5.0.50.0030.0266.61
5.0.40.0030.0206.48
5.0.30.0040.0406.29
5.0.20.0040.0186.25
5.0.10.0030.0196.24
5.0.00.0040.0296.23
4.4.90.0030.0154.78
4.4.80.0010.0164.75
4.4.70.0020.0164.75
4.4.60.0040.0144.76
4.4.50.0050.0154.77
4.4.40.0040.0294.71
4.4.30.0070.0124.76
4.4.20.0040.0204.84
4.4.10.0010.0204.84
4.4.00.0070.0254.76
4.3.110.0020.0164.67
4.3.100.0040.0204.67
4.3.90.0030.0174.63
4.3.80.0020.0304.59
4.3.70.0020.0204.63
4.3.60.0050.0134.63
4.3.50.0030.0164.63
4.3.40.0030.0284.53
4.3.30.0020.0183.27
4.3.20.0030.0223.26
4.3.10.0010.0183.21
4.3.00.0030.01710.14

preferences:
49.39 ms | 401 KiB | 5 Q