3v4l.org

run code in 300+ PHP versions simultaneously
<?php function slugify($text) { // replace non letter or digits by - $text = preg_replace('~[^\\pL\d]+~u', '-', $text); // trim $text = trim($text, '-'); // transliterate $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); // lowercase $text = strtolower($text); // remove unwanted characters $text = preg_replace('~[^-\w]+~', '', $text); if (empty($text)) { return 'n-a'; } return $text; } $string = "andrés EFI收购Cretaprint"; echo slugify($string);

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.0060.00918.67
8.3.30.0090.00619.00
8.3.20.0000.00818.88
8.3.10.0040.00420.79
8.3.00.0060.00317.61
8.2.170.0140.00022.96
8.2.160.0080.00522.21
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0080.00020.07
8.2.110.0030.00620.54
8.2.100.0070.00417.97
8.2.90.0100.00019.34
8.2.80.0050.00217.93
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0030.00718.07
8.2.40.0000.00818.22
8.2.30.0000.00718.20
8.2.20.0000.00817.86
8.2.10.0030.00517.98
8.2.00.0000.00818.04
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0090.00022.13
8.1.230.0040.00820.88
8.1.220.0030.00717.74
8.1.210.0050.00318.95
8.1.200.0060.00317.35
8.1.190.0030.00517.53
8.1.180.0040.00418.10
8.1.170.0040.00418.83
8.1.160.0000.00718.83
8.1.150.0070.00018.66
8.1.140.0030.00717.61
8.1.130.0030.00517.82
8.1.120.0040.00417.45
8.1.110.0070.00017.50
8.1.100.0000.00717.43
8.1.90.0040.00417.43
8.1.80.0030.00517.45
8.1.70.0030.00317.51
8.1.60.0080.00017.66
8.1.50.0000.00717.64
8.1.40.0030.00517.66
8.1.30.0040.00417.69
8.1.20.0060.00317.82
8.1.10.0040.00417.59
8.1.00.0050.00317.57
8.0.300.0060.00319.82
8.0.290.0030.00616.88
8.0.280.0000.00718.52
8.0.270.0070.00017.34
8.0.260.0030.00317.15
8.0.250.0040.00417.06
8.0.240.0110.00017.27
8.0.230.0030.00317.04
8.0.220.0000.00817.12
8.0.210.0050.00217.03
8.0.200.0000.00717.14
8.0.190.0040.00417.13
8.0.180.0020.00517.16
8.0.170.0090.00017.16
8.0.160.0040.00417.06
8.0.150.0040.00417.03
8.0.140.0060.00817.07
8.0.130.0030.00313.68
8.0.120.0000.00917.15
8.0.110.0030.00617.16
8.0.100.0000.00917.21
8.0.90.0030.00617.14
8.0.80.0100.01317.23
8.0.70.0000.00917.29
8.0.60.0030.00617.29
8.0.50.0040.00417.34
8.0.30.0130.01217.54
8.0.20.0100.01417.54
8.0.10.0060.00317.15
8.0.00.0110.00816.98
7.4.330.0020.00213.23
7.4.320.0000.00716.82
7.4.300.0030.00316.77
7.4.290.0030.00316.75
7.4.280.0060.00316.79
7.4.270.0070.00016.82
7.4.260.0000.00613.48
7.4.250.0030.00617.00
7.4.240.0040.00416.84
7.4.230.0060.00316.80
7.4.220.0120.00916.86
7.4.210.0090.01016.99
7.4.200.0030.00616.70
7.4.190.0060.00317.02
7.4.160.0110.00816.96
7.4.150.0150.00616.90
7.4.140.0120.00816.80
7.4.130.0120.00616.88
7.4.120.0120.00616.99
7.4.110.0060.01317.04
7.4.100.0100.01016.80
7.4.90.0100.01016.82
7.4.80.0090.01819.39
7.4.70.0150.01116.74
7.4.60.0150.01016.58
7.4.50.0060.01216.68
7.4.40.0130.01216.77
7.4.30.0220.01516.62
7.4.20.0150.01816.73
7.4.10.0300.01116.78
7.4.00.0130.00915.88
7.3.330.0000.00613.55
7.3.320.0020.00513.44
7.3.310.0080.00016.37
7.3.300.0040.00416.59
7.3.290.0080.00716.58
7.3.280.0080.01116.58
7.3.270.0140.00716.57
7.3.260.0110.01116.78
7.3.250.0120.00816.72
7.3.240.0090.01216.65
7.3.230.0090.01216.62
7.3.210.0090.01616.84
7.3.200.0040.01416.58
7.3.190.0120.01616.71
7.3.180.0200.00916.59
7.3.170.0130.01516.71
7.3.160.0130.01216.69
7.3.150.0210.00916.56
7.3.140.0230.01216.72
7.3.130.0240.01216.77
7.3.120.0150.01216.12
7.3.110.0160.01916.63
7.3.100.0230.01316.48
7.3.90.0270.00916.50
7.3.80.0200.01616.59
7.3.70.0180.01416.54
7.3.60.0210.00616.63
7.3.50.0290.00316.55
7.3.40.0270.00816.65
7.3.30.0200.01216.71
7.3.20.0270.01516.81
7.3.10.0170.01516.74
7.3.00.0140.00716.82
7.2.330.0090.01017.03
7.2.320.0060.01216.88
7.2.310.0180.00816.80
7.2.300.0140.01516.89
7.2.290.0130.01316.65
7.2.280.0180.01416.68
7.2.270.0300.00416.68
7.2.260.0200.01616.68
7.2.250.0160.02016.95
7.2.240.0310.01017.04
7.2.230.0210.01716.70
7.2.220.0210.01817.04
7.2.210.0350.01017.05
7.2.200.0270.01016.96
7.2.190.0200.01316.86
7.2.180.0240.01016.81
7.2.170.0130.02016.91
7.2.160.0250.00817.01
7.2.150.0460.01616.84
7.2.140.0270.01116.95
7.2.130.0180.01017.11
7.2.120.0130.00917.08
7.2.110.0140.00617.08
7.2.100.0180.00717.01
7.2.90.0120.00817.24
7.2.80.0130.00917.12
7.2.70.0090.01417.19
7.2.60.0130.00817.21
7.2.50.0090.01016.95
7.2.40.0110.00917.09
7.2.30.0110.01217.27
7.2.20.0150.00917.06
7.2.10.0110.00817.09
7.2.00.0090.01017.77
7.1.330.0400.01415.96
7.1.320.0330.00616.01
7.1.310.0200.01516.10
7.1.300.0200.01415.82
7.1.290.0240.00715.78
7.1.280.0240.01515.84
7.1.270.0230.00715.86
7.1.260.0170.01415.88
7.1.250.0100.01116.03
7.1.240.0160.00915.92
7.1.230.0190.00715.97
7.1.220.0110.01415.91
7.1.210.0160.00815.97
7.1.200.0120.00915.96
7.1.190.0140.01015.94
7.1.180.0140.01016.05
7.1.170.0150.00815.88
7.1.160.0130.01015.98
7.1.150.0200.00415.97
7.1.140.0120.01215.99
7.1.130.0420.00615.98
7.1.120.0070.01415.90
7.1.110.0150.01115.81
7.1.100.0130.01116.82
7.1.90.0090.01315.95
7.1.80.0170.00816.03
7.1.70.0080.01116.52
7.1.60.0100.01317.13
7.1.50.0150.00916.32
7.1.40.0150.01116.05
7.1.30.0130.01316.01
7.1.20.0100.01216.03
7.1.10.0190.00915.82
7.1.00.0150.03318.16
7.0.330.0130.01115.38
7.0.320.0120.01415.50
7.0.310.0160.00515.58
7.0.300.0100.01015.41
7.0.290.0140.01015.38
7.0.280.0260.01115.65
7.0.270.0070.01615.42
7.0.260.0140.00915.51
7.0.250.0130.00715.63
7.0.240.0120.01015.77
7.0.230.0180.00615.58
7.0.220.0140.01015.64
7.0.210.0150.01015.53
7.0.200.0130.00815.95
7.0.190.0130.01215.54
7.0.180.0300.01215.42
7.0.170.0120.01315.54
7.0.160.0150.00915.72
7.0.150.0130.00815.48
7.0.140.0070.03717.78
7.0.130.0170.01215.68
7.0.120.0120.03117.72
7.0.110.0140.00915.39
7.0.100.0120.01015.70
7.0.90.0130.01115.54
7.0.80.0080.01115.56
7.0.70.0180.00415.68
7.0.60.0100.03417.11
7.0.50.0110.04016.36
7.0.40.0140.02016.34
7.0.30.0160.03616.57
7.0.20.0190.03316.59
7.0.10.0090.02416.46
7.0.00.0100.02116.59
5.6.400.0200.01316.35
5.6.390.0150.02016.52
5.6.380.0170.00915.21
5.6.370.0180.00715.46
5.6.360.0160.00715.43
5.6.350.0110.01615.26
5.6.340.0140.00915.29
5.6.330.0080.01115.42
5.6.320.0110.01015.53
5.6.310.0110.01615.46
5.6.300.0160.01115.25
5.6.290.0170.01115.49
5.6.280.0120.03317.41
5.6.270.0180.01015.54
5.6.260.0130.01015.54
5.6.250.0130.01115.26
5.6.240.0120.01415.47
5.6.230.0140.01115.29
5.6.220.0130.00815.21
5.6.210.0150.01517.09
5.6.200.0110.02316.23
5.6.190.0190.03217.10
5.6.180.1540.01817.18
5.6.170.0220.03017.04
5.6.160.0080.02617.08
5.6.150.0080.02116.25
5.6.140.0090.02916.38
5.6.130.0090.02016.36
5.6.120.0100.02617.20
5.6.110.0110.03817.38
5.6.100.0160.03017.34
5.6.90.0070.04217.25
5.6.80.0130.03317.11
5.6.70.1370.02416.93
5.6.60.0140.01115.27
5.6.50.0140.01315.31
5.6.40.0150.00915.49
5.6.30.0130.01215.26
5.6.20.0110.01415.29
5.6.10.0160.01015.03
5.6.00.0140.01115.26
5.5.380.0100.01013.65
5.5.370.0120.01213.55
5.5.360.0110.01213.63
5.5.350.0110.03215.86
5.5.340.0120.01915.13
5.5.330.0140.02116.00
5.5.320.0120.03015.99
5.5.310.0180.03515.96
5.5.300.0070.02215.07
5.5.290.0090.03315.14
5.5.280.0070.03716.02
5.5.270.0090.02415.99
5.5.260.0100.03316.07
5.5.250.0150.02916.00
5.5.240.0110.03015.84
5.5.230.0120.00813.65
5.5.220.0130.00813.54
5.5.210.0100.01313.56
5.5.200.0150.00813.58
5.5.190.0140.00813.63
5.5.180.0160.01113.62
5.5.170.0090.01213.56
5.5.160.0130.00913.59
5.5.150.0110.01013.60
5.5.140.0170.00813.61
5.5.130.0120.01013.55
5.5.120.0090.01313.57
5.5.110.0170.00613.59
5.5.100.0160.00513.56
5.5.90.0120.00813.54
5.5.80.0150.01113.66
5.5.70.0100.01013.58
5.5.60.0150.00913.61
5.5.50.0110.01013.60
5.5.40.0130.01213.54
5.5.30.0120.01013.61
5.5.20.0120.01013.58
5.5.10.0130.00613.50
5.5.00.0090.01113.45
5.4.450.0080.03014.47
5.4.440.0100.01714.51
5.4.430.0090.01914.37
5.4.420.0100.02514.49
5.4.410.0100.01814.36
5.4.400.0080.02914.29
5.4.390.0030.03014.39
5.4.380.0100.02114.34
5.4.370.0080.02914.28
5.4.360.0080.01914.45
5.4.350.0100.01614.41
5.4.340.0100.02914.29
5.4.330.0040.01212.03
5.4.320.0060.03314.28
5.4.310.0100.02814.34
5.4.300.0070.01914.33
5.4.290.0090.01614.34
5.4.280.0100.01514.34
5.4.270.0100.01914.44
5.4.260.0070.02114.40
5.4.250.0090.02414.34
5.4.240.0070.03014.38
5.4.230.0080.03014.42
5.4.220.0060.02214.27
5.4.210.0100.02114.41
5.4.200.0110.02614.27
5.4.190.0090.02014.29
5.4.180.0080.02714.37
5.4.170.0080.02514.32
5.4.160.0090.01814.24
5.4.150.0070.01914.31
5.4.140.0100.01613.53
5.4.130.0080.01813.50
5.4.120.0090.01613.54
5.4.110.0120.01213.57
5.4.100.0060.01913.48
5.4.90.0100.01513.48
5.4.80.0100.01813.47
5.4.70.0070.01813.52
5.4.60.0080.01813.54
5.4.50.0080.01613.56
5.4.40.0130.01313.42
5.4.30.0130.01113.47
5.4.20.0100.01313.52
5.4.10.0070.01613.47
5.4.00.0120.01313.31
5.3.290.0040.02613.15
5.3.280.0140.02413.07
5.3.270.0070.02313.14
5.3.260.0070.02013.08
5.3.250.0100.01613.14
5.3.240.0100.01813.05
5.3.230.0070.02213.10
5.3.220.0080.02013.06
5.3.210.0070.01913.01
5.3.200.0130.01213.01
5.3.190.0050.02313.06
5.3.180.0060.02013.08
5.3.170.0060.02013.12
5.3.160.0130.02213.04
5.3.150.0080.01913.08
5.3.140.0060.02213.06
5.3.130.0130.01612.98
5.3.120.0150.01413.07
5.3.110.0070.02113.03
5.3.100.0060.02012.88
5.3.90.0080.01812.94
5.3.80.0100.01612.89
5.3.70.0080.01812.93
5.3.60.0030.02312.92
5.3.50.0050.01912.86
5.3.40.0040.01712.82
5.3.30.0050.01812.88
5.3.20.0060.01512.79
5.3.10.0050.01812.69
5.3.00.0040.01812.71
5.2.170.0020.01911.65
5.2.160.0040.01811.57
5.2.150.0050.01711.54
5.2.140.0030.01811.57
5.2.130.0010.02011.54
5.2.120.0040.01711.66
5.2.110.0030.01411.57
5.2.100.0050.01511.56
5.2.90.0070.01411.59
5.2.80.0050.01611.51
5.2.70.0050.01411.47
5.2.60.0030.01711.50
5.2.50.0030.01811.53
5.2.40.0040.01711.56
5.2.30.0040.01411.42
5.2.20.0080.00911.41
5.2.10.0060.01811.37
5.2.00.0030.02911.32
5.1.60.0050.01611.12
5.1.50.0020.02211.07
5.1.40.0070.02211.06
5.1.30.0080.01511.20
5.1.20.0060.01311.21
5.1.10.0060.01411.08
5.1.00.0040.01311.10
5.0.50.0030.02210.94
5.0.40.0060.01610.94
5.0.30.0060.02710.94
5.0.20.0050.02010.94
5.0.10.0010.01510.94
5.0.00.0040.02110.94
4.4.90.0020.00710.94
4.4.80.0020.00710.94
4.4.70.0030.00810.94
4.4.60.0020.00910.94
4.4.50.0010.00910.94
4.4.40.0030.01710.94
4.4.30.0010.01310.94
4.4.20.0020.01010.94
4.4.10.0010.01610.94
4.4.00.0010.01910.94
4.3.110.0020.01310.94
4.3.100.0040.01310.94
4.3.90.0040.01210.94
4.3.80.0020.02010.94
4.3.70.0020.01210.94
4.3.60.0010.01410.94
4.3.50.0020.00810.94
4.3.40.0030.01510.94
4.3.30.0010.01210.94
4.3.20.0000.01610.94
4.3.10.0050.00610.94
4.3.00.0030.01310.94

preferences:
44.18 ms | 400 KiB | 5 Q