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); echo $title."\n"; $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."\n"; $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.0090.00618.33
8.3.50.0120.01021.96
8.3.40.0070.01418.75
8.3.30.0140.00019.00
8.3.20.0040.00420.16
8.3.10.0080.00023.65
8.3.00.0060.00317.38
8.2.180.0090.00616.48
8.2.170.0150.00022.96
8.2.160.0140.00020.52
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.14
8.2.110.0040.00420.52
8.2.100.0080.00418.09
8.2.90.0000.00818.98
8.2.80.0000.00917.97
8.2.70.0150.00016.52
8.2.60.0030.00617.55
8.2.50.0030.00718.07
8.2.40.0030.00519.63
8.2.30.0000.00717.95
8.2.20.0050.00317.45
8.2.10.0040.00417.82
8.2.00.0040.00417.59
8.1.280.0130.00725.92
8.1.270.0000.00923.79
8.1.260.0040.00426.35
8.1.250.0030.00328.09
8.1.240.0030.00623.82
8.1.230.0100.00019.02
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0100.00016.88
8.1.190.0030.00616.98
8.1.180.0080.00018.10
8.1.170.0060.00318.59
8.1.160.0000.00721.92
8.1.150.0060.00318.75
8.1.140.0000.00717.30
8.1.130.0070.00017.63
8.1.120.0070.00017.37
8.1.110.0040.00417.20
8.1.100.0040.00417.29
8.1.90.0000.00717.30
8.1.80.0030.00517.36
8.1.70.0000.00717.29
8.1.60.0040.00417.49
8.1.50.0060.00317.37
8.1.40.0040.00417.36
8.1.30.0080.00017.52
8.1.20.0070.00017.52
8.1.10.0030.00517.43
8.1.00.0080.00017.38
8.0.300.0030.00318.77
8.0.290.0000.00716.63
8.0.280.0040.00418.29
8.0.270.0070.00017.17
8.0.260.0000.00617.08
8.0.250.0020.00516.84
8.0.240.0000.00716.80
8.0.230.0070.00016.82
8.0.220.0000.00716.66
8.0.210.0070.00016.61
8.0.200.0000.00616.70
8.0.190.0050.00316.70
8.0.180.0070.00016.66
8.0.170.0040.00416.75
8.0.160.0030.00516.75
8.0.150.0000.00716.69
8.0.140.0050.00316.77
8.0.130.0030.00313.55
8.0.120.0050.00316.72
8.0.110.0000.00716.76
8.0.100.0070.00016.64
8.0.90.0000.00716.78
8.0.80.0100.00616.66
8.0.70.0050.00216.79
8.0.60.0030.00316.75
8.0.50.0040.00416.77
8.0.30.0150.01016.91
8.0.20.0080.01017.40
8.0.10.0070.00016.74
8.0.00.0090.01116.74
7.4.330.0030.00315.17
7.4.320.0030.00316.45
7.4.300.0030.00316.46
7.4.290.0040.00416.45
7.4.280.0040.00416.41
7.4.270.0030.00616.45
7.4.260.0000.00716.34
7.4.250.0040.00416.28
7.4.240.0030.00516.40
7.4.230.0070.00016.44
7.4.220.0150.00316.49
7.4.210.0120.00916.39
7.4.200.0070.00016.43
7.4.160.0080.00816.58
7.4.150.0170.00417.40
7.4.140.0080.01217.86
7.4.130.0090.00916.26
7.4.120.0060.01216.32
7.4.110.0120.00616.36
7.4.100.0100.01016.39
7.4.90.0100.00716.20
7.4.80.0030.01419.39
7.4.70.0080.00816.31
7.4.60.0100.00616.41
7.4.50.0050.00316.46
7.4.40.0060.01016.43
7.4.30.0100.01016.34
7.4.00.0080.01014.80
7.3.330.0000.00813.48
7.3.320.0050.00013.25
7.3.310.0000.00715.97
7.3.300.0030.00316.12
7.3.290.0120.00316.18
7.3.280.0100.00716.15
7.3.270.0070.01117.40
7.3.260.0040.01416.42
7.3.250.0120.00616.24
7.3.240.0150.00416.06
7.3.230.0090.00916.39
7.3.210.0140.00716.20
7.3.200.0100.01319.39
7.3.190.0090.00616.32
7.3.180.0100.00616.22
7.3.170.0160.00416.30
7.3.160.0100.00616.24
7.3.120.0060.01014.85
7.3.110.0160.00314.57
7.3.100.0090.00014.75
7.3.90.0070.00714.66
7.3.80.0070.01114.84
7.3.70.0080.00814.57
7.3.60.0030.01514.46
7.3.50.0000.01214.78
7.3.40.0000.01314.75
7.3.30.0060.00914.57
7.3.20.0090.00316.56
7.3.10.0050.00816.80
7.3.00.0050.00516.46
7.2.330.0130.00416.21
7.2.320.0080.00816.55
7.2.310.0030.01516.40
7.2.300.0030.01316.25
7.2.290.0060.01116.25
7.2.250.0100.01014.91
7.2.240.0030.01314.86
7.2.230.0100.00614.58
7.2.220.0080.00814.80
7.2.210.0030.01014.72
7.2.200.0000.01414.93
7.2.190.0000.01314.82
7.2.180.0090.00614.51
7.2.170.0030.01314.77
7.1.330.0040.01215.70
7.1.320.0100.00315.46
7.1.310.0040.00715.53
7.1.300.0110.00315.43
7.1.290.0030.01015.62
7.1.280.0100.00615.61
7.1.270.0070.00715.62
7.1.260.0100.00315.44
7.1.70.0120.00817.32
7.1.60.0160.01019.32
7.1.50.0090.00317.27
7.1.00.0070.07322.31
7.0.200.0000.00817.09
7.0.140.0030.07322.21
7.0.60.0070.03719.92
7.0.50.0130.04317.91
7.0.40.0070.06719.93
7.0.30.0470.05320.20
7.0.20.0170.04020.18
7.0.10.0070.07020.15
7.0.00.0100.06020.21
5.6.280.0100.06720.86
5.6.210.0070.04020.61
5.6.200.0130.08018.16
5.6.190.0030.09020.35
5.6.180.0570.03720.41
5.6.170.0430.07020.50
5.6.160.0070.08320.41
5.6.150.0170.04018.18
5.6.140.0100.08018.11
5.6.130.0070.07018.19
5.6.120.0100.08720.85
5.6.110.0170.07721.03
5.6.100.0100.07320.98
5.6.90.0100.07720.87
5.6.80.0030.03720.51
5.5.350.0130.03320.30
5.5.340.0070.08318.02
5.5.330.0070.05020.47
5.5.320.0470.06720.28
5.5.310.0430.06020.16
5.5.300.0130.06717.98
5.5.290.0030.08317.96
5.5.280.0070.05020.77
5.5.270.0030.04320.79
5.5.260.0170.07720.88
5.5.250.0070.09020.47
5.5.240.0230.03720.27
5.4.450.0270.04019.55
5.4.440.0630.04019.58
5.4.430.0330.04319.21
5.4.420.0670.00019.45
5.4.410.0630.00019.37
5.4.400.0600.00019.17
5.4.390.0670.00019.08
5.4.380.0730.00018.95
5.4.370.0630.00019.12
5.4.360.0600.00019.06
5.4.350.0630.00018.95
5.4.340.0060.03311.98
5.4.320.0050.03512.45
5.4.310.0050.03812.45
5.4.300.0070.03512.45
5.4.290.0060.03912.45
5.4.280.0110.03312.35
5.4.270.0060.04112.35
5.4.260.0100.04412.35
5.4.250.0040.04312.35
5.4.240.0080.04512.34
5.4.230.0080.03812.34
5.4.220.0050.04512.34
5.4.210.0050.03612.34
5.4.200.0060.04812.34
5.4.190.0090.04612.34
5.4.180.0070.03712.34
5.4.170.0080.03712.35
5.4.160.0050.03812.34
5.4.150.0060.03612.34
5.4.140.0040.03812.02
5.4.130.0060.03512.01
5.4.120.0080.03311.96
5.4.110.0120.03911.96
5.4.100.0070.03511.96
5.4.90.0040.04011.96
5.4.80.0080.03711.96
5.4.70.0050.03511.96
5.4.60.0050.03911.96
5.4.50.0060.04711.96
5.4.40.0040.03711.95
5.4.30.0070.03411.95
5.4.20.0060.03911.95
5.4.10.0090.03911.95
5.4.00.0070.03511.43
5.3.290.0070.05312.80
5.3.280.0040.04112.70
5.3.270.0070.04312.73
5.3.260.0090.04512.72
5.3.250.0070.03712.72
5.3.240.0120.03112.72
5.3.230.0080.04712.71
5.3.220.0060.03812.68
5.3.210.0060.03912.68
5.3.200.0080.03412.68
5.3.190.0050.04112.68
5.3.180.0060.03812.67
5.3.170.0060.04212.67
5.3.160.0120.03612.67
5.3.150.0110.03912.67
5.3.140.0080.04012.66
5.3.130.0090.04112.66
5.3.120.0080.04012.66
5.3.110.0080.04412.66
5.3.100.0090.04212.12
5.3.90.0080.03712.09
5.3.80.0060.03712.07
5.3.70.0060.03712.07
5.3.60.0090.04512.07
5.3.50.0050.03712.00
5.3.40.0080.03812.00
5.3.30.0070.04411.94
5.3.20.0060.03911.72
5.3.10.0050.04711.69
5.3.00.0070.03811.67
5.2.170.0040.0319.17
5.2.160.0010.0329.17
5.2.150.0040.0379.18
5.2.140.0070.0329.17
5.2.130.0060.0399.13
5.2.120.0050.0289.13
5.2.110.0050.0339.14
5.2.100.0080.0309.13
5.2.90.0050.0289.13
5.2.80.0060.0309.13
5.2.70.0070.0349.13
5.2.60.0050.0319.09
5.2.50.0060.0299.06
5.2.40.0070.0289.04
5.2.30.0080.0269.01
5.2.20.0050.0289.00
5.2.10.0060.0278.92
5.2.00.0040.0358.78
5.1.60.0100.0208.06
5.1.50.0010.0288.05
5.1.40.0040.0288.04
5.1.30.0060.0298.38
5.1.20.0030.0328.41
5.1.10.0060.0238.14
5.1.00.0040.0258.14
5.0.50.0060.0226.61
5.0.40.0020.0216.48
5.0.30.0080.0336.29
5.0.20.0020.0216.25
5.0.10.0030.0216.24
5.0.00.0040.0346.23
4.4.90.0040.0144.78
4.4.80.0030.0154.76
4.4.70.0020.0164.75
4.4.60.0030.0174.75
4.4.50.0060.0134.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0030.0164.85
4.4.00.0020.0264.76
4.3.110.0030.0154.67
4.3.100.0020.0154.67
4.3.90.0060.0124.64
4.3.80.0010.0274.58
4.3.70.0020.0174.63
4.3.60.0030.0144.63
4.3.50.0050.0144.63
4.3.40.0020.0264.53
4.3.30.0020.0163.28
4.3.20.0020.0183.26
4.3.10.0030.0213.22
4.3.00.0030.02010.25

preferences:
43.2 ms | 401 KiB | 5 Q