3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "آزمون پادشاهی متحده"; $pattern = '/[`~!@#$%^&*()_|+=?;:..’“\'"<>,€£¥•،٫؟»«{}[\]\\\\\/]+/ui'; $replacement = ''; $slug = trim(preg_replace($pattern, $replacement, $string)); $slug = str_replace(" ","-",$slug); echo $slug;

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.0210.00018.56
8.3.50.0070.01116.81
8.3.40.0150.00018.98
8.3.30.0040.01118.97
8.3.20.0080.00019.08
8.3.10.0060.00321.60
8.3.00.0040.00421.70
8.2.180.0110.01125.92
8.2.170.0100.00619.22
8.2.160.0090.00622.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00020.90
8.2.110.0000.01022.44
8.2.100.0040.00817.97
8.2.90.0000.00818.34
8.2.80.0000.00817.97
8.2.70.0030.00517.93
8.2.60.0000.00818.16
8.2.50.0050.00318.10
8.2.40.0040.00419.34
8.2.30.0040.00420.62
8.2.20.0000.00818.28
8.2.10.0000.00718.27
8.2.00.0050.00318.07
8.1.280.0110.00425.92
8.1.270.0030.00524.66
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00621.19
8.1.230.0090.00320.95
8.1.220.0000.00917.79
8.1.210.0040.00418.88
8.1.200.0060.00317.35
8.1.190.0050.00317.36
8.1.180.0090.00018.10
8.1.170.0050.00318.69
8.1.160.0040.00418.86
8.1.150.0070.00018.93
8.1.140.0040.00418.82
8.1.130.0000.00720.27
8.1.120.0000.00817.54
8.1.110.0060.00317.44
8.1.100.0000.00717.52
8.1.90.0030.00617.53
8.1.80.0040.00417.55
8.1.70.0080.00017.44
8.1.60.0030.00617.70
8.1.50.0050.00217.62
8.1.40.0030.00617.59
8.1.30.0060.00317.67
8.1.20.0030.00617.63
8.1.10.0040.00417.63
8.1.00.0000.00717.58
8.0.300.0040.00419.98
8.0.290.0030.00517.00
8.0.280.0040.00418.54
8.0.270.0000.00817.09
8.0.260.0030.00320.21
8.0.250.0030.00317.11
8.0.240.0030.00317.29
8.0.230.0030.00317.10
8.0.220.0080.00017.10
8.0.210.0040.00417.14
8.0.200.0030.00517.17
8.0.190.0000.00817.19
8.0.180.0040.00417.20
8.0.170.0040.00417.04
8.0.160.0070.00017.00
8.0.150.0040.00417.04
8.0.140.0040.00316.95
8.0.130.0000.00513.52
8.0.120.0000.00717.02
8.0.110.0040.00417.21
8.0.100.0040.00416.98
8.0.90.0000.00817.06
8.0.80.0100.01117.09
8.0.70.0040.00417.08
8.0.60.0030.00517.06
8.0.50.0000.00717.08
8.0.30.0120.00717.25
8.0.20.0120.01017.40
8.0.10.0040.00416.94
8.0.00.0070.01116.88
7.4.330.0000.00615.55
7.4.320.0030.00316.71
7.4.300.0000.00616.79
7.4.290.0040.00416.72
7.4.280.0040.00416.56
7.4.270.0030.00516.73
7.4.260.0090.00316.81
7.4.250.0000.00816.73
7.4.240.0000.00716.63
7.4.230.0000.00716.88
7.4.220.0000.00816.66
7.4.210.0060.01116.82
7.4.200.0000.00816.90
7.4.160.0050.01216.70
7.4.140.0130.01017.86
7.4.130.0070.01116.77
7.4.120.0080.00916.75
7.4.110.0100.00716.58
7.4.100.0120.00316.79
7.4.90.0070.01116.79
7.4.80.0130.01019.39
7.4.70.0120.00616.65
7.4.60.0070.01016.48
7.4.50.0070.00716.65
7.4.40.0140.00916.72
7.4.00.0070.00915.28
7.3.330.0050.00013.21
7.3.320.0000.00613.21
7.3.310.0030.00316.46
7.3.300.0050.00216.25
7.3.290.0080.00016.45
7.3.280.0090.00916.38
7.3.260.0130.00916.51
7.3.240.0090.00816.65
7.3.230.0080.00816.70
7.3.210.0080.00816.80
7.3.200.0130.00316.54
7.3.190.0070.01016.80
7.3.180.0190.00316.53
7.3.170.0030.01316.47
7.3.160.0060.01016.50
7.3.120.0070.01115.14
7.3.110.0050.01014.94
7.3.100.0030.01214.78
7.3.90.0040.00714.82
7.3.80.0070.00714.93
7.3.70.0100.00314.92
7.3.60.0060.00314.78
7.3.50.0040.00815.09
7.3.40.0130.00314.98
7.3.30.0030.01014.78
7.3.20.0030.01416.80
7.3.10.0000.01216.73
7.3.00.0050.01016.74
7.2.330.0060.01216.58
7.2.320.0090.00916.83
7.2.310.0130.00416.68
7.2.300.0060.01216.61
7.2.290.0090.00916.71
7.2.250.0110.00714.85
7.2.240.0030.01515.09
7.2.230.0100.00315.16
7.2.220.0100.00315.25
7.2.210.0060.00614.90
7.2.200.0060.00915.26
7.2.190.0060.00315.29
7.2.180.0060.00314.92
7.2.170.0030.01314.87
7.2.130.0050.00817.04
7.2.120.0090.00617.09
7.2.110.0030.01016.98
7.2.100.0630.01015.78
7.2.90.0270.01215.87
7.2.80.0210.00215.80
7.2.70.0420.00416.02
7.2.60.0880.00616.12
7.2.50.0350.00715.95
7.2.40.0890.00715.88
7.2.30.0650.00516.05
7.2.20.0060.01316.09
7.2.10.0700.00716.05
7.2.00.0100.00716.04
7.1.330.0100.00715.90
7.1.320.0100.00716.18
7.1.310.0090.00315.80
7.1.300.0040.00816.16
7.1.290.0000.00915.97
7.1.280.0100.00615.96
7.1.270.0060.01315.55
7.1.260.0060.01215.64
7.1.250.0000.01416.03
7.1.220.0100.01313.87
7.1.210.0300.00313.68
7.1.200.0370.01014.13
7.1.190.0300.00614.16
7.1.180.1220.00614.23
7.1.170.0400.00313.88
7.1.160.0130.01213.78
7.1.150.0290.00614.09
7.1.140.0150.00313.97
7.1.130.1930.00313.71
7.1.120.0130.00313.82
7.1.110.0560.00614.00
7.1.100.0380.00914.04
7.1.90.5530.01013.99
7.1.80.4930.01013.79
7.1.70.5280.01013.99
7.1.60.4940.01031.86
7.1.50.6930.00031.98
7.1.40.6510.01032.10
7.1.30.5170.01632.11
7.1.20.0760.01932.06
7.1.10.1340.00314.08
7.1.00.0880.00913.87
5.6.380.0040.01314.36

preferences:
60.27 ms | 400 KiB | 5 Q