3v4l.org

run code in 300+ PHP versions simultaneously
<?php function slug($title, $separator = '-') { // Remove all characters that are not the separator, letters, numbers, or whitespace. $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); // Convert all dashes/undescores into separator $flip = $separator == '-' ? '_' : '-'; $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); // Replace all separator characters and whitespace by a single separator $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); return trim($title, $separator); } slug('https://eu.api.battle.net/wow/battlePet/ability/640');

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.0040.01116.61
8.3.50.0050.01222.96
8.3.40.0080.00819.09
8.3.30.0040.01119.22
8.3.20.0110.00420.29
8.3.10.0030.00620.64
8.3.00.0090.00019.50
8.2.180.0180.00416.75
8.2.170.0120.00322.96
8.2.160.0090.00920.35
8.2.150.0120.00624.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0080.00021.07
8.2.110.0060.00320.25
8.2.100.0000.01218.09
8.2.90.0060.00319.22
8.2.80.0040.00417.97
8.2.70.0090.00317.75
8.2.60.0040.00417.80
8.2.50.0090.00318.07
8.2.40.0080.00018.22
8.2.30.0070.00019.46
8.2.20.0000.00717.85
8.2.10.0050.00218.26
8.2.00.0000.00917.96
8.1.280.0090.00625.92
8.1.270.0030.00621.98
8.1.260.0030.00626.35
8.1.250.0050.00228.09
8.1.240.0030.00623.79
8.1.230.0070.00418.95
8.1.220.0050.00317.77
8.1.210.0050.00318.77
8.1.200.0000.01117.48
8.1.190.0000.00817.48
8.1.180.0040.00818.10
8.1.170.0000.00818.70
8.1.160.0030.00522.11
8.1.150.0000.00818.96
8.1.140.0000.00717.65
8.1.130.0020.00517.93
8.1.120.0070.00017.73
8.1.110.0080.00017.66
8.1.100.0040.00417.62
8.1.90.0050.00217.68
8.1.80.0000.00817.56
8.1.70.0000.00717.67
8.1.60.0000.00817.81
8.1.50.0050.00317.69
8.1.40.0080.00017.79
8.1.30.0050.00317.85
8.1.20.0060.00317.87
8.1.10.0040.00417.63
8.1.00.0040.00417.66
8.0.300.0080.00018.77
8.0.290.0000.00717.00
8.0.280.0000.00718.52
8.0.270.0080.00017.35
8.0.260.0000.00717.35
8.0.250.0000.00717.14
8.0.240.0040.00417.13
8.0.230.0070.00017.27
8.0.220.0000.00717.17
8.0.210.0030.00317.24
8.0.200.0040.00417.24
8.0.190.0060.00317.14
8.0.180.0040.00417.14
8.0.170.0050.00317.18
8.0.160.0020.00517.11
8.0.150.0040.00417.13
8.0.140.0040.00417.14
8.0.130.0060.00013.64
8.0.120.0030.00517.10
8.0.110.0040.00417.15
8.0.100.0070.00017.12
8.0.90.0030.00517.03
8.0.80.0140.00317.26
8.0.70.0000.00717.27
8.0.60.0060.00317.10
8.0.50.0040.00417.17
8.0.30.0080.01617.40
8.0.20.0120.01317.40
8.0.10.0000.00717.13
8.0.00.0070.01217.10
7.4.330.0020.00215.30
7.4.320.0000.00716.75
7.4.300.0030.00316.85
7.4.290.0030.00316.86
7.4.280.0070.00016.86
7.4.270.0070.00016.96
7.4.260.0000.00916.88
7.4.250.0040.00416.71
7.4.240.0030.00516.97
7.4.230.0000.00716.77
7.4.220.0120.00616.93
7.4.210.0120.00316.95
7.4.200.0070.00017.03
7.4.160.0050.01116.69
7.4.150.0070.01717.40
7.4.140.0140.00617.86
7.4.130.0150.00316.79
7.4.120.0110.00516.84
7.4.110.0070.01017.08
7.4.100.0090.00916.81
7.4.90.0060.01016.77
7.4.80.0080.01219.39
7.4.70.0090.00916.70
7.4.60.0060.01216.69
7.4.50.0000.00416.75
7.4.40.0170.00316.78
7.4.30.0060.00917.05
7.4.00.0110.00715.16
7.3.330.0040.00313.35
7.3.320.0060.00013.38
7.3.310.0000.00716.56
7.3.300.0020.00516.38
7.3.290.0090.00416.51
7.3.280.0110.00516.55
7.3.270.0240.00317.40
7.3.260.0030.01616.68
7.3.250.0130.00816.56
7.3.240.0110.01316.73
7.3.230.0130.00516.70
7.3.210.0160.00616.72
7.3.200.0130.00319.39
7.3.190.0090.01316.66
7.3.180.0130.00316.71
7.3.170.0080.00916.64
7.3.160.0090.00616.86
7.3.10.0090.00416.73
7.3.00.0030.01216.70
7.2.330.0040.01816.89
7.2.320.0100.00616.81
7.2.310.0170.00016.88
7.2.300.0140.00316.80
7.2.290.0060.00916.85
7.2.130.0060.00617.14
7.2.120.0150.00017.04
7.2.110.0070.00317.16
7.2.100.0000.01616.90
7.2.90.0060.00317.07
7.2.80.0060.00617.14
7.2.70.0040.00716.97
7.2.60.0000.01217.09
7.2.50.0050.00517.13
7.2.40.0000.00917.21
7.2.30.0100.00617.27
7.2.20.0000.01716.96
7.2.10.0090.00317.09
7.2.00.0020.01118.36
7.1.250.0060.00615.94
7.1.100.0040.00818.44
7.1.70.0030.00617.55
7.1.60.0100.01319.46
7.1.50.0100.01617.26
7.1.00.0000.08022.37
7.0.200.0830.00314.61
7.0.140.0100.06722.00
7.0.60.0200.04319.93
7.0.50.0000.05317.90
7.0.40.0000.04720.07
7.0.30.0400.04720.32
7.0.20.0330.08320.09
7.0.10.0230.07320.27
7.0.00.0130.03720.20
5.6.280.0100.06720.78
5.6.210.0070.05720.57
5.6.200.0200.07318.15
5.6.190.0230.07020.47
5.6.180.0370.05020.39
5.6.170.0230.05720.62
5.6.160.0030.08720.44
5.6.150.0100.06718.14
5.6.140.0100.07718.29
5.6.130.0000.05018.26
5.6.120.0000.05021.04
5.6.110.0030.05321.05
5.6.100.0070.05721.02
5.6.90.0170.06720.98
5.6.80.0030.06720.40
5.5.350.3100.03720.34
5.5.340.0030.04317.95
5.5.330.0170.07320.36
5.5.320.0200.05020.30
5.5.310.0170.03720.33
5.5.300.0070.05717.98
5.5.290.0070.04717.98
5.5.280.0100.03720.73
5.5.270.0100.08020.89
5.5.260.0070.05720.87
5.5.250.0100.03320.62
5.5.240.0100.07020.37
5.4.450.4100.03319.54
5.4.440.0070.08019.50
5.4.430.1330.06319.46
5.4.420.3900.04319.44
5.4.410.3230.03719.37
5.4.400.4530.03718.97
5.4.390.3970.04319.18
5.4.380.3700.03319.22
5.4.370.3530.03319.23
5.4.360.3500.03719.23
5.4.350.4400.04019.10
5.4.340.4400.03719.13
5.4.320.4630.03319.09
5.4.310.4600.03719.20
5.4.300.4570.03319.12
5.4.290.4230.03319.06
5.4.280.4430.04019.00
5.4.270.2970.02319.21
5.4.260.0000.04719.19
5.4.250.4030.04319.23
5.4.240.4000.03319.13
5.4.230.4630.05319.14
5.4.220.2730.04019.25
5.4.210.1100.03319.05
5.4.200.2170.04019.10
5.4.190.2330.03319.14
5.4.180.4070.04319.20
5.4.170.3600.03718.98
5.4.160.0030.03719.04
5.4.150.0130.02719.22
5.4.140.2630.03716.46
5.4.130.3970.03316.40
5.4.120.2830.03716.31
5.4.110.2700.03016.50
5.4.100.3500.03716.30
5.4.90.3830.02716.53
5.4.80.4370.03716.44
5.4.70.4270.03316.51
5.4.60.5400.03016.38
5.4.50.3830.03716.43
5.4.40.3930.03716.48
5.4.30.3930.03316.45
5.4.20.3700.03016.32
5.4.10.3500.04016.42
5.4.00.3530.03315.89
5.3.290.4530.04014.82
5.3.280.4600.03714.74
5.3.270.3570.03014.59
5.3.260.2470.03714.65
5.3.250.0030.03714.60
5.3.240.1570.03714.67
5.3.230.3530.04314.63
5.3.220.3170.03314.62
5.3.210.3330.04014.57
5.3.200.2600.03314.59
5.3.190.3530.03314.56
5.3.180.3430.04014.57
5.3.170.4330.03314.62
5.3.160.4400.03714.48
5.3.150.3730.04014.57
5.3.140.4000.04014.57
5.3.130.4030.04314.60
5.3.120.3570.03714.56
5.3.110.3570.04314.70
5.3.100.4100.03314.04
5.3.90.4300.04014.02
5.3.80.3900.03313.96
5.3.70.4100.03013.90
5.3.60.3630.03713.95
5.3.50.3900.03713.96
5.3.40.3770.04014.02
5.3.30.4730.04313.79
5.3.20.3630.03713.75
5.3.10.4000.03713.82
5.3.00.3800.04013.67
5.2.170.3830.03711.14
5.2.160.3370.03011.11
5.2.150.3370.03011.09
5.2.140.3330.03311.14
5.2.130.3270.03311.06
5.2.120.3100.02311.11
5.2.110.3330.02011.13
5.2.100.3470.03011.06
5.2.90.3930.03011.11
5.2.80.3270.03011.17
5.2.70.3130.03311.14
5.2.60.3270.03011.20
5.2.50.3400.02711.07
5.2.40.2670.03311.05
5.2.30.2770.02711.13
5.2.20.2830.03310.85
5.2.10.2730.02310.93
5.2.00.2300.03010.71
5.1.60.2670.0279.99
5.1.50.2800.0279.96
5.1.40.2700.02710.04
5.1.30.2630.02010.39
5.1.20.2670.02010.37
5.1.10.2700.03010.07
5.1.00.3630.0239.97
5.0.50.1630.0208.54
5.0.40.1430.0208.57
5.0.30.1570.0378.19
5.0.20.1370.0208.35
5.0.10.1670.0238.13
5.0.00.1600.0278.13
4.4.90.1400.0136.21
4.4.80.1600.0176.21
4.4.70.1470.0206.21
4.4.60.1400.0176.21
4.4.50.1330.0136.21
4.4.40.1570.0236.21
4.4.30.1330.0106.21
4.4.20.1170.0176.21
4.4.10.1300.0176.21
4.4.00.0870.0336.21
4.3.110.1200.0176.21
4.3.100.1570.0176.21
4.3.90.1370.0136.21
4.3.80.1670.0236.21
4.3.70.1530.0076.21
4.3.60.1830.0106.21
4.3.50.1530.0136.21
4.3.40.1430.0236.21
4.3.30.1000.0206.21
4.3.20.0930.0206.21
4.3.10.0830.0176.21
4.3.00.0830.0176.21

preferences:
52.7 ms | 401 KiB | 5 Q