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); //$new_str = ucwords($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.55
8.3.50.0100.01121.96
8.3.40.0040.01118.67
8.3.30.0140.00018.96
8.3.20.0040.00420.15
8.3.10.0040.00423.48
8.3.00.0110.00017.50
8.2.180.0110.00416.32
8.2.170.0070.00722.96
8.2.160.0130.00320.52
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0050.00222.23
8.2.110.0070.00322.16
8.2.100.0070.00418.09
8.2.90.0040.00419.23
8.2.80.0000.00917.97
8.2.70.0060.00317.38
8.2.60.0000.00717.80
8.2.50.0120.00018.07
8.2.40.0040.00419.82
8.2.30.0040.00417.92
8.2.20.0000.00717.65
8.2.10.0000.00817.88
8.2.00.0000.00717.56
8.1.280.0090.00925.92
8.1.270.0100.00023.69
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0040.00422.68
8.1.230.0040.00717.77
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0080.00016.98
8.1.180.0030.00618.10
8.1.170.0000.00818.52
8.1.160.0030.00521.93
8.1.150.0000.01018.68
8.1.140.0040.00417.38
8.1.130.0030.00317.66
8.1.120.0000.00717.38
8.1.110.0080.00017.32
8.1.100.0020.00517.17
8.1.90.0030.00417.33
8.1.80.0050.00217.27
8.1.70.0070.00017.26
8.1.60.0090.00317.39
8.1.50.0000.00817.25
8.1.40.0000.00717.41
8.1.30.0060.00317.51
8.1.20.0000.00817.40
8.1.10.0000.00717.45
8.1.00.0040.00417.41
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0030.00318.35
8.0.270.0080.00017.07
8.0.260.0040.00417.11
8.0.250.0070.00016.75
8.0.240.0030.00316.71
8.0.230.0030.00316.66
8.0.220.0070.00016.82
8.0.210.0060.00016.63
8.0.200.0030.00316.72
8.0.190.0030.00616.71
8.0.180.0070.00016.77
8.0.170.0000.00816.81
8.0.160.0000.00716.64
8.0.150.0000.00716.70
8.0.140.0030.00516.61
8.0.130.0030.00513.71
8.0.120.0030.00516.65
8.0.110.0070.00016.80
8.0.100.0030.00516.66
8.0.90.0000.00816.60
8.0.80.0030.01316.75
8.0.70.0030.00516.75
8.0.60.0040.00416.71
8.0.50.0030.00316.68
8.0.30.0090.01416.84
8.0.20.0110.00917.40
8.0.10.0080.00016.91
8.0.00.0110.01116.57
7.4.330.0030.00315.08
7.4.320.0030.00316.51
7.4.300.0030.00316.37
7.4.290.0030.00316.46
7.4.280.0040.00416.38
7.4.270.0000.00716.37
7.4.260.0080.00016.31
7.4.250.0040.00416.46
7.4.240.0030.00316.34
7.4.230.0000.00616.20
7.4.220.0060.01116.40
7.4.210.0070.00616.47
7.4.200.0000.00816.48
7.4.160.0080.00816.48
7.4.150.0150.00317.40
7.4.140.0140.00617.86
7.4.130.0090.00816.40
7.4.120.0110.00616.22
7.4.110.0090.01416.29
7.4.100.0060.01016.28
7.4.90.0100.00716.39
7.4.80.0090.00619.39
7.4.70.0120.00416.64
7.4.60.0090.00616.44
7.4.50.0030.00316.50
7.4.40.0090.00816.36
7.4.30.0130.00616.41
7.4.00.0080.00814.59
7.3.330.0000.00613.23
7.3.320.0000.00513.35
7.3.310.0070.00016.09
7.3.300.0030.00316.16
7.3.290.0030.01016.11
7.3.280.0070.01016.16
7.3.270.0070.01017.40
7.3.260.0120.00616.53
7.3.250.0090.00716.31
7.3.240.0100.00716.36
7.3.230.0100.01316.39
7.3.210.0090.01416.50
7.3.200.0110.01119.39
7.3.190.0060.01116.28
7.3.180.0160.00016.42
7.3.170.0130.00316.27
7.3.160.0060.00916.15
7.3.120.0030.00714.57
7.3.110.0000.01014.57
7.3.100.0030.00714.39
7.3.90.0030.00614.75
7.3.80.0030.00714.25
7.3.70.0000.01013.93
7.3.60.0000.01014.61
7.3.50.0000.01014.27
7.3.40.0100.00014.51
7.3.30.0100.00014.61
7.3.20.0070.00316.26
7.3.10.0000.01016.47
7.3.00.0030.00716.44
7.2.330.0140.00616.33
7.2.320.0180.00316.21
7.2.310.0170.00416.49
7.2.300.0130.00316.48
7.2.290.0100.00716.58
7.2.240.0070.00315.07
7.2.230.0030.00714.80
7.2.220.0030.00714.98
7.2.210.0070.00314.53
7.2.200.0060.00514.20
7.2.190.0040.00714.45
7.2.180.0030.00814.42
7.2.170.0040.00714.52
7.2.160.0030.00714.22
7.2.150.0040.00716.59
7.2.140.0030.00716.54
7.2.130.0070.00316.63
7.2.120.0040.00716.68
7.2.110.0160.00616.40
7.2.100.0000.01116.45
7.2.90.0080.00416.71
7.2.80.0000.01116.69
7.2.70.0000.01116.44
7.2.60.0080.00217.06
7.2.50.0040.00716.77
7.2.40.0070.00316.33
7.2.30.0000.01216.67
7.2.20.0040.00716.80
7.2.10.0130.00016.78
7.2.00.0100.00316.55
7.1.330.0030.00615.63
7.1.320.0030.00615.62
7.1.310.0030.00615.38
7.1.300.0100.00015.39
7.1.290.0000.00915.18
7.1.280.0030.00615.40
7.1.270.0050.00515.42
7.1.260.0070.00315.78
7.1.250.0000.01015.67
7.1.200.0060.00616.05
7.1.70.0150.00017.21
7.1.60.0100.01019.32
7.1.50.0060.00917.20
7.1.00.0030.07722.47
7.0.200.0000.01017.10
7.0.140.0070.07022.12
7.0.60.0030.04019.84
7.0.50.0000.05317.86
7.0.40.0130.07720.08
7.0.30.0330.07320.14
7.0.20.0200.03720.15
7.0.10.0130.08020.35
7.0.00.0030.05320.14
5.6.280.0100.06721.01
5.6.210.0000.08320.72
5.6.200.0070.07318.21
5.6.190.0070.06720.67
5.6.180.0470.07020.49
5.6.170.0230.05720.47
5.6.160.0100.08320.37
5.6.150.0030.08318.21
5.6.140.0070.08018.18
5.6.130.0070.05318.16
5.6.120.0030.08720.94
5.6.110.0100.06020.89
5.6.100.0130.07320.98
5.6.90.0070.08320.98
5.6.80.0000.04320.38
5.5.350.0100.06020.39
5.5.340.0070.07718.00
5.5.330.0200.07020.12
5.5.320.0270.07720.32
5.5.310.0200.07720.23
5.5.300.0130.08017.92
5.5.290.0000.07017.87
5.5.280.0100.08320.77
5.5.270.0000.06720.86
5.5.260.0000.04320.80
5.5.250.0100.07320.79
5.5.240.0200.07320.14
5.4.450.0470.03719.39
5.4.440.0730.05319.14
5.4.430.0300.03319.60
5.4.420.0630.00019.30
5.4.410.0630.00019.23
5.4.400.0630.00019.20
5.4.390.0630.00019.07
5.4.380.0630.00019.16
5.4.370.0630.00018.97
5.4.360.0630.00019.07
5.4.350.0630.00019.07
5.4.340.0060.04111.98
5.4.320.0080.03912.45
5.4.310.0070.04512.45
5.4.300.0090.03412.45
5.4.290.0050.04612.45
5.4.280.0060.03612.35
5.4.270.0070.04012.34
5.4.260.0070.04412.35
5.4.250.0090.03512.35
5.4.240.0040.03912.34
5.4.230.0060.04012.34
5.4.220.0050.03712.34
5.4.210.0050.04212.34
5.4.200.0070.03712.34
5.4.190.0100.03212.34
5.4.180.0050.03812.33
5.4.170.0030.03912.34
5.4.160.0110.04212.34
5.4.150.0100.03112.33
5.4.140.0060.03612.02
5.4.130.0050.03612.01
5.4.120.0060.03511.96
5.4.110.0100.03411.96
5.4.100.0060.03611.96
5.4.90.0060.04011.97
5.4.80.0090.03711.96
5.4.70.0050.03811.96
5.4.60.0090.03311.96
5.4.50.0030.03911.96
5.4.40.0080.04411.95
5.4.30.0080.03711.95
5.4.20.0040.03911.95
5.4.10.0060.03411.95
5.4.00.0070.04311.43
5.3.290.0060.03912.80
5.3.280.0040.04012.71
5.3.270.0070.04512.72
5.3.260.0070.03812.72
5.3.250.0060.04712.72
5.3.240.0040.04012.71
5.3.230.0070.03812.71
5.3.220.0090.04212.68
5.3.210.0070.03912.68
5.3.200.0050.03812.68
5.3.190.0090.04012.68
5.3.180.0060.04112.68
5.3.170.0100.03612.67
5.3.160.0040.04112.67
5.3.150.0100.04112.67
5.3.140.0030.04512.66
5.3.130.0070.03712.66
5.3.120.0080.04712.66
5.3.110.0050.04212.66
5.3.100.0070.04012.12
5.3.90.0070.03812.08
5.3.80.0060.04112.07
5.3.70.0120.04012.07
5.3.60.0100.04312.07
5.3.50.0060.03612.00
5.3.40.0040.03912.00
5.3.30.0080.03311.94
5.3.20.0100.03111.71
5.3.10.0110.03111.69
5.3.00.0050.04211.67
5.2.170.0070.0289.18
5.2.160.0050.0399.18
5.2.150.0040.0309.17
5.2.140.0060.0299.17
5.2.130.0060.0289.13
5.2.120.0050.0269.13
5.2.110.0070.0279.14
5.2.100.0040.0279.14
5.2.90.0050.0289.13
5.2.80.0060.0369.13
5.2.70.0080.0359.13
5.2.60.0060.0289.09
5.2.50.0090.0259.06
5.2.40.0050.0289.04
5.2.30.0070.0299.00
5.2.20.0060.0399.00
5.2.10.0030.0358.91
5.2.00.0050.0428.77
5.1.60.0040.0248.06
5.1.50.0080.0218.06
5.1.40.0060.0248.04
5.1.30.0060.0258.39
5.1.20.0040.0298.41
5.1.10.0060.0258.13
5.1.00.0060.0328.14
5.0.50.0040.0246.61
5.0.40.0050.0206.48
5.0.30.0030.0386.29
5.0.20.0030.0286.25
5.0.10.0060.0196.24
5.0.00.0030.0336.23
4.4.90.0030.0154.78
4.4.80.0020.0174.75
4.4.70.0030.0164.75
4.4.60.0020.0184.75
4.4.50.0020.0194.77
4.4.40.0050.0324.71
4.4.30.0040.0204.76
4.4.20.0030.0184.85
4.4.10.0040.0164.84
4.4.00.0000.0304.76
4.3.110.0040.0154.66
4.3.100.0030.0164.66
4.3.90.0040.0154.63
4.3.80.0040.0244.58
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0040.0154.63
4.3.40.0050.0224.54
4.3.30.0020.0163.28
4.3.20.0020.0163.26
4.3.10.0040.0233.22
4.3.00.0070.02010.14

preferences:
57.51 ms | 401 KiB | 5 Q