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); $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.41
8.3.50.0120.01221.94
8.3.40.0070.01418.54
8.3.30.0070.00718.97
8.3.20.0000.00720.21
8.3.10.0000.00723.66
8.3.00.0000.01117.38
8.2.180.0060.00918.06
8.2.170.0140.00722.96
8.2.160.0120.00620.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00422.24
8.2.110.0040.00421.02
8.2.100.0040.00717.91
8.2.90.0060.00319.05
8.2.80.0080.00317.97
8.2.70.0080.00017.47
8.2.60.0040.00417.91
8.2.50.0040.00418.10
8.2.40.0000.00820.54
8.2.30.0040.00420.82
8.2.20.0040.00417.61
8.2.10.0070.00017.83
8.2.00.0000.00717.41
8.1.280.0100.01025.92
8.1.270.0040.00423.82
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00419.44
8.1.230.0030.00717.76
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0030.00517.10
8.1.180.0070.00018.10
8.1.170.0000.00918.50
8.1.160.0000.00818.79
8.1.150.0040.00418.74
8.1.140.0050.00317.35
8.1.130.0000.00717.79
8.1.120.0070.00017.17
8.1.110.0000.00717.27
8.1.100.0040.00417.22
8.1.90.0000.00717.27
8.1.80.0000.00817.28
8.1.70.0040.00417.18
8.1.60.0070.00317.47
8.1.50.0030.00617.29
8.1.40.0050.00317.39
8.1.30.0000.00917.48
8.1.20.0040.00417.45
8.1.10.0040.00417.38
8.1.00.0080.00017.36
8.0.300.0000.00818.77
8.0.290.0030.00616.58
8.0.280.0030.00318.41
8.0.270.0000.00717.09
8.0.260.0000.00717.09
8.0.250.0070.00016.73
8.0.240.0030.00316.77
8.0.230.0070.00016.83
8.0.220.0030.00316.79
8.0.210.0070.00016.79
8.0.200.0060.00016.88
8.0.190.0090.00016.87
8.0.180.0040.00416.78
8.0.170.0040.00416.79
8.0.160.0000.00716.69
8.0.150.0050.00316.62
8.0.140.0040.00416.76
8.0.130.0000.00613.60
8.0.120.0030.00516.70
8.0.110.0050.00316.70
8.0.100.0080.00016.65
8.0.90.0050.00316.73
8.0.80.0060.01016.78
8.0.70.0040.00416.74
8.0.60.0020.00516.64
8.0.50.0040.00416.74
8.0.30.0110.00917.10
8.0.20.0100.00917.40
8.0.10.0040.00416.75
8.0.00.0200.00316.78
7.4.330.0030.00315.07
7.4.320.0000.00716.41
7.4.300.0060.00016.41
7.4.290.0070.00016.31
7.4.280.0050.00216.35
7.4.270.0030.00316.41
7.4.260.0030.00516.30
7.4.250.0040.00416.22
7.4.240.0030.00516.48
7.4.230.0040.00416.33
7.4.220.0080.00816.54
7.4.210.0100.00916.23
7.4.200.0030.00316.55
7.4.160.0040.01116.42
7.4.150.0040.01417.40
7.4.140.0140.00517.86
7.4.130.0090.01116.50
7.4.120.0110.01116.46
7.4.110.0150.00316.15
7.4.100.0100.00716.27
7.4.90.0070.01016.24
7.4.80.0070.01019.39
7.4.70.0000.01616.29
7.4.60.0070.00916.28
7.4.50.0040.00416.50
7.4.40.0080.00816.48
7.4.30.0090.00916.18
7.4.00.0040.01214.96
7.3.330.0000.00713.33
7.3.320.0030.00313.33
7.3.310.0040.00415.95
7.3.300.0000.00716.18
7.3.290.0100.00316.11
7.3.280.0060.01016.12
7.3.270.0120.00817.40
7.3.260.0100.00716.34
7.3.250.0120.00516.14
7.3.240.0080.01416.18
7.3.230.0070.01116.39
7.3.210.0130.01016.39
7.3.200.0160.00319.39
7.3.190.0120.00916.28
7.3.180.0090.00616.24
7.3.170.0120.00416.39
7.3.160.0160.00016.06
7.2.330.0090.00916.55
7.2.320.0060.00916.32
7.2.310.0060.01616.58
7.2.300.0080.00816.54
7.2.290.0090.00916.38
7.1.200.0000.01315.71
7.1.70.0110.00217.47
7.1.60.0090.00919.32
7.1.50.0040.00717.23
7.1.00.0030.07722.60
7.0.200.0050.00317.10
7.0.140.0000.07722.01
7.0.70.4800.04019.90
7.0.60.0000.09319.98
7.0.50.0130.08017.91
7.0.40.0070.07320.00
7.0.30.1030.06320.20
7.0.20.0470.05320.20
7.0.10.0200.04320.10
7.0.00.0100.06020.07
5.6.210.0100.07020.63
5.6.200.0100.03318.12
5.6.190.0100.05320.67
5.6.180.0300.07020.40
5.6.170.0370.07020.50
5.6.160.0130.07020.50
5.6.150.0170.07318.12
5.6.140.0070.04018.10
5.6.130.0070.03718.21
5.6.120.0070.05020.98
5.6.110.0170.06720.98
5.6.100.0030.04721.13
5.6.90.0130.07721.13
5.6.80.0100.07320.43
5.6.70.0300.06720.34
5.5.350.0100.07720.32
5.5.340.0030.06317.89
5.5.330.0070.07320.29
5.5.320.0070.08320.23
5.5.310.0170.04320.43
5.5.300.0100.08017.95
5.5.290.0070.08017.92
5.5.280.0100.04320.68
5.5.270.0130.08020.79
5.5.260.0100.05320.98
5.5.250.0070.05020.59
5.5.240.0070.07720.23
5.4.450.0500.05719.11
5.4.440.0330.03019.39
5.4.430.0370.05019.13
5.4.420.0670.00019.14
5.4.410.0630.00019.39
5.4.400.0630.00019.05
5.4.390.0630.00019.09
5.4.380.0670.00019.16
5.4.370.0670.00019.07
5.4.360.0600.00019.14
5.4.350.0670.00019.05
5.4.340.0040.03611.97
5.4.320.0030.04512.46
5.4.310.0070.04312.45
5.4.300.0060.03712.45
5.4.290.0050.04512.45
5.4.280.0070.03412.34
5.4.270.0090.03712.34
5.4.260.0090.03712.34
5.4.250.0090.03412.35
5.4.240.0040.04212.35
5.4.230.0110.03412.34
5.4.220.0050.03812.34
5.4.210.0060.04112.34
5.4.200.0060.03812.34
5.4.190.0070.04012.34
5.4.180.0060.03812.34
5.4.170.0050.03912.35
5.4.160.0080.03612.34
5.4.150.0030.04212.34
5.4.140.0060.03812.02
5.4.130.0050.03912.01
5.4.120.0060.03511.97
5.4.110.0100.04211.96
5.4.100.0110.04011.96
5.4.90.0070.03611.96
5.4.80.0100.03511.96
5.4.70.0040.03911.96
5.4.60.0090.03611.96
5.4.50.0040.04011.96
5.4.40.0070.03411.95
5.4.30.0020.03911.95
5.4.20.0070.03611.95
5.4.10.0070.03811.95
5.4.00.0090.03911.43
5.3.290.0090.04612.80
5.3.280.0060.03912.71
5.3.270.0110.04412.72
5.3.260.0070.04112.72
5.3.250.0030.04112.72
5.3.240.0050.03812.72
5.3.230.0050.03912.71
5.3.220.0030.04212.68
5.3.210.0060.03812.68
5.3.200.0060.03912.68
5.3.190.0070.03612.68
5.3.180.0070.03612.68
5.3.170.0060.04312.67
5.3.160.0070.03912.68
5.3.150.0040.04012.67
5.3.140.0080.03512.66
5.3.130.0100.03512.66
5.3.120.0090.04312.65
5.3.110.0100.04912.66
5.3.100.0070.03812.12
5.3.90.0100.03412.08
5.3.80.0090.04012.07
5.3.70.0020.04012.07
5.3.60.0100.04212.07
5.3.50.0060.03712.00
5.3.40.0040.04612.00
5.3.30.0060.03611.94
5.3.20.0090.03511.72
5.3.10.0060.03911.69
5.3.00.0040.04011.67
5.2.170.0040.0369.18
5.2.160.0040.0329.18
5.2.150.0050.0349.18
5.2.140.0050.0369.17
5.2.130.0080.0289.13
5.2.120.0060.0289.13
5.2.110.0050.0289.14
5.2.100.0070.0279.13
5.2.90.0060.0279.13
5.2.80.0050.0329.13
5.2.70.0060.0309.13
5.2.60.0060.0309.09
5.2.50.0050.0319.06
5.2.40.0070.0349.04
5.2.30.0050.0359.00
5.2.20.0070.0298.99
5.2.10.0040.0308.92
5.2.00.0060.0298.78
5.1.60.0060.0238.05
5.1.50.0050.0258.05
5.1.40.0030.0268.04
5.1.30.0070.0298.39
5.1.20.0070.0318.41
5.1.10.0030.0328.13
5.1.00.0040.0288.14
5.0.50.0050.0196.61
5.0.40.0020.0216.48
5.0.30.0050.0396.29
5.0.20.0070.0196.26
5.0.10.0050.0206.24
5.0.00.0030.0366.23
4.4.90.0030.0174.78
4.4.80.0020.0184.75
4.4.70.0030.0154.76
4.4.60.0020.0164.75
4.4.50.0010.0174.77
4.4.40.0050.0264.71
4.4.30.0030.0154.76
4.4.20.0030.0184.84
4.4.10.0020.0184.85
4.4.00.0040.0244.76
4.3.110.0020.0204.67
4.3.100.0030.0184.67
4.3.90.0050.0134.64
4.3.80.0020.0294.59
4.3.70.0040.0154.63
4.3.60.0050.0154.63
4.3.50.0050.0164.63
4.3.40.0020.0254.54
4.3.30.0030.0183.28
4.3.20.0000.0203.25
4.3.10.0000.0203.22
4.3.00.0070.01010.25

preferences:
49.98 ms | 401 KiB | 5 Q