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))); echo $title; $title = html_entity_decode($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); $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.40.0170.00318.58
8.3.30.0100.00318.79
8.3.20.0030.01020.21
8.3.10.0080.00023.48
8.3.00.0040.00419.38
8.2.170.0150.00022.96
8.2.160.0000.01420.35
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00322.20
8.2.110.0060.00321.13
8.2.100.0070.00717.78
8.2.90.0070.00017.72
8.2.80.0080.00017.97
8.2.70.0080.00017.63
8.2.60.0100.00017.91
8.2.50.0040.00418.07
8.2.40.0060.00319.82
8.2.30.0030.00717.80
8.2.20.0000.00817.47
8.2.10.0000.00817.79
8.2.00.0060.00217.41
8.1.270.0000.00823.97
8.1.260.0070.00026.35
8.1.250.0030.00328.09
8.1.240.0030.00622.39
8.1.230.0040.00921.04
8.1.220.0080.00017.74
8.1.210.0050.00518.77
8.1.200.0030.00617.23
8.1.190.0040.00416.98
8.1.180.0050.00318.10
8.1.170.0020.00518.59
8.1.160.0040.00421.93
8.1.150.0000.00918.71
8.1.140.0000.00817.21
8.1.130.0030.00317.66
8.1.120.0050.00317.32
8.1.110.0000.00817.32
8.1.100.0030.00317.30
8.1.90.0070.00017.31
8.1.80.0030.00417.20
8.1.70.0030.00317.26
8.1.60.0000.01117.38
8.1.50.0000.00817.27
8.1.40.0080.00017.30
8.1.30.0080.00017.46
8.1.20.0000.00717.57
8.1.10.0030.00617.45
8.1.00.0040.00417.29
8.0.300.0040.00419.86
8.0.290.0050.00216.63
8.0.280.0030.00318.24
8.0.270.0000.00817.10
8.0.260.0060.00017.08
8.0.250.0000.00616.80
8.0.240.0000.00616.81
8.0.230.0030.00316.78
8.0.220.0030.00316.82
8.0.210.0060.00016.77
8.0.200.0030.00316.85
8.0.190.0080.00016.78
8.0.180.0040.00416.80
8.0.170.0040.00416.78
8.0.160.0030.00316.76
8.0.150.0030.00316.64
8.0.140.0000.00816.61
8.0.130.0000.00613.49
8.0.120.0070.00016.67
8.0.110.0000.00816.78
8.0.100.0000.00716.59
8.0.90.0040.00416.73
8.0.80.0110.01216.70
8.0.70.0040.00416.63
8.0.60.0040.00416.59
8.0.50.0040.00416.77
8.0.30.0070.01316.92
8.0.20.0130.00517.40
8.0.10.0000.00816.89
8.0.00.0140.00616.50
7.4.330.0030.00315.05
7.4.320.0000.00716.35
7.4.300.0070.00016.46
7.4.290.0040.00416.31
7.4.280.0040.00416.43
7.4.270.0050.00216.38
7.4.260.0000.00716.25
7.4.250.0000.00716.33
7.4.240.0020.00516.35
7.4.230.0000.00816.52
7.4.220.0120.00916.32
7.4.210.0060.00916.39
7.4.200.0070.00016.29
7.4.160.0140.00416.48
7.4.150.0070.01117.40
7.4.140.0100.00917.86
7.4.130.0090.00816.37
7.4.120.0040.01716.39
7.4.110.0150.00616.20
7.4.100.0070.01016.49
7.4.90.0110.00616.37
7.4.80.0030.01519.39
7.4.70.0040.01216.21
7.4.60.0060.00916.45
7.4.50.0080.00016.26
7.4.40.0170.00016.26
7.4.30.0030.01316.44
7.4.00.0030.01414.64
7.3.330.0000.00713.35
7.3.320.0000.00513.22
7.3.310.0040.00416.02
7.3.300.0000.00716.17
7.3.290.0000.01416.16
7.3.280.0130.00516.14
7.3.270.0090.00917.40
7.3.260.0000.01816.41
7.3.250.0030.01316.33
7.3.240.0130.00716.03
7.3.230.0060.01016.39
7.3.210.0110.00716.17
7.3.200.0070.02119.39
7.3.190.0130.00316.18
7.3.180.0110.00516.11
7.3.170.0160.00016.27
7.3.160.0090.00616.27
7.2.330.0110.01116.68
7.2.320.0170.00616.54
7.2.310.0070.01016.29
7.2.300.0040.01216.48
7.2.290.0130.00616.37
7.2.60.0070.01016.85
7.2.50.0040.00717.13
7.1.200.0060.00616.11
7.1.70.0030.00317.05
7.1.60.0090.01219.32
7.1.50.0070.01417.22
7.1.00.0070.08722.36
7.0.200.0140.01414.97
7.0.140.0030.07321.95
7.0.60.0000.04319.86
7.0.50.0170.07317.92
7.0.40.0070.08320.14
7.0.30.0470.07320.03
7.0.20.0270.04320.35
7.0.10.0230.06720.21
7.0.00.0000.05020.02
5.6.280.0000.07721.02
5.6.210.0070.08320.60
5.6.200.0030.07718.23
5.6.190.0000.08020.53
5.6.180.0470.06320.77
5.6.170.0500.07020.71
5.6.160.0070.04320.61
5.6.150.0130.07318.18
5.6.140.0070.07018.21
5.6.130.0100.06718.06
5.6.120.0030.06020.92
5.6.110.0100.07721.05
5.6.100.0170.05321.11
5.6.90.0130.08320.95
5.6.80.0030.04020.52
5.5.350.0130.04320.44
5.5.340.0070.04018.02
5.5.330.0030.08020.43
5.5.320.0270.06720.27
5.5.310.0170.05320.29
5.5.300.0100.04017.90
5.5.290.0100.08317.86
5.5.280.0100.07020.90
5.5.270.0030.05020.66
5.5.260.0030.04320.75
5.5.250.0070.07320.61
5.5.240.0170.07020.16
5.4.450.0730.04019.42
5.4.440.0430.04719.39
5.4.430.0470.03719.36
5.4.420.0700.00019.60
5.4.410.0670.00019.52
5.4.400.0600.00019.02
5.4.390.0830.00019.05
5.4.380.0670.00019.05
5.4.370.0630.00019.14
5.4.360.0630.00018.98
5.4.350.0630.00019.05
5.4.340.0080.04111.97
5.4.320.0110.03812.45
5.4.310.0080.03512.45
5.4.300.0060.03612.45
5.4.290.0070.03612.45
5.4.280.0080.03412.35
5.4.270.0040.03612.34
5.4.260.0070.04212.35
5.4.250.0060.03612.35
5.4.240.0050.03612.35
5.4.230.0090.03612.34
5.4.220.0060.03812.34
5.4.210.0080.04012.34
5.4.200.0070.03712.34
5.4.190.0060.03612.33
5.4.180.0080.03212.34
5.4.170.0060.04212.34
5.4.160.0030.03712.34
5.4.150.0070.04112.34
5.4.140.0090.04512.02
5.4.130.0070.03412.01
5.4.120.0060.03911.97
5.4.110.0080.03611.96
5.4.100.0050.04211.96
5.4.90.0050.03711.96
5.4.80.0080.03811.96
5.4.70.0050.03411.96
5.4.60.0060.03611.96
5.4.50.0050.04211.96
5.4.40.0060.03311.95
5.4.30.0060.03411.95
5.4.20.0070.03311.95
5.4.10.0030.03611.95
5.4.00.0050.03511.43
5.3.290.0020.04312.80
5.3.280.0040.04512.71
5.3.270.0080.03712.73
5.3.260.0090.03812.72
5.3.250.0080.04312.72
5.3.240.0090.03612.72
5.3.230.0060.03712.71
5.3.220.0030.03912.68
5.3.210.0050.03812.68
5.3.200.0090.03312.68
5.3.190.0030.04012.68
5.3.180.0110.03912.67
5.3.170.0050.03812.67
5.3.160.0080.03612.68
5.3.150.0050.03712.67
5.3.140.0030.03812.66
5.3.130.0060.03812.66
5.3.120.0060.03912.66
5.3.110.0040.04112.65
5.3.100.0040.03912.12
5.3.90.0060.03912.08
5.3.80.0050.04012.07
5.3.70.0110.03312.07
5.3.60.0130.04012.07
5.3.50.0090.04412.00
5.3.40.0060.03612.00
5.3.30.0080.03411.94
5.3.20.0100.03311.72
5.3.10.0050.03811.69
5.3.00.0030.03811.67
5.2.170.0090.0279.17
5.2.160.0050.0339.17
5.2.150.0040.0319.17
5.2.140.0020.0339.17
5.2.130.0060.0319.13
5.2.120.0070.0309.13
5.2.110.0050.0299.14
5.2.100.0060.0279.14
5.2.90.0040.0299.13
5.2.80.0030.0329.13
5.2.70.0030.0369.13
5.2.60.0050.0299.09
5.2.50.0070.0309.06
5.2.40.0060.0289.04
5.2.30.0050.0289.00
5.2.20.0060.0269.00
5.2.10.0100.0248.92
5.2.00.0050.0298.77
5.1.60.0060.0228.06
5.1.50.0050.0238.05
5.1.40.0020.0298.04
5.1.30.0050.0258.39
5.1.20.0060.0248.41
5.1.10.0050.0278.13
5.1.00.0060.0288.13
5.0.50.0020.0226.61
5.0.40.0040.0176.48
5.0.30.0080.0366.28
5.0.20.0050.0276.25
5.0.10.0020.0206.24
5.0.00.0030.0296.23
4.4.90.0020.0154.78
4.4.80.0040.0194.75
4.4.70.0030.0144.76
4.4.60.0050.0194.75
4.4.50.0020.0154.77
4.4.40.0050.0274.71
4.4.30.0040.0174.76
4.4.20.0030.0154.84
4.4.10.0010.0174.85
4.4.00.0030.0244.75
4.3.110.0040.0144.66
4.3.100.0040.0134.66
4.3.90.0040.0134.63
4.3.80.0030.0254.59
4.3.70.0000.0174.63
4.3.60.0020.0214.63
4.3.50.0010.0224.63
4.3.40.0000.0304.54
4.3.30.0020.0153.28
4.3.20.0020.0173.26
4.3.10.0020.0173.22
4.3.00.0070.01310.13

preferences:
41.91 ms | 400 KiB | 5 Q