3v4l.org

run code in 300+ PHP versions simultaneously
<?php function clean($string) { $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. $string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. return strtolower(preg_replace('/-+/', '-', $string)); // Replaces multiple hyphens with single one. } echo clean("Title - Of The Page");

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.0180.00416.75
8.3.50.0070.00718.19
8.3.40.0180.00018.76
8.3.30.0150.00418.62
8.3.20.0090.00620.34
8.3.10.0040.00420.34
8.3.00.0050.00223.47
8.2.180.0060.00916.63
8.2.170.0040.01222.96
8.2.160.0070.00720.26
8.2.150.0000.00725.66
8.2.140.0030.00524.66
8.2.130.0070.00020.38
8.2.120.0070.00026.35
8.2.110.0100.00520.65
8.2.100.0070.00919.42
8.2.90.0180.00318.52
8.2.80.0100.01018.32
8.2.70.0160.00518.40
8.2.60.0120.00518.53
8.2.50.0050.00519.09
8.2.40.0100.00220.53
8.2.30.0070.00418.94
8.2.20.0090.00318.44
8.2.10.0080.00318.49
8.2.00.0090.00618.57
8.1.280.0110.00725.92
8.1.270.0150.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00420.44
8.1.230.0210.00319.68
8.1.220.0110.00618.15
8.1.210.0040.00819.40
8.1.200.0070.00517.88
8.1.190.0100.00118.61
8.1.180.0180.00518.22
8.1.170.0100.00118.50
8.1.160.0070.00318.72
8.1.150.0060.00320.36
8.1.140.0060.00618.03
8.1.130.0050.00618.90
8.1.120.0060.00418.05
8.1.110.0060.00418.58
8.1.100.0140.00618.08
8.1.90.0130.00618.02
8.1.80.0130.00618.00
8.1.70.0100.00718.12
8.1.60.0150.00518.26
8.1.50.0160.00518.25
8.1.40.0090.00918.19
8.1.30.0130.00418.36
8.1.20.0150.00518.33
8.1.10.0120.00518.21
8.1.00.0100.00618.07
8.0.300.0140.00318.90
8.0.290.0120.00917.39
8.0.280.0140.00418.20
8.0.270.0170.00317.51
8.0.260.0080.00718.44
8.0.250.0130.00717.60
8.0.240.0140.00717.52
8.0.230.0080.01017.55
8.0.220.0140.00417.48
8.0.210.0090.00717.44
8.0.200.0170.00317.40
8.0.190.0110.00817.61
8.0.180.0120.00817.43
8.0.170.0140.00317.33
8.0.160.0140.00517.38
8.0.150.0190.00217.28
8.0.140.0120.00817.38
8.0.130.0120.00415.74
8.0.120.0150.00517.43
8.0.110.0090.00717.59
8.0.100.0170.00417.43
8.0.90.0170.00517.30
8.0.80.0140.01117.40
8.0.70.0120.00517.32
8.0.60.0080.00617.45
8.0.50.0080.00317.34
8.0.30.0120.00517.75
8.0.20.0090.00917.54
8.0.10.0130.00417.52
8.0.00.0060.00920.22
7.4.330.0070.00615.92
7.4.320.0070.00417.30
7.4.300.0040.00718.13
7.4.290.0040.00418.18
7.4.280.0090.00117.22
7.4.270.0120.00018.11
7.4.260.0090.00617.00
7.4.250.0070.00317.28
7.4.240.0040.00617.04
7.4.230.0050.00617.29
7.4.220.0070.00618.12
7.4.210.0060.00717.19
7.4.200.0060.00318.27
7.4.190.0100.00317.75
7.4.180.0110.00017.86
7.4.160.0070.00617.79
7.4.150.0100.00718.47
7.4.140.0100.00918.21
7.4.130.0110.00617.17
7.4.120.0130.00616.91
7.4.110.0130.00717.11
7.4.100.0180.00917.07
7.4.90.0130.01217.20
7.4.80.0110.01218.49
7.4.70.0160.00817.14
7.4.60.0170.00717.31
7.4.50.0190.00517.10
7.4.40.0120.01617.06
7.4.30.0180.00717.25
7.4.20.0300.00617.65
7.4.10.0270.00617.65
7.4.00.0110.00117.49
7.3.330.0100.00015.40
7.3.320.0110.00015.42
7.3.310.0110.00116.74
7.3.300.0130.00216.68
7.3.290.0110.00416.58
7.3.280.0100.00916.59
7.3.270.0160.00117.44
7.3.260.0130.00716.82
7.3.250.0140.00716.77
7.3.240.0090.01016.76
7.3.230.0190.00616.86
7.3.220.0190.00917.18
7.3.210.0200.00716.86
7.3.200.0180.01016.89
7.3.190.0150.00916.88
7.3.180.0230.00816.81
7.3.170.0150.01316.83
7.3.160.0120.00616.79
7.3.150.0170.00017.11
7.3.140.0100.01017.35
7.3.130.0150.00917.24
7.3.120.0300.00817.30
7.3.110.0320.00317.08
7.3.100.0280.00617.00
7.3.90.0310.00317.82
7.3.80.0240.00517.32
7.3.70.0300.00517.62
7.3.60.0320.00317.50
7.3.50.0230.01317.40
7.3.40.0220.01417.46
7.3.30.0320.00417.54
7.3.20.0340.00319.09
7.3.10.0310.01019.07
7.3.00.0350.00717.03
7.2.340.0150.00617.45
7.2.330.0100.00817.08
7.2.320.0080.00917.03
7.2.310.0100.00717.00
7.2.300.0080.00917.06
7.2.290.0090.00817.04
7.2.280.0130.00317.75
7.2.270.0130.00317.60
7.2.260.0180.00517.50
7.2.250.0320.00317.25
7.2.240.0350.00017.49
7.2.230.0300.00717.41
7.2.220.0250.00917.56
7.2.210.0200.01417.61
7.2.200.0240.01217.65
7.2.190.0320.00317.62
7.2.180.0250.00617.67
7.2.170.0200.00317.84
7.2.160.0200.00317.51
7.2.150.0070.00721.38
7.2.140.0180.00019.51
7.2.130.0190.00617.43
7.2.120.0250.00317.43
7.2.110.0270.00317.35
7.2.100.0300.00917.35
7.2.90.0190.00817.31
7.2.80.0200.00317.41
7.2.70.0230.00317.28
7.2.60.0240.00217.07
7.2.50.0310.00317.39
7.2.40.0200.00517.29
7.2.30.0230.00317.43
7.2.20.0220.00517.31
7.2.10.0190.00417.97
7.2.00.0280.00717.30
7.1.330.0070.00018.37
7.1.320.0110.00418.34
7.1.310.0090.00518.32
7.1.300.0140.00018.36
7.1.290.0120.00318.27
7.1.280.0110.00418.30
7.1.270.0120.00218.20
7.1.260.0140.00018.24
7.1.250.0210.00416.28
7.1.240.0170.00916.22
7.1.230.0270.00616.10
7.1.220.0250.00716.20
7.1.210.0420.00616.05
7.1.200.0130.00915.94
7.1.190.0210.00616.14
7.1.180.0170.00515.87
7.1.170.0250.00516.71
7.1.160.0230.00316.01
7.1.150.0220.00716.08
7.1.140.0220.00615.84
7.1.130.0280.00416.14
7.1.120.0180.01016.11
7.1.110.0190.00416.15
7.1.100.0220.00516.21
7.1.90.0270.00516.33
7.1.80.1050.00816.25
7.1.70.0430.00515.72
7.1.60.0180.01022.06
7.1.50.0250.01021.80
7.1.40.0250.00721.75
7.1.30.0230.01021.79
7.1.20.1080.01121.78
7.1.10.0260.00615.78
7.1.00.0200.01115.90
7.0.330.0190.00315.80
7.0.320.0180.00616.02
7.0.310.0220.00315.65
7.0.300.0230.00815.73
7.0.290.0230.00915.84
7.0.280.0370.00215.72
7.0.270.0280.00415.57
7.0.260.0240.00615.74
7.0.250.0240.00515.87
7.0.240.0210.00815.90
7.0.230.0270.00615.93
7.0.220.1260.00516.06
7.0.210.0240.00416.04
7.0.200.0440.00315.70
7.0.190.0200.00615.64
7.0.180.0340.00915.51
7.0.170.0230.00615.51
7.0.160.0210.00815.40
7.0.150.0300.00815.47
7.0.140.0240.00915.44
7.0.130.0250.00715.57
7.0.120.1090.00415.57
7.0.110.0200.00915.39
7.0.100.0240.00715.46
7.0.90.0400.01015.52
7.0.80.0250.00715.45
7.0.70.0210.00415.44
7.0.60.0200.00415.33
7.0.50.0980.00215.38
7.0.40.0400.00715.45
7.0.30.0380.00715.47
7.0.20.0960.00715.48
7.0.10.0330.00815.63
7.0.00.0220.00515.41
5.6.400.0090.00516.81
5.6.390.0140.00016.82
5.6.380.0090.00415.46
5.6.370.0120.00515.57
5.6.360.0150.00215.51
5.6.350.0120.00715.48
5.6.340.0110.00615.41
5.6.330.0120.00315.47
5.6.320.0070.00715.77
5.6.310.0040.01015.66
5.6.300.0080.03217.32
5.6.290.0100.02917.37
5.6.280.0120.02517.45
5.6.270.0120.02417.48
5.6.260.0110.02317.26
5.6.250.0080.02417.26
5.6.240.0100.02317.33
5.6.230.0030.03017.38
5.6.220.0120.02317.49
5.6.210.0130.02117.38
5.6.200.0130.02217.41
5.6.190.0090.02417.38
5.6.180.0100.02317.24
5.6.170.0090.02417.34
5.6.160.0140.02117.44
5.6.150.0110.02917.32
5.6.140.0120.03217.34
5.6.130.0140.02117.45
5.6.120.0090.02617.37
5.6.110.0120.02317.23
5.6.100.0110.02117.42
5.6.90.0090.02417.32
5.6.80.0080.02817.02
5.6.70.0150.01917.10
5.6.60.0070.02617.19
5.6.50.0130.02017.13
5.6.40.0130.02717.08
5.6.30.0070.02717.09
5.6.20.0130.02017.06
5.6.10.0100.02117.02
5.6.00.0100.02316.96

preferences:
45.48 ms | 400 KiB | 5 Q