3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo make_clean_url("اﺻﻠﯽ ﺗﺮﯾﻦ ﻓﺮق اﺳﺘﻌﺎره ﻣﺼﺮﺣﻪ و ﻣﮑﻨﯿﻪ ﭼﯿﺴﺖ؟"); function make_clean_url($url){ $url_word_separator = "-"; // To replace new lines with space $url = preg_replace('/\n+/', " ", $url); // To replace spaces with - $url = preg_replace('/\s+/', "-", $url); // To replace dot(s) with - $url = preg_replace('/\.+/', "-", $url); // To remove html-entitis characters i.e &laquo; $url = preg_replace("/&#?[a-z0-9]+;/i","",$url); // To remove eveything except numbers, dash, number-sign, space and alphabet characters $url = preg_replace('/[^\x{600}-\x{6FF}a-zA-Z0-9 #\-]/u', '', $url); // To trim surrounded spaces and dashs $url = trim($url, " $url_word_separator"); return $url; }

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.4.130.0120.00517.86
8.4.120.0110.00520.41
8.4.110.0080.00922.21
8.4.100.0130.00817.84
8.4.90.0120.00918.16
8.4.80.0110.00819.67
8.4.70.0100.00917.97
8.4.60.0050.00420.77
8.4.50.0020.00620.32
8.4.40.0110.01019.80
8.4.30.0060.01019.77
8.4.20.0040.00718.56
8.4.10.0050.00517.88
8.3.260.0110.00916.93
8.3.250.0120.00618.85
8.3.240.0030.00516.82
8.3.230.0130.00716.76
8.3.220.0090.00920.82
8.3.210.0090.00116.78
8.3.200.0100.01116.78
8.3.190.0100.01017.19
8.3.180.0130.00516.65
8.3.170.0110.00816.96
8.3.160.0030.00616.48
8.3.150.0080.01220.59
8.3.140.0040.00416.70
8.3.130.0090.00018.66
8.3.120.0060.00319.04
8.3.110.0030.01718.78
8.3.100.0070.01116.95
8.3.90.0080.00026.77
8.3.80.0030.00619.36
8.3.70.0110.01116.88
8.3.60.0110.00718.45
8.3.50.0150.00517.29
8.3.40.0110.00718.96
8.3.30.0120.00318.79
8.3.20.0040.00419.21
8.3.10.0050.00321.69
8.3.00.0080.00019.26
8.2.290.0090.00920.68
8.2.280.0120.00718.65
8.2.270.0130.00717.36
8.2.260.0080.00619.23
8.2.250.0090.00016.91
8.2.240.0040.00416.55
8.2.230.0040.01520.94
8.2.220.0030.00624.06
8.2.210.0050.00226.77
8.2.200.0060.00318.88
8.2.190.0070.00718.66
8.2.180.0150.00416.50
8.2.170.0090.00619.07
8.2.160.0040.01120.35
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00422.29
8.2.120.0070.00026.35
8.2.110.0170.00319.31
8.2.100.0090.00318.03
8.2.90.0050.00317.88
8.2.80.0090.00017.97
8.2.70.0000.00818.04
8.2.60.0050.00318.16
8.2.50.0060.00318.10
8.2.40.0000.00819.41
8.2.30.0040.00419.19
8.2.20.0060.00318.18
8.2.10.0050.00318.16
8.2.00.0040.00419.45
8.1.330.0100.00522.05
8.1.320.0120.00716.55
8.1.310.0060.00316.83
8.1.300.0090.00016.93
8.1.290.0060.00330.84
8.1.280.0150.00025.92
8.1.270.0000.01223.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0120.00022.00
8.1.230.0040.00821.00
8.1.220.0050.00317.80
8.1.210.0040.00418.77
8.1.200.0000.00817.60
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0000.00818.81
8.1.160.0000.00718.93
8.1.150.0000.00718.89
8.1.140.0040.00422.07
8.1.130.0030.00320.09
8.1.120.0000.00717.60
8.1.110.0030.00617.46
8.1.100.0070.00317.63
8.1.90.0000.00817.57
8.1.80.0070.00017.47
8.1.70.0000.00817.44
8.1.60.0000.00917.80
8.1.50.0000.01017.64
8.1.40.0030.00517.74
8.1.30.0030.00617.80
8.1.20.0040.00417.73
8.1.10.0040.00417.66
8.1.00.0030.00517.57
8.0.300.0000.00720.02
8.0.290.0000.01017.00
8.0.280.0000.00718.50
8.0.270.0030.00317.28
8.0.260.0040.00418.44
8.0.250.0070.00017.18
8.0.240.0070.00017.22
8.0.230.0020.00517.19
8.0.220.0000.00817.19
8.0.210.0000.00617.12
8.0.200.0000.00717.08
8.0.190.0000.00817.19
8.0.180.0000.00817.16
8.0.170.0090.00017.05
8.0.160.0000.00717.13
8.0.150.0000.00717.13
8.0.140.0040.00417.06
8.0.130.0030.00313.64
8.0.120.0000.00717.03
8.0.110.0040.00417.16
8.0.100.0000.00717.17
8.0.90.0030.00516.94
8.0.80.0080.00917.12
8.0.70.0060.00316.93
8.0.60.0040.00416.92
8.0.50.0050.00317.12
8.0.30.0100.01017.19
8.0.20.0150.00417.40
8.0.10.0050.00217.18
8.0.00.0100.00817.03
7.4.330.0060.00016.81
7.4.320.0030.00316.70
7.4.300.0000.00716.74
7.4.290.0030.00316.73
7.4.280.0050.00316.64
7.4.270.0040.00416.80
7.4.260.0040.00416.60
7.4.250.0040.00416.72
7.4.240.0000.00716.76
7.4.230.0000.00816.92
7.4.220.0040.00416.73
7.4.210.0060.00916.92
7.4.200.0020.00516.92
7.4.160.0110.00516.74
7.4.140.0090.01017.86
7.4.130.0070.01116.85
7.4.120.0100.00916.75
7.4.110.0090.00916.77
7.4.100.0060.01616.73
7.4.90.0180.00016.54
7.4.80.0120.00919.39
7.4.70.0030.01616.89
7.4.60.0070.01116.79
7.4.50.0030.01416.67
7.4.40.0060.01116.71
7.4.00.0080.01015.37
7.3.330.0000.00513.32
7.3.320.0030.00313.36
7.3.310.0000.00716.38
7.3.300.0030.00316.58
7.3.290.0060.00316.56
7.3.280.0130.00616.48
7.3.260.0110.00716.75
7.3.240.0080.01216.73
7.3.230.0120.00916.51
7.3.210.0080.00816.76
7.3.200.0130.01016.77
7.3.190.0120.00816.35
7.3.180.0120.00816.61
7.3.170.0150.00316.41
7.3.160.0030.01416.75
7.3.120.0100.00715.40
7.3.110.0130.00715.00
7.3.100.0090.00615.07
7.3.90.0040.01115.11
7.3.80.0090.00615.23
7.3.70.0040.00715.13
7.3.60.0070.00715.11
7.3.50.0070.01015.10
7.3.40.0090.00615.11
7.3.30.0090.00615.14
7.3.20.0040.00816.94
7.3.10.0040.00816.95
7.3.00.0100.00316.95
7.2.330.0140.00816.82
7.2.320.0100.00916.61
7.2.310.0070.01016.71
7.2.300.0090.01316.85
7.2.290.0150.00516.90
7.2.250.0120.00615.02
7.2.240.0100.00715.04
7.2.230.0000.01515.38
7.2.220.0030.01015.34
7.2.210.0070.00715.02
7.2.200.0000.00915.20
7.2.190.0070.00415.13
7.2.180.0000.00815.27
7.2.170.0050.00815.34
7.2.120.1860.01314.96
7.2.110.0810.00714.91
7.2.100.1240.01014.77
7.2.90.1420.00014.90
7.2.80.0940.00914.66
7.2.70.0820.01715.31
7.2.60.0860.00715.04
7.2.50.0830.00714.85
7.2.40.0880.01315.14
7.2.30.0740.01315.02
7.2.20.1330.00315.16
7.2.10.0740.01315.20
7.2.00.0870.01014.92
7.1.330.0000.01416.00
7.1.320.0040.00815.95
7.1.310.0030.00715.63
7.1.300.0070.00715.89
7.1.290.0110.00315.98
7.1.280.0070.00716.00
7.1.270.0090.00016.13
7.1.260.0060.01016.03
7.1.240.0960.00614.09
7.1.230.0770.01613.87
7.1.220.1100.00714.30
7.1.210.1050.01013.91
7.1.200.1070.01014.04
7.1.190.1620.00413.93
7.1.180.1030.00713.92
7.1.170.1140.01013.95
7.1.160.0830.00713.77
7.1.150.1010.00714.12
7.1.140.0830.01013.94
7.1.130.0900.00314.21
7.1.120.0830.00914.01
7.1.110.0710.00714.32
7.1.100.0700.01314.17
7.1.90.0900.00314.02
7.1.80.0700.01314.23
7.1.70.0790.00714.06
7.1.60.0870.00614.27
7.1.50.1320.01014.20
7.1.40.1530.00714.06
7.1.30.1130.01014.19
7.1.20.1100.00714.13
7.1.10.0700.00713.96
7.1.00.1000.01014.19
5.6.380.0110.00914.00

preferences:
28.1 ms | 403 KiB | 5 Q