3v4l.org

run code in 300+ PHP versions simultaneously
<?php function slugify($text) { $text = trim($text); $text = strtr( utf8_decode($text), "\xe1\xc1\xe0\xc0\xe2\xc2\xe4\xc4\xe3\xc3\xe5\xc5" . "\xaa\xe7\xc7\xe9\xc9\xe8\xc8\xea\xca\xeb\xcb\xed" . "\xcd\xec\xcc\xee\xce\xef\xcf\xf1\xd1\xf3\xd3\xf2" . "\xd2\xf4\xd4\xf6\xd6\xf5\xd5\x8\xd8\xba\xf0\xfa\xda" . "\xf9\xd9\xfb\xdb\xfc\xdc\xfd\xdd\xff\xe6\xc6\xdf\xf8", "aAaAaAaAaAaAacCeEeEeEeEiIiIiIiInNo" . "OoOoOoOoOoOoouUuUuUuUyYyaAso" ); $text = preg_replace('![^a-z0-9]!i', ' ', $text); $text = preg_replace('!\s{2,}!', ' ', $text); $text = preg_replace('!\s!', '_', $text); return $text; } for($i=0;$i<=10;$i++) slugify( '"6รจ1es(r51-_dih56bs1z"6bt' );

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.0070.01017.00
8.3.50.0180.00419.90
8.3.40.0110.00418.92
8.3.30.0150.00018.91
8.3.20.0040.00420.32
8.3.10.0080.00023.66
8.3.00.0080.00019.38
8.2.180.0120.00317.13
8.2.170.0150.00322.96
8.2.160.0130.00920.27
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0190.00026.16
8.2.120.0040.00421.14
8.2.110.0060.00320.42
8.2.100.0040.00917.84
8.2.90.0040.00419.76
8.2.80.0040.00417.97
8.2.70.0000.00817.80
8.2.60.0040.00417.80
8.2.50.0040.00419.28
8.2.40.0110.00020.06
8.2.30.0070.00017.99
8.2.20.0050.00317.87
8.2.10.0000.00718.12
8.2.00.0030.00617.93
8.1.280.0070.01425.92
8.1.270.0130.00723.97
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0050.00523.92
8.1.230.0090.00318.95
8.1.220.0060.00317.76
8.1.210.0030.00518.77
8.1.200.0090.00017.35
8.1.190.0060.00317.23
8.1.180.0090.00018.10
8.1.170.0040.00418.68
8.1.160.0040.00421.96
8.1.150.0000.00818.86
8.1.140.0050.00317.52
8.1.130.0050.00317.91
8.1.120.0030.00517.55
8.1.110.0080.00017.59
8.1.100.0000.00717.41
8.1.90.0000.00717.52
8.1.80.0020.00517.59
8.1.70.0070.00017.46
8.1.60.0050.00317.64
8.1.50.0030.00517.72
8.1.40.0040.00417.67
8.1.30.0030.00517.84
8.1.20.0030.00517.73
8.1.10.0000.00817.67
8.1.00.0050.00217.45
8.0.300.0040.00419.90
8.0.290.0050.00216.88
8.0.280.0040.00418.34
8.0.270.0070.00017.29
8.0.260.0030.00317.16
8.0.250.0000.00717.03
8.0.240.0070.00017.05
8.0.230.0000.00717.02
8.0.220.0080.00017.07
8.0.210.0030.00516.86
8.0.200.0030.00317.06
8.0.190.0030.00516.96
8.0.180.0040.00416.93
8.0.170.0040.00417.07
8.0.160.0030.00417.01
8.0.150.0030.00516.76
8.0.140.0030.00416.97
8.0.130.0000.00613.43
8.0.120.0000.00816.83
8.0.110.0000.00917.00
8.0.100.0040.00417.05
8.0.90.0000.00716.86
8.0.80.0130.00316.93
8.0.70.0050.00317.12
8.0.60.0050.00217.06
8.0.50.0040.00416.80
8.0.30.0110.00917.27
8.0.20.0160.00417.41
8.0.10.0040.00416.96
8.0.00.0120.00516.73
7.4.330.0000.00515.00
7.4.320.0060.00016.72
7.4.300.0030.00516.73
7.4.290.0030.00316.67
7.4.280.0080.00016.83
7.4.270.0000.00716.83
7.4.260.0070.00016.83
7.4.250.0040.00416.72
7.4.240.0030.00516.79
7.4.230.0000.00716.83
7.4.220.0110.00716.80
7.4.210.0140.00016.77
7.4.200.0070.00016.81
7.4.160.0040.01116.69
7.4.150.0060.01117.40
7.4.140.0120.00517.86
7.4.130.0100.00716.72
7.4.120.0130.00416.77
7.4.110.0060.01016.62
7.4.100.0110.00816.87
7.4.90.0130.00616.55
7.4.80.0050.01419.39
7.4.70.0060.02416.77
7.4.60.0100.00716.67
7.4.50.0020.00216.79
7.4.40.0120.00616.57
7.4.30.0060.01016.54
7.4.00.0080.00715.17
7.3.330.0000.00713.38
7.3.320.0050.00013.45
7.3.310.0040.00416.36
7.3.300.0000.00716.51
7.3.290.0070.00716.52
7.3.280.0100.00916.46
7.3.270.0160.00417.40
7.3.260.0070.01016.59
7.3.250.0120.00516.61
7.3.240.0040.01216.54
7.3.230.0030.01316.64
7.3.210.0090.01216.73
7.3.200.0080.01119.39
7.3.190.0090.00916.70
7.3.180.0110.00616.53
7.3.170.0080.00816.66
7.3.160.0100.00716.73
7.3.120.0110.00415.19
7.3.110.0070.01114.91
7.3.100.0080.00815.16
7.3.90.0040.00414.71
7.3.80.0040.01114.69
7.3.70.0000.01214.70
7.3.60.0030.01015.05
7.3.50.0070.00415.08
7.3.40.0070.01015.05
7.3.30.0000.01014.82
7.3.20.0030.00916.78
7.3.10.0050.00516.63
7.3.00.0070.00816.77
7.2.330.0070.01116.89
7.2.320.0040.01416.85
7.2.310.0070.01016.80
7.2.300.0080.00816.71
7.2.290.0080.01116.68
7.2.250.0130.00715.15
7.2.240.0100.01015.08
7.2.230.0000.01815.25
7.2.220.0080.00415.18
7.2.210.0060.00915.36
7.2.200.0040.00715.22
7.2.190.0030.01315.18
7.2.180.0070.00415.09
7.2.170.0070.00715.19
7.2.130.0040.00817.08
7.2.120.0080.00617.09
7.2.110.0000.01116.91
7.2.100.0000.01317.16
7.2.90.0140.00317.06
7.2.80.0090.00916.99
7.2.70.0040.01116.80
7.2.60.0110.00016.91
7.2.50.0040.01416.77
7.2.40.0000.01317.09
7.2.30.0080.00417.15
7.2.20.0000.01416.87
7.2.10.0040.00816.79
7.2.00.0090.00617.01
7.1.330.0070.00716.20
7.1.320.0030.00616.06
7.1.310.0060.00616.11
7.1.300.0050.00815.75
7.1.290.0060.00316.19
7.1.280.0030.01015.99
7.1.270.0040.01115.96
7.1.260.0090.00615.89
7.1.250.0090.00616.02
7.1.240.0070.00715.76
7.1.230.0000.00915.92
7.1.220.0070.00715.87
7.1.210.0060.00316.07
7.1.200.0070.00415.88
7.1.190.0000.00915.85
7.1.180.0070.00316.09
7.1.170.0060.00315.87
7.1.160.0080.00015.99
7.1.150.0070.00316.12
7.1.140.0070.01016.10
7.1.130.0060.00615.98
7.1.120.0030.01016.11
7.1.110.0060.00316.06
7.1.100.0110.00516.96
7.1.90.0070.00715.98
7.1.80.0030.00916.00
7.1.70.0050.00916.78
7.1.60.0040.01317.72
7.1.50.0050.01316.55
7.1.40.0100.00716.01
7.1.30.0000.01015.71
7.1.20.0030.01016.04
7.1.10.0000.01515.95
7.1.00.0070.04019.17
7.0.330.0130.00015.64
7.0.320.0030.00815.59
7.0.310.0090.00615.59
7.0.300.0070.00415.59
7.0.290.0060.00615.53
7.0.280.0030.01015.81
7.0.270.0040.00815.47
7.0.260.0000.01515.65
7.0.250.0060.00615.68
7.0.240.0040.00715.64
7.0.230.0060.00315.54
7.0.220.0090.00615.63
7.0.210.0070.00715.41
7.0.200.0050.00716.13
7.0.190.0110.00315.57
7.0.180.0030.01015.57
7.0.170.0070.00715.76
7.0.160.0080.00515.43
7.0.150.0030.00715.50
7.0.140.0050.04018.82
7.0.130.0030.01015.53
7.0.120.0030.00615.57
7.0.110.0000.01415.36
7.0.100.0000.00915.76
7.0.90.0030.00715.55
7.0.80.0100.00315.24
7.0.70.0030.00615.32
7.0.60.0070.04317.66
7.0.50.0070.03016.88
7.0.40.0100.02216.94
7.0.30.0160.02516.86
7.0.20.0190.03616.88
7.0.10.0030.04316.97
7.0.00.0070.02216.97
5.6.380.0100.00314.22
5.6.370.0100.00314.00
5.6.360.0100.00414.09
5.6.350.0070.00714.16
5.6.340.0080.00414.43
5.6.330.0030.00713.94
5.6.320.0030.00713.96
5.6.310.0030.01014.30
5.6.300.0070.00714.61
5.6.290.0080.00414.55
5.6.280.0050.04017.84
5.6.270.0040.01114.52
5.6.260.0040.00414.39
5.6.250.0080.00414.41
5.6.240.0040.01114.25
5.6.230.0130.00314.32
5.6.220.0110.00014.47
5.6.210.0070.02217.59
5.6.200.0060.04616.24
5.6.190.0140.03217.50
5.6.180.0150.03817.56
5.6.170.0160.02817.39
5.6.160.0110.03017.31
5.6.150.0110.03316.30
5.6.140.0070.04716.26
5.6.130.0070.02016.32
5.6.120.0130.03717.66
5.6.110.0080.03917.59
5.6.100.0100.03617.67
5.6.90.0090.04217.71
5.6.80.0020.04317.49
5.6.70.2200.02117.47
5.6.60.0030.01014.29
5.6.50.0000.00914.53
5.6.40.0040.00814.40
5.6.30.0040.01114.20
5.6.20.0070.00714.29
5.6.10.0000.00914.45
5.6.00.0050.00614.34
5.5.380.0070.00011.53
5.5.370.0030.00311.20
5.5.360.0030.00311.43
5.5.350.0210.03815.85
5.5.340.0080.04014.59
5.5.330.0060.04315.91
5.5.320.0040.04515.81
5.5.310.0190.03615.87
5.5.300.0070.04514.68
5.5.290.0080.04314.58
5.5.280.0080.03816.02
5.5.270.0050.05015.93
5.5.260.0070.02316.03
5.5.250.0030.03815.98
5.5.240.0180.03515.77
5.5.230.0060.00611.39
5.5.220.0040.00711.27
5.5.210.0030.00311.27
5.5.200.0040.00811.18
5.5.190.0080.00311.35
5.5.180.0030.01011.18
5.5.170.0030.00611.27
5.5.160.0060.00611.24
5.5.150.0000.01311.18
5.5.140.0030.00711.18
5.5.130.0000.01211.34
5.5.120.0000.00811.27
5.5.110.0070.00311.34
5.5.100.0040.00811.18
5.5.90.0080.00411.34
5.5.80.0060.00311.18
5.5.70.0100.00311.20
5.5.60.0040.01111.18
5.5.50.0000.01111.20
5.5.40.0030.00311.18
5.5.30.0060.00311.18
5.5.20.0030.01011.29
5.5.10.0100.00311.26
5.5.00.0030.00611.18
5.4.450.0410.03115.33
5.4.440.0360.03015.40
5.4.430.0330.03215.51
5.4.420.0060.03115.32
5.4.410.0100.02715.08
5.4.400.0430.03314.99
5.4.390.0280.03515.01
5.4.380.0060.03314.99
5.4.370.0080.01814.93
5.4.360.0070.02315.02
5.4.350.0100.03111.61
5.4.340.0070.02311.60
5.4.330.0000.01111.18
5.4.320.0080.02711.84
5.4.310.0070.03111.84
5.4.300.0080.03911.84
5.4.290.0080.02611.84
5.4.280.0020.03311.79
5.4.270.0060.02711.79
5.4.260.0050.02511.79
5.4.250.0060.02711.79
5.4.240.0070.02311.79
5.4.230.0060.02211.78
5.4.220.0080.02211.78
5.4.210.0070.02811.82
5.4.200.0110.03511.79
5.4.190.0090.02811.82
5.4.180.0100.02411.78
5.4.170.0110.02211.78
5.4.160.0080.02811.79
5.4.150.0050.02911.78
5.4.140.0060.02811.62
5.4.130.0080.02311.62
5.4.120.0090.02511.60
5.4.110.0040.03211.60
5.4.100.0070.02911.60
5.4.90.0060.02711.59
5.4.80.0080.02511.59
5.4.70.0040.03011.59
5.4.60.0060.02411.59
5.4.50.0080.01911.64
5.4.40.0060.02911.59
5.4.30.0090.02411.59
5.4.20.0070.02511.59
5.4.10.0050.02811.63
5.4.00.0040.02311.33
5.3.290.0050.02411.99
5.3.280.0040.02711.94
5.3.270.0050.02811.95
5.3.260.0040.02811.95
5.3.250.0060.02211.95
5.3.240.0080.01911.95
5.3.230.0070.02411.94
5.3.220.0060.02811.93
5.3.210.0050.03111.93
5.3.200.0080.02511.93
5.3.190.0050.03111.93
5.3.180.0080.02611.93
5.3.170.0030.02311.92
5.3.160.0050.02111.92
5.3.150.0040.02411.92
5.3.140.0060.02211.92
5.3.130.0040.02611.92
5.3.120.0070.02211.92
5.3.110.0050.02311.92
5.3.100.0040.02311.65
5.3.90.0050.01911.64
5.3.80.0040.02711.63
5.3.70.0060.02011.63
5.3.60.0090.02011.63
5.3.50.0050.02511.60
5.3.40.0070.02211.60
5.3.30.0100.01611.58
5.3.20.0040.02111.47
5.3.10.0040.02111.45
5.3.00.0060.02011.45
5.2.170.0080.02010.20
5.2.160.0030.02110.20
5.2.150.0020.02510.20
5.2.140.0030.02510.20
5.2.130.0020.01910.18
5.2.120.0090.01610.18
5.2.110.0080.01910.18
5.2.100.0060.02310.17
5.2.90.0050.02210.17
5.2.80.0040.02010.17
5.2.70.0030.02310.17
5.2.60.0050.02110.15
5.2.50.0060.01810.13
5.2.40.0050.01810.13
5.2.30.0040.01910.11
5.2.20.0040.02010.11
5.2.10.0050.02110.06
5.2.00.0080.0209.99
5.1.60.0040.0179.63
5.1.50.0060.0169.63
5.1.40.0050.0219.62
5.1.30.0070.0189.80
5.1.20.0040.0219.80
5.1.10.0070.0189.67
5.1.00.0030.0209.67
5.0.50.0040.0178.91
5.0.40.0060.0158.84
5.0.30.0060.0218.74
5.0.20.0060.0138.72
5.0.10.0040.0168.72
5.0.00.0060.0198.71
4.4.90.0030.0157.98
4.4.80.0030.0147.96
4.4.70.0040.0147.97
4.4.60.0020.0147.96
4.4.50.0040.0137.97
4.4.40.0030.0207.94
4.4.30.0040.0127.97
4.4.20.0040.0128.01
4.4.10.0050.0118.01
4.4.00.0040.0187.97
4.3.110.0020.0137.92
4.3.100.0040.0197.92
4.3.90.0010.0137.91
4.3.80.0010.0197.88
4.3.70.0050.0097.90
4.3.60.0030.0137.90
4.3.50.0030.0127.90
4.3.40.0030.0177.86
4.3.30.0030.0137.24
4.3.20.0030.0147.22
4.3.10.0050.0107.21
4.3.00.0110.0089.55

preferences:
57.56 ms | 400 KiB | 5 Q