3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GenerateUrl ($s) { //Convert accented characters, and remove parentheses and apostrophes $from = explode (',', "ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u,(,),[,],'"); $to = explode (',', 'c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u,,,,,,'); //Do the replacements, and convert all other non-alphanumeric characters to spaces $s = preg_replace ('~[^\w\d]+~', '-', str_replace ($from, $to, trim ($s))); //Remove a - at the beginning or end and make lowercase return strtolower (preg_replace ('/^-/', '', preg_replace ('/-$/', '', $s))); } echo GenerateUrl ('test');

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.0070.00718.96
8.3.30.0120.00319.14
8.3.20.0040.00420.20
8.3.10.0050.00323.60
8.3.00.0000.00819.25
8.2.170.0070.01022.96
8.2.160.0100.01020.33
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0150.00026.16
8.2.120.0000.00920.96
8.2.110.0040.00420.62
8.2.100.0000.01117.84
8.2.90.0050.00519.25
8.2.80.0000.00817.97
8.2.70.0040.00417.73
8.2.60.0040.00817.92
8.2.50.0030.00618.07
8.2.40.0040.00419.95
8.2.30.0040.00418.31
8.2.20.0080.00017.92
8.2.10.0070.00017.96
8.2.00.0000.00817.80
8.1.270.0000.00822.14
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0030.00622.03
8.1.230.0130.00022.07
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.36
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0080.00018.59
8.1.160.0050.00222.06
8.1.150.0050.00218.75
8.1.140.0040.00417.53
8.1.130.0000.00717.89
8.1.120.0050.00317.49
8.1.110.0040.00417.55
8.1.100.0080.00017.63
8.1.90.0000.00717.64
8.1.80.0040.00417.54
8.1.70.0030.00317.46
8.1.60.0080.00017.79
8.1.50.0040.00417.68
8.1.40.0060.00317.60
8.1.30.0060.00317.80
8.1.20.0040.00417.76
8.1.10.0040.00417.69
8.1.00.0040.00417.65
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0030.00318.50
8.0.270.0030.00517.00
8.0.260.0060.00017.31
8.0.250.0070.00017.14
8.0.240.0050.00317.13
8.0.230.0030.00316.95
8.0.220.0030.00316.92
8.0.210.0000.01017.04
8.0.200.0030.00316.96
8.0.190.0050.00317.05
8.0.180.0080.00016.99
8.0.170.0030.00616.95
8.0.160.0000.00716.88
8.0.150.0040.00416.95
8.0.140.0040.00416.98
8.0.130.0060.00013.40
8.0.120.0050.00317.07
8.0.110.0040.00417.03
8.0.100.0040.00417.03
8.0.90.0000.00717.07
8.0.80.0120.00416.99
8.0.70.0050.00216.89
8.0.60.0070.00016.91
8.0.50.0020.00516.79
8.0.30.0070.01217.09
8.0.20.0080.01117.40
8.0.10.0050.00217.17
8.0.00.0120.00917.07
7.4.330.0000.00515.00
7.4.320.0060.00016.78
7.4.300.0030.00316.76
7.4.290.0030.00516.73
7.4.280.0040.00716.69
7.4.270.0030.00316.76
7.4.260.0100.00016.72
7.4.250.0030.00616.69
7.4.240.0020.00516.76
7.4.230.0000.00716.50
7.4.220.0070.01116.69
7.4.210.0140.00316.74
7.4.200.0030.00316.91
7.4.190.0070.00016.66
7.4.160.0100.00616.62
7.4.150.0140.00317.40
7.4.140.0140.00717.86
7.4.130.0100.01016.69
7.4.120.0120.00516.52
7.4.110.0030.01416.67
7.4.100.0120.01016.81
7.4.90.0070.01016.77
7.4.80.0100.00719.39
7.4.70.0070.01016.49
7.4.60.0090.00616.77
7.4.50.0040.00016.56
7.4.40.0100.00716.73
7.4.30.0080.00816.66
7.4.00.0100.00715.19
7.3.330.0040.00413.42
7.3.320.0060.00013.33
7.3.310.0050.00316.27
7.3.300.0040.00416.38
7.3.290.0060.01216.39
7.3.280.0110.00616.40
7.3.270.0070.01117.40
7.3.260.0110.01216.52
7.3.250.0090.00916.46
7.3.240.0060.01216.61
7.3.230.0090.00616.39
7.3.210.0110.00516.50
7.3.200.0090.00919.39
7.3.190.0160.00316.70
7.3.180.0060.00916.50
7.3.170.0090.00816.76
7.3.160.0130.00316.55
7.3.120.0070.01015.13
7.2.330.0140.00316.72
7.2.320.0060.01116.81
7.2.310.0100.00716.83
7.2.300.0170.00016.87
7.2.290.0120.00916.70
7.2.60.0030.00617.02
7.2.00.0030.00919.53
7.1.200.0030.00315.84
7.1.100.0000.01218.15
7.1.70.0000.00717.05
7.1.60.0100.01019.70
7.1.50.0100.01317.05
7.1.00.0070.07322.30
7.0.200.0040.00716.65
7.0.140.0030.07722.01
7.0.60.0070.04020.09
7.0.50.0070.07317.86
7.0.40.0000.08320.22
7.0.30.0200.04320.17
7.0.20.0200.05720.12
7.0.10.0070.07320.18
7.0.00.0070.04020.17
5.6.280.0070.07021.09
5.6.210.0070.05020.51
5.6.200.0000.08718.16
5.6.190.0030.05020.55
5.6.180.0370.06020.50
5.6.170.0300.06320.60
5.6.160.0030.05020.50
5.6.150.0070.08018.15
5.6.140.0030.04018.14
5.6.130.0100.07718.21
5.6.120.0070.08721.15
5.6.110.0270.06720.98
5.6.100.0170.07321.09
5.6.90.0030.08721.03
5.6.80.0070.08020.43
5.5.350.0000.05720.33
5.5.340.0130.06717.95
5.5.330.0100.08320.13
5.5.320.0070.07020.22
5.5.310.0300.07720.37
5.5.300.0030.04017.98
5.5.290.0070.05018.00
5.5.280.0070.03720.81
5.5.270.0170.06720.64
5.5.260.0070.08320.65
5.5.250.0100.08020.67
5.5.240.0030.07720.12
5.4.450.0300.04025.29
5.4.440.0270.04720.86
5.4.430.0300.04019.48
5.4.420.0170.03719.56
5.4.410.0270.04719.28
5.4.400.0330.04018.85
5.4.390.0270.04719.23
5.4.380.0270.06718.47
5.4.370.0230.05718.62
5.4.360.0370.04718.80
5.4.350.0530.06718.62
5.4.340.0370.05018.76
5.4.320.0050.03812.52
5.4.310.0050.04312.51
5.4.300.0080.03512.52
5.4.290.0060.03712.52
5.4.280.0070.03512.41
5.4.270.0060.03712.41
5.4.260.0050.03912.41
5.4.250.0110.03312.41
5.4.240.0050.03712.41
5.4.230.0090.03512.40
5.4.220.0060.03612.40
5.4.210.0040.03912.41
5.4.200.0070.03812.40
5.4.190.0070.03812.40
5.4.180.0120.03512.40
5.4.170.0080.03612.41
5.4.160.0090.03412.41
5.4.150.0070.03512.40
5.4.140.0080.04112.09
5.4.130.0060.03512.07
5.4.120.0060.03912.03
5.4.110.0090.03512.02
5.4.100.0060.03512.02
5.4.90.0090.03312.03
5.4.80.0080.03412.03
5.4.70.0040.03612.02
5.4.60.0040.03712.02
5.4.50.0050.03512.02
5.4.40.0120.03612.01
5.4.30.0110.03412.01
5.4.20.0100.04912.00
5.4.10.0040.04012.00
5.4.00.0080.03911.50
5.3.290.0090.03612.80
5.3.280.0060.03812.71
5.3.270.0060.03912.73
5.3.260.0070.05612.72
5.3.250.0080.03712.72
5.3.240.0060.05612.71
5.3.230.0060.05412.71
5.3.220.0060.03812.68
5.3.210.0100.03812.68
5.3.200.0040.03712.68
5.3.190.0080.03512.68
5.3.180.0070.03712.67
5.3.170.0090.03512.67
5.3.160.0090.03512.67
5.3.150.0050.03912.67
5.3.140.0050.03712.66
5.3.130.0080.04912.66
5.3.120.0050.04512.66
5.3.110.0100.03912.66
5.3.100.0040.04212.13
5.3.90.0120.03512.11
5.3.80.0070.04112.10
5.3.70.0090.03912.10
5.3.60.0090.04112.09
5.3.50.0050.04312.04
5.3.40.0050.03912.03
5.3.30.0060.03712.00
5.3.20.0040.03911.78
5.3.10.0050.03611.74
5.3.00.0060.03611.73
5.2.170.0050.0319.23
5.2.160.0060.0329.23
5.2.150.0050.0339.23
5.2.140.0070.0329.22
5.2.130.0070.0299.19
5.2.120.0020.0339.19
5.2.110.0040.0329.19
5.2.100.0060.0299.19
5.2.90.0030.0329.19
5.2.80.0030.0349.18
5.2.70.0050.0319.18
5.2.60.0030.0349.14
5.2.50.0030.0349.11
5.2.40.0040.0329.09
5.2.30.0080.0319.07
5.2.20.0090.0279.05
5.2.10.0050.0338.96
5.2.00.0020.0348.82
5.1.60.0040.0268.10
5.1.50.0040.0278.10
5.1.40.0040.0298.08
5.1.30.0030.0378.43
5.1.20.0070.0298.45
5.1.10.0090.0458.18
5.1.00.0070.0458.18
5.0.50.0070.0366.66
5.0.40.0080.0336.52
5.0.30.0130.0436.33
5.0.20.0070.0356.30
5.0.10.0060.0436.27
5.0.00.0080.0646.27
4.4.90.0080.0394.78
4.4.80.0090.0384.76
4.4.70.0040.0224.76
4.4.60.0020.0234.75
4.4.50.0010.0254.77
4.4.40.0100.0444.71
4.4.30.0040.0214.76
4.4.20.0000.0354.85
4.4.10.0040.0224.85
4.4.00.0030.0344.76
4.3.110.0100.0424.67
4.3.100.0030.0224.66
4.3.90.0230.0714.63
4.3.80.0030.0284.58
4.3.70.0000.0194.63
4.3.60.0040.0154.63
4.3.50.0020.0184.63
4.3.40.0040.0334.53
4.3.30.0050.0173.32
4.3.20.0040.0363.30
4.3.10.0040.0233.25
4.3.00.0070.01318.65

preferences:
45.63 ms | 400 KiB | 5 Q