3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = utf8_encode("á|â|à|å|ä ð|é|ê|è|ë í|î|ì|ï ó|ô|ò|ø|õ|ö ú|û|ù|ü æ ç ß abc ABC 123"); echo iconv('UTF-8','us-ascii//TRANSLIT//IGNORE',$val); function slugify($text) { // replace non letter or digits by - $text = preg_replace('#[^\\pL\d]+#u', '-', $text); // trim $text = trim($text, '-'); // transliterate if (function_exists('iconv')) { $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; } echo slugify(utf8_encode('é')); // --> "e"

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.0120.00918.77
8.3.50.0120.00721.28
8.3.40.0140.00419.09
8.3.30.0090.00619.10
8.3.20.0040.00420.34
8.3.10.0060.00321.81
8.3.00.0030.00519.63
8.2.180.0140.00717.13
8.2.170.0070.00722.96
8.2.160.0100.00320.53
8.2.150.0090.00024.18
8.2.140.0110.00424.66
8.2.130.0000.00826.16
8.2.120.0060.00317.88
8.2.110.0060.00320.50
8.2.100.0030.00917.88
8.2.90.0080.00019.17
8.2.80.0110.00017.97
8.2.70.0080.00017.75
8.2.60.0030.00617.93
8.2.50.0030.00818.07
8.2.40.0000.00821.30
8.2.30.0000.00819.82
8.2.20.0050.00218.05
8.2.10.0000.00718.11
8.2.00.0000.00818.10
8.1.280.0070.01025.92
8.1.270.0060.00320.18
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00624.01
8.1.230.0040.00817.61
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0090.00017.35
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0000.00818.61
8.1.160.0050.00221.92
8.1.150.0000.00818.99
8.1.140.0000.00817.54
8.1.130.0030.00317.79
8.1.120.0040.00417.57
8.1.110.0070.00317.58
8.1.100.0000.00717.46
8.1.90.0080.00317.57
8.1.80.0060.00317.55
8.1.70.0030.00317.54
8.1.60.0040.00417.82
8.1.50.0060.00317.69
8.1.40.0030.00517.56
8.1.30.0100.00017.71
8.1.20.0000.00817.91
8.1.10.0040.00417.71
8.1.00.0080.00017.59
8.0.300.0000.00718.77
8.0.290.0070.00017.00
8.0.280.0000.00718.41
8.0.270.0070.00017.29
8.0.260.0000.00617.25
8.0.250.0040.00417.08
8.0.240.0070.00017.22
8.0.230.0040.00417.01
8.0.220.0030.00317.02
8.0.210.0030.00317.03
8.0.200.0000.00617.03
8.0.190.0050.00317.00
8.0.180.0040.00417.08
8.0.170.0040.00416.98
8.0.160.0030.00316.96
8.0.150.0040.00417.08
8.0.140.0070.00016.84
8.0.130.0000.00613.41
8.0.120.0060.00317.21
8.0.110.0030.00617.25
8.0.100.0030.00617.23
8.0.90.0000.00817.11
8.0.80.0090.01217.28
8.0.70.0030.00617.32
8.0.60.0030.00617.22
8.0.50.0060.00317.22
8.0.30.0090.01217.33
8.0.20.0090.01217.45
8.0.10.0060.00317.25
8.0.00.0090.01117.09
7.4.330.0060.00015.08
7.4.320.0000.00616.75
7.4.300.0030.00316.70
7.4.290.0000.00816.86
7.4.280.0000.00716.83
7.4.270.0000.00716.80
7.4.260.0070.00316.90
7.4.250.0000.00916.79
7.4.240.0010.00716.94
7.4.230.0050.00317.10
7.4.220.0140.01416.94
7.4.210.0080.00816.99
7.4.200.0030.00616.96
7.4.160.0070.01116.97
7.4.150.0160.00317.40
7.4.140.0120.01617.86
7.4.130.0120.01216.76
7.4.120.0090.01016.91
7.4.110.0070.01116.96
7.4.100.0030.01616.80
7.4.90.0000.01917.02
7.4.80.0090.00919.39
7.4.70.0160.01116.82
7.4.60.0140.00716.80
7.4.50.0060.01216.83
7.4.40.0090.01016.72
7.4.30.0040.01816.65
7.4.20.0160.00416.58
7.4.10.0130.00816.38
7.4.00.0080.00916.03
7.3.330.0030.00313.18
7.3.320.0030.00313.14
7.3.310.0040.00416.60
7.3.300.0050.00316.47
7.3.290.0110.01016.58
7.3.280.0140.01016.59
7.3.270.0090.01217.40
7.3.260.0100.01416.51
7.3.250.0110.00816.67
7.3.240.0090.01616.57
7.3.230.0120.01416.48
7.3.210.0130.00716.69
7.3.200.0100.01016.70
7.3.190.0170.00816.62
7.3.180.0110.00916.80
7.3.170.0080.01116.68
7.3.160.0120.00816.75
7.3.150.0190.00016.61
7.3.140.0160.00616.60
7.3.130.0140.00916.64
7.3.120.0060.01416.75
7.3.110.0210.00016.65
7.3.100.0100.01616.97
7.3.90.0210.01116.70
7.3.80.0190.00616.66
7.3.70.0140.01116.50
7.3.60.0220.00716.58
7.3.50.0090.01416.74
7.3.40.0130.01616.66
7.3.30.0050.02416.49
7.3.20.0100.01316.51
7.3.10.0070.01516.76
7.3.00.0100.01216.57
7.2.330.0160.01216.95
7.2.320.0120.01017.01
7.2.310.0100.01016.98
7.2.300.0110.01216.72
7.2.290.0080.01016.83
7.2.280.0150.00616.87
7.2.270.0170.00516.82
7.2.260.0080.01216.91
7.2.250.0100.01016.93
7.2.240.0090.01416.64
7.2.230.0210.01417.07
7.2.220.0180.01216.87
7.2.210.0090.01817.00
7.2.200.0190.00716.89
7.2.190.0110.01416.51
7.2.180.0130.01316.86
7.2.170.0070.01716.70
7.2.160.0120.01816.62
7.2.150.0160.01216.84
7.2.140.0160.01416.59
7.2.130.0130.01116.92
7.2.120.0180.00616.80
7.2.110.0090.01716.98
7.2.100.0120.01416.74
7.2.90.0160.01216.87
7.2.80.0130.01516.92
7.2.70.0130.01216.89
7.2.60.0180.00617.03
7.2.50.0250.01816.74
7.2.40.0160.01016.89
7.2.30.0050.02116.67
7.2.20.0100.01316.67
7.2.10.0090.01316.85
7.2.00.0140.00516.96
7.1.330.0240.00816.05
7.1.320.0240.01715.80
7.1.310.0220.01616.04
7.1.300.0250.01115.83
7.1.290.0140.01815.86
7.1.280.0240.01315.75
7.1.270.0240.01515.82
7.1.260.1090.01515.87
7.1.250.0220.00615.83
7.1.240.0260.00915.82
7.1.230.0230.01215.84
7.1.220.0200.01615.94
7.1.210.0210.01515.80
7.1.200.0140.01115.87
7.1.190.0310.01015.94
7.1.180.0270.01315.56
7.1.170.0240.01415.77
7.1.160.0190.01915.82
7.1.150.0240.01415.76
7.1.140.0140.01715.82
7.1.130.0250.01115.88
7.1.120.0240.00815.82
7.1.110.0170.02015.91
7.1.100.0430.01115.91
7.1.90.0260.00715.68
7.1.80.0230.01415.80
7.1.70.0110.01216.63
7.1.60.0190.01017.96
7.1.50.0210.00616.54
7.1.40.0260.00815.78
7.1.30.0200.01315.92
7.1.20.0240.00815.69
7.1.10.0220.00715.83
7.1.00.0070.04919.26
7.0.330.0220.01615.59
7.0.320.0190.01115.58
7.0.310.0220.01415.67
7.0.300.0300.00015.39
7.0.290.0240.01015.59
7.0.280.0190.01315.36
7.0.270.0210.00915.60
7.0.260.0220.00815.59
7.0.250.0180.01115.55
7.0.240.0160.01615.51
7.0.230.0290.00415.49
7.0.220.0120.01715.48
7.0.210.0170.01315.44
7.0.200.0120.00516.36
7.0.190.0220.01515.64
7.0.180.0220.00815.46
7.0.170.0170.01415.47
7.0.160.0220.00515.64
7.0.150.0170.01315.61
7.0.140.0220.00815.51
7.0.130.0190.00915.57
7.0.120.0170.01115.49
7.0.110.0250.00615.67
7.0.100.0180.01215.49
7.0.90.0260.00315.57
7.0.80.0580.01017.41
7.0.70.0160.01215.61
7.0.60.0090.02617.68
7.0.50.0140.04516.71
7.0.40.0140.02717.98
7.0.30.0220.04417.98
7.0.20.0270.03617.99
7.0.10.0190.02617.86
7.0.00.0230.03717.88
5.6.400.0270.01216.23
5.6.390.0170.02216.26
5.6.380.0190.01115.91
5.6.370.0210.01815.95
5.6.360.0160.01616.32
5.6.350.0280.00916.42
5.6.340.0250.01316.44
5.6.330.0130.01716.25
5.6.320.0140.01616.29
5.6.310.0260.00915.98
5.6.300.0230.01016.48
5.6.290.0170.01416.00
5.6.280.0140.04118.68
5.6.270.0210.01116.20
5.6.260.0190.01015.82
5.6.250.0150.01316.33
5.6.240.0190.01116.11
5.6.230.0230.00816.25
5.6.220.0180.01416.29
5.6.210.0130.03518.29
5.6.200.0070.03317.27
5.6.190.0120.04818.43
5.6.180.0100.03218.45
5.6.170.0280.03518.40
5.6.160.0120.03418.36
5.6.150.0130.04917.27
5.6.140.0090.02817.26
5.6.130.0150.04917.32
5.6.120.0110.04118.51
5.6.110.0120.04018.72
5.6.100.0150.02618.70
5.6.90.0130.03318.78
5.6.80.0150.04918.23
5.6.70.0150.01416.14
5.6.60.0140.01416.14
5.6.50.0160.01216.22
5.6.40.0150.01516.02
5.6.30.0230.01016.05
5.6.20.0260.01316.11
5.6.10.0170.01315.91
5.6.00.0210.01116.14
5.5.380.0140.02115.98
5.5.370.0240.00716.04
5.5.360.0180.01115.97
5.5.350.0130.04418.10
5.5.340.0050.03217.21
5.5.330.0190.04818.15
5.5.320.0180.04118.26
5.5.310.0200.03218.31
5.5.300.0120.05017.13
5.5.290.0170.02917.07
5.5.280.0150.03418.60
5.5.270.0200.04418.50
5.5.260.0160.03518.64
5.5.250.0190.02818.38
5.5.240.0230.02518.05
5.5.230.0110.01915.94
5.5.220.0260.00315.92
5.5.210.0180.01115.87
5.5.200.0160.01315.89
5.5.190.0190.01316.10
5.5.180.0260.00615.93
5.5.170.0200.01115.97
5.5.160.0190.01515.96
5.5.150.0110.02516.02
5.5.140.0260.00916.07
5.5.130.0270.00616.09
5.5.120.0150.01516.21
5.5.110.0160.01315.84
5.5.100.0210.00916.07
5.5.90.0230.01516.00
5.5.80.0240.01015.93
5.5.70.0270.01016.11
5.5.60.0140.01815.88
5.5.50.0240.00616.14
5.5.40.0240.00616.00
5.5.30.0180.01116.02
5.5.20.0210.01116.05
5.5.10.0140.01415.94
5.5.00.0160.01315.91
5.4.450.0470.03216.20
5.4.440.0440.03516.01
5.4.430.0460.03016.10
5.4.420.0440.03116.03
5.4.410.0390.03716.05
5.4.400.0430.02915.88
5.4.390.0460.03515.86
5.4.380.0450.03115.85
5.4.370.0440.02915.91
5.4.360.0570.03615.93
5.4.350.0460.03215.91
5.4.340.0440.03215.99
5.4.330.0190.00512.54
5.4.320.0490.02715.92
5.4.310.0510.03415.78
5.4.300.0450.03215.89
5.4.290.0430.03315.88
5.4.280.0390.03315.82
5.4.270.0440.03315.79
5.4.260.0500.03215.87
5.4.250.0470.03415.93
5.4.240.0530.04215.80
5.4.230.0450.03315.68
5.4.220.0490.02915.93
5.4.210.0430.03315.89
5.4.200.0400.03714.75
5.4.190.0420.02515.72
5.4.180.0430.03016.00
5.4.170.0410.03315.91
5.4.160.0460.02915.83
5.4.150.0480.02515.90
5.4.140.0520.03114.64
5.4.130.0430.03214.57
5.4.120.0470.02514.62
5.4.110.0390.02514.52
5.4.100.0430.02814.62
5.4.90.0400.03014.61
5.4.80.0500.02714.63
5.4.70.0450.02914.63
5.4.60.0350.03214.51
5.4.50.0450.02814.56
5.4.40.0490.03314.54
5.4.30.0460.02414.54
5.4.20.0420.03014.67
5.4.10.0470.02514.58
5.4.00.0450.02814.24

preferences:
60.31 ms | 401 KiB | 5 Q