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; $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; echo htmlentities($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.0090.00618.05
8.3.50.0280.00722.02
8.3.40.0060.00918.67
8.3.30.0100.00318.96
8.3.20.0040.00420.22
8.3.10.0080.00023.65
8.3.00.0080.00019.38
8.2.180.0110.00418.16
8.2.170.0120.00322.96
8.2.160.0070.00720.25
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0070.00022.24
8.2.110.0100.00721.17
8.2.100.0060.00617.63
8.2.90.0000.00819.27
8.2.80.0030.00517.97
8.2.70.0080.00017.50
8.2.60.0080.00217.68
8.2.50.0030.00518.07
8.2.40.0000.00819.76
8.2.30.0070.00417.91
8.2.20.0040.00417.52
8.2.10.0000.00717.91
8.2.00.0040.00417.58
8.1.280.0100.01025.92
8.1.270.0080.00023.83
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.88
8.1.230.0060.00617.42
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.11
8.1.190.0050.00316.87
8.1.180.0030.00618.10
8.1.170.0080.00018.65
8.1.160.0040.00421.91
8.1.150.0040.00718.70
8.1.140.0000.00817.24
8.1.130.0070.00017.71
8.1.120.0050.00217.34
8.1.110.0020.00517.32
8.1.100.0070.00017.33
8.1.90.0030.00317.30
8.1.80.0000.00717.22
8.1.70.0000.00717.20
8.1.60.0030.00917.46
8.1.50.0040.00417.43
8.1.40.0090.00017.41
8.1.30.0040.00417.44
8.1.20.0030.00617.50
8.1.10.0050.00317.36
8.1.00.0040.00417.25
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.32
8.0.270.0030.00317.23
8.0.260.0000.00617.08
8.0.250.0030.00316.77
8.0.240.0030.00316.71
8.0.230.0040.00416.67
8.0.220.0040.00416.71
8.0.210.0070.00016.79
8.0.200.0030.00316.82
8.0.190.0040.00416.80
8.0.180.0040.00416.81
8.0.170.0000.00816.81
8.0.160.0050.00316.63
8.0.150.0040.00416.70
8.0.140.0030.00516.57
8.0.130.0060.00013.63
8.0.120.0080.00016.77
8.0.110.0000.00716.79
8.0.100.0080.00016.73
8.0.90.0040.00416.69
8.0.80.0060.00916.71
8.0.70.0070.00016.79
8.0.60.0040.00416.82
8.0.50.0040.00416.61
8.0.30.0120.00816.96
8.0.20.0130.00417.40
8.0.10.0000.00816.81
8.0.00.0030.01416.49
7.4.330.0050.00015.11
7.4.320.0000.00616.44
7.4.300.0000.00616.50
7.4.290.0030.00316.46
7.4.280.0030.00316.43
7.4.270.0030.00316.35
7.4.260.0000.00716.44
7.4.250.0040.00416.34
7.4.240.0050.00216.35
7.4.230.0030.00316.56
7.4.220.0100.00716.48
7.4.210.0090.00616.31
7.4.200.0040.00416.24
7.4.160.0060.00916.40
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0110.00816.37
7.4.120.0070.01116.54
7.4.110.0070.01016.50
7.4.100.0040.01416.40
7.4.90.0090.00816.36
7.4.80.0110.00519.39
7.4.70.0100.00716.30
7.4.60.0120.00316.25
7.4.50.0030.00616.16
7.4.40.0080.00816.10
7.4.30.0150.00616.10
7.4.00.0100.00814.73
7.3.330.0030.00313.36
7.3.320.0000.00513.39
7.3.310.0080.00016.13
7.3.300.0030.00316.01
7.3.290.0110.00316.17
7.3.280.0090.00916.13
7.3.270.0150.00417.40
7.3.260.0070.01116.17
7.3.250.0100.00616.48
7.3.240.0090.01116.21
7.3.230.0060.01016.39
7.3.210.0060.01216.24
7.3.200.0130.01019.39
7.3.190.0070.01416.41
7.3.180.0090.00616.36
7.3.170.0060.01316.27
7.3.160.0090.00616.08
7.3.120.0070.01014.96
7.3.110.0070.00714.67
7.3.100.0030.01014.69
7.3.90.0000.01814.74
7.3.80.0040.00714.63
7.3.70.0100.00714.54
7.3.60.0050.00514.69
7.3.50.0110.00714.56
7.3.40.0080.00414.59
7.3.30.0130.00014.69
7.3.20.0090.00016.58
7.3.10.0050.00916.74
7.3.00.0060.00716.60
7.2.330.0090.00916.48
7.2.320.0070.01016.31
7.2.310.0070.01416.38
7.2.300.0120.00416.61
7.2.290.0110.00716.52
7.2.250.0060.01214.88
7.2.240.0060.01315.02
7.2.230.0030.01014.65
7.2.220.0110.00714.93
7.2.210.0030.00914.92
7.2.200.0090.00914.53
7.2.190.0060.00914.95
7.2.180.0070.00714.90
7.2.170.0070.01014.60
7.2.130.0130.00017.10
7.2.120.0060.00316.88
7.2.110.0070.00716.63
7.2.100.0060.00617.17
7.2.90.0050.00517.14
7.2.80.0040.01116.90
7.2.70.0030.00617.18
7.2.60.0040.00916.97
7.2.50.0090.00317.10
7.2.40.0000.01516.91
7.2.30.0000.01117.12
7.2.20.0110.00017.12
7.2.10.0030.01017.05
7.2.00.0080.00017.00
7.1.330.0030.00915.40
7.1.320.0100.00015.52
7.1.310.0070.00715.69
7.1.300.0030.00715.65
7.1.290.0040.01115.66
7.1.280.0070.01015.36
7.1.270.0030.01015.62
7.1.260.0070.00715.75
7.1.250.0120.00316.20
7.1.200.0000.01115.93
7.1.70.0000.00717.31
7.1.60.0120.01219.32
7.1.50.0130.01117.20
7.1.00.0000.08022.38
7.0.200.0070.00316.96
7.0.140.0070.06721.95
7.0.60.0100.05321.72
7.0.50.0030.07717.85
7.0.40.0030.09020.54
7.0.30.0270.06320.21
7.0.20.0370.07320.36
7.0.10.0100.07720.06
7.0.00.0070.04320.32
5.6.280.0030.07320.83
5.6.210.0130.07020.55
5.6.200.0030.08018.17
5.6.190.0170.05720.56
5.6.180.0600.06020.48
5.6.170.0470.06320.41
5.6.160.0070.07720.52
5.6.150.0100.07718.13
5.6.140.0100.06018.11
5.6.130.0070.05318.11
5.6.120.0170.07321.05
5.6.110.0100.08321.11
5.6.100.0200.07021.11
5.6.90.0070.08320.96
5.6.80.0030.08720.37
5.5.350.0200.08720.42
5.5.340.0000.04717.95
5.5.330.0100.07020.56
5.5.320.0630.07020.28
5.5.310.0300.08020.46
5.5.300.0000.04317.87
5.5.290.0100.04317.97
5.5.280.0130.03320.66
5.5.270.0070.07320.98
5.5.260.0070.06720.77
5.5.250.0170.04720.50
5.5.240.0130.06020.25
5.4.450.3730.03719.26
5.4.440.2830.03319.52
5.4.430.4000.04019.49
5.4.420.4030.03719.36
5.4.410.2470.03719.06
5.4.400.3970.03719.20
5.4.390.3970.03318.87
5.4.380.3830.04319.26
5.4.370.3930.03319.13
5.4.360.3970.03719.18
5.4.350.3970.03719.04
5.4.340.3470.03719.09
5.4.320.3700.03318.92
5.4.310.4130.04019.05
5.4.300.4170.04319.16
5.4.290.3900.03319.08
5.4.280.3930.04018.88
5.4.270.3770.03319.26
5.4.260.3670.03018.86
5.4.250.3600.04018.86
5.4.240.3930.03718.86
5.4.230.4030.04319.17
5.4.220.4670.03718.96
5.4.210.2100.03718.88
5.4.200.2070.03019.15
5.4.190.3300.03719.25
5.4.180.3900.03018.88
5.4.170.3470.03719.25
5.4.160.3000.03319.14
5.4.150.3430.03719.15
5.4.140.2930.03716.49
5.4.130.3370.03716.46
5.4.120.3830.03316.44
5.4.110.0100.06016.41
5.4.100.0130.05316.18
5.4.90.1370.03716.44
5.4.80.3770.03716.53
5.4.70.4200.04016.26
5.4.60.3900.04016.39
5.4.50.3630.03316.23
5.4.40.4000.03316.55
5.4.30.3630.03716.39
5.4.20.3200.03316.10
5.4.10.3930.03716.12
5.4.00.3900.04015.79
5.3.290.3770.04014.45
5.3.280.3730.04014.47
5.3.270.3530.03714.54
5.3.260.3800.03714.53
5.3.250.3100.03314.63
5.3.240.3500.04014.54
5.3.230.3370.03714.47
5.3.220.3700.03714.49
5.3.210.3800.03714.58
5.3.200.0030.06714.50
5.3.190.3370.04014.38
5.3.180.3800.03714.38
5.3.170.4070.04014.50
5.3.160.3700.03714.48
5.3.150.3630.04014.57
5.3.140.3600.03714.50
5.3.130.4370.03314.51
5.3.120.4100.04314.57
5.3.110.4000.03714.53
5.3.100.3730.03714.04
5.3.90.1630.03013.95
5.3.80.0100.03013.94
5.3.70.0070.05313.94
5.3.60.0000.04013.93
5.3.50.3800.03713.88
5.3.40.3200.03013.92
5.3.30.3600.03714.00
5.3.20.4300.04013.61
5.3.10.4370.03713.63
5.3.00.3630.03313.56
5.2.170.3370.02711.22
5.2.160.2400.03011.05
5.2.150.3000.02711.03
5.2.140.3230.03311.07
5.2.130.3230.03311.00
5.2.120.3070.03011.03
5.2.110.3200.03011.18
5.2.100.3470.02711.03
5.2.90.3970.02711.00
5.2.80.3600.03310.99
5.2.70.3530.03011.09
5.2.60.4130.03310.98
5.2.50.3030.03310.95
5.2.40.2530.02310.89
5.2.30.3100.03010.84
5.2.20.3170.02711.11
5.2.10.3930.02310.74
5.2.00.3130.02710.70
5.1.60.2870.0379.89
5.1.50.2770.02010.00
5.1.40.2970.0239.87
5.1.30.2730.02010.23
5.1.20.2770.02310.30
5.1.10.2900.02710.07
5.1.00.2370.03010.07
5.0.50.1370.0208.59
5.0.40.1430.0238.35
5.0.30.1730.0308.12
5.0.20.1730.0208.25
5.0.10.1530.0178.14
5.0.00.1870.0308.14
4.4.90.1330.0176.67
4.4.80.1470.0176.67
4.4.70.1830.0176.67
4.4.60.1800.0206.67
4.4.50.1470.0206.67
4.4.40.1500.0276.67
4.4.30.1530.0176.67
4.4.20.1170.0176.67
4.4.10.1270.0136.67
4.4.00.1230.0236.67
4.3.110.1530.0136.67
4.3.100.1630.0176.67
4.3.90.1500.0136.67
4.3.80.1470.0236.67
4.3.70.1500.0176.67
4.3.60.1730.0106.67
4.3.50.1800.0176.67
4.3.40.1600.0206.67
4.3.30.0970.0136.67
4.3.20.0830.0176.67
4.3.10.0800.0136.67
4.3.00.0870.0206.67

preferences:
47.01 ms | 401 KiB | 5 Q