3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Convert all dashes/underscores into separator $title = "Convert all dashes/underscores into separator"; $separator = "-"; $flip = $separa;tor == '-' ? '_' : '-'; $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); // 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)); // Replace all separator characters and whitespace by a single separator $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); echo trim($title, $separator);

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.0140.00716.50
8.3.50.0120.00921.15
8.3.40.0140.00318.80
8.3.30.0110.00418.71
8.3.20.0000.00720.29
8.3.10.0040.00423.56
8.3.00.0030.00619.79
8.2.180.0160.00316.75
8.2.170.0070.00722.96
8.2.160.0110.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00317.50
8.2.110.0090.00019.20
8.2.100.0100.00317.93
8.2.90.0070.00019.22
8.2.80.0080.00017.97
8.2.70.0030.00617.60
8.2.60.0040.00417.78
8.2.50.0000.00818.07
8.2.40.0040.00421.17
8.2.30.0030.00320.68
8.2.20.0060.00317.63
8.2.10.0040.00418.11
8.2.00.0050.00217.97
8.1.280.0100.01025.92
8.1.270.0040.00423.79
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.95
8.1.230.0030.00917.76
8.1.220.0030.00517.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00717.35
8.1.180.0110.00018.10
8.1.170.0030.00620.13
8.1.160.0040.00422.02
8.1.150.0040.00418.80
8.1.140.0100.00019.57
8.1.130.0030.00317.70
8.1.120.0040.00417.48
8.1.110.0070.00017.44
8.1.100.0030.00517.41
8.1.90.0000.00717.42
8.1.80.0000.00717.34
8.1.70.0000.00717.34
8.1.60.0060.00317.55
8.1.50.0040.00417.50
8.1.40.0060.00617.41
8.1.30.0030.00617.54
8.1.20.0040.00417.57
8.1.10.0040.00417.54
8.1.00.0000.00717.52
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.49
8.0.270.0050.00316.93
8.0.260.0030.00317.18
8.0.250.0000.00717.06
8.0.240.0000.00816.91
8.0.230.0030.00316.95
8.0.220.0030.00316.82
8.0.210.0030.00317.00
8.0.200.0100.00017.01
8.0.190.0080.00017.06
8.0.180.0040.00416.86
8.0.170.0030.00616.95
8.0.160.0030.00316.97
8.0.150.0000.00717.00
8.0.140.0030.00316.83
8.0.130.0050.00313.44
8.0.120.0000.00816.82
8.0.110.0000.00816.86
8.0.100.0040.00416.75
8.0.90.0000.00817.02
8.0.80.0040.01116.84
8.0.70.0050.00216.92
8.0.60.0040.00416.95
8.0.50.0040.00417.02
8.0.30.0090.01016.96
8.0.20.0070.01117.40
8.0.10.0000.00716.93
8.0.00.0080.01016.93
7.4.330.0050.00015.12
7.4.320.0030.00316.65
7.4.300.0000.00816.89
7.4.290.0030.00316.88
7.4.280.0080.00016.91
7.4.270.0030.00316.88
7.4.260.0030.00316.75
7.4.250.0000.00716.73
7.4.240.0020.00516.89
7.4.230.0000.00716.81
7.4.220.0060.01216.72
7.4.210.0040.01116.91
7.4.200.0050.00216.99
7.4.160.0080.00816.84
7.4.150.0000.01717.40
7.4.140.0120.01117.86
7.4.130.0110.00716.98
7.4.120.0060.01116.70
7.4.110.0060.01616.78
7.4.100.0100.01016.69
7.4.90.0060.01516.77
7.4.80.0160.00319.39
7.4.70.0060.01216.70
7.4.60.0070.01016.83
7.4.50.0090.00016.48
7.4.40.0170.00016.89
7.4.30.0090.00916.71
7.4.10.0080.01115.14
7.4.00.0080.00615.09
7.3.330.0030.00313.39
7.3.320.0030.00313.44
7.3.310.0040.00416.67
7.3.300.0060.00016.64
7.3.290.0070.01016.54
7.3.280.0080.00916.59
7.3.270.0130.01017.40
7.3.260.0150.00816.55
7.3.240.0150.00916.63
7.3.230.0040.01816.49
7.3.210.0100.00716.49
7.3.200.0120.00616.74
7.3.190.0040.01216.43
7.3.180.0130.00316.56
7.3.170.0090.00616.76
7.3.160.0030.01416.64
7.3.130.0060.01215.17
7.3.120.0050.01115.09
7.3.110.0060.00914.78
7.3.100.0070.00914.92
7.3.90.0030.01315.09
7.3.80.0080.00615.12
7.3.70.0090.00515.07
7.3.60.0080.00815.03
7.3.50.0050.01114.96
7.3.40.0060.00614.93
7.3.30.0090.00615.15
7.3.20.0050.01116.78
7.3.10.0040.01316.79
7.3.00.0090.00616.90
7.2.330.0140.00416.83
7.2.320.0060.01217.01
7.2.310.0040.01216.95
7.2.300.0080.00816.93
7.2.290.0100.01416.93
7.2.260.0060.01015.20
7.2.250.0100.00815.25
7.2.240.0050.01115.33
7.2.230.0100.00815.19
7.2.220.0070.01215.47
7.2.210.0020.01315.23
7.2.200.0070.00515.32
7.2.190.0050.01115.28
7.2.180.0080.00515.17
7.2.170.0050.00815.25
7.2.160.0060.00915.21
7.2.150.0060.00917.18
7.2.140.0060.01117.12
7.2.130.0080.00617.09
7.2.120.0080.00816.98
7.2.110.0050.01216.97
7.2.100.0100.00617.21
7.2.90.0100.00516.99
7.2.80.0070.00717.17
7.2.70.0050.01217.07
7.2.60.0090.00417.08
7.2.50.0070.00817.20
7.2.40.0100.00417.13
7.2.30.0110.00616.97
7.2.20.0080.01017.21
7.2.10.0040.01017.01
7.2.00.0050.01017.94
7.1.330.0070.00715.96
7.1.320.0050.00916.02
7.1.310.0070.00815.78
7.1.300.0060.00815.83
7.1.290.0020.01016.08
7.1.280.0050.00815.76
7.1.270.0050.00915.83
7.1.260.0030.01316.07
7.1.250.0080.00315.74
7.1.240.0070.00915.82
7.1.230.0030.01015.82
7.1.220.0070.00815.76
7.1.210.0060.00615.92
7.1.200.0080.00515.92
7.1.190.0050.00715.99
7.1.180.0080.00615.84
7.1.170.0050.00915.89
7.1.160.0080.00815.88
7.1.150.0050.00816.03
7.1.140.0040.01115.90
7.1.130.0080.00816.00
7.1.120.0050.00815.99
7.1.110.0020.01015.93
7.1.100.0020.01116.79
7.1.90.0030.00815.80
7.1.80.0050.00716.06
7.1.70.0070.00816.35
7.1.60.0070.00817.10
7.1.50.0070.00916.28
7.1.40.0020.01415.86
7.1.30.0070.00615.92
7.1.20.0040.00415.92
7.1.10.0080.00515.87
7.1.00.0050.02918.09
7.0.330.0100.00315.52
7.0.320.0050.00715.55
7.0.310.0000.01115.51
7.0.300.0030.00815.53
7.0.290.0070.00915.56
7.0.280.0040.00515.47
7.0.270.0050.01115.51
7.0.260.0030.00915.35
7.0.250.0030.01015.51
7.0.240.0050.00815.55
7.0.230.0030.01015.51
7.0.220.0020.01115.71
7.0.210.0040.00715.47
7.0.200.0060.00916.05
7.0.190.0080.00515.56
7.0.180.0070.00615.43
7.0.170.0070.00515.69
7.0.160.0030.00915.50
7.0.150.0060.00815.47
7.0.140.0000.01015.65
7.0.130.0090.00415.44
7.0.120.0080.00715.44
7.0.110.0040.00615.68
7.0.100.0060.00615.67
7.0.90.0000.01315.63
7.0.80.0040.00715.70
7.0.70.0030.01015.57
7.0.60.0080.02817.05
7.0.50.0050.02416.42
7.0.40.0070.03115.87
7.0.30.0180.02815.81
7.0.20.0140.01315.74
7.0.10.0060.03215.92
7.0.00.0040.03615.80
5.6.400.0030.01014.31
5.6.390.0110.00514.66
5.6.380.0030.01014.55
5.6.370.0020.01214.26
5.6.360.0090.00314.44
5.6.350.0060.00814.31
5.6.340.0040.01114.52
5.6.330.0080.00414.25
5.6.320.0090.00614.33
5.6.310.0060.00614.34
5.6.300.0030.01114.49
5.6.290.0040.00714.67
5.6.280.0080.01316.61
5.6.270.0050.00914.53
5.6.260.0070.00314.39
5.6.250.0060.00414.32
5.6.240.0030.00814.44
5.6.230.0030.00814.52
5.6.220.0050.01014.32
5.6.210.0040.02816.43
5.6.200.0050.02115.69
5.6.190.0050.02016.34
5.6.180.0150.03016.41
5.6.170.0130.03216.37
5.6.160.0070.01916.43
5.6.150.0040.03415.74
5.6.140.0070.02315.56
5.6.130.0100.02915.63
5.6.120.0070.02416.54
5.6.110.0070.02916.60
5.6.100.0080.01316.70
5.6.90.0080.03216.65
5.6.80.0050.01616.34
5.6.70.0000.01314.44
5.6.60.0030.00814.28
5.6.50.0050.00914.28
5.6.40.0050.00614.22
5.6.30.0050.00614.37
5.6.20.0040.00714.20
5.6.10.0060.00914.51
5.6.00.0050.00814.43
5.5.380.0070.00714.50
5.5.370.0030.01014.44
5.5.360.0050.00714.46
5.5.350.0030.03116.46
5.5.340.0070.02915.51
5.5.330.0070.02716.22
5.5.320.1240.01916.53
5.5.310.0150.02216.45
5.5.300.0060.03115.70
5.5.290.0050.03315.51
5.5.280.0000.02216.61
5.5.270.0060.02716.50
5.5.260.0090.03116.40
5.5.250.0040.03316.55
5.5.240.0020.03116.34
5.5.230.0070.00514.51
5.5.220.0060.00814.48
5.5.210.0040.00714.23
5.5.200.0040.00914.46
5.5.190.0020.01014.23
5.5.180.0030.00814.48
5.5.170.0030.00914.45
5.5.160.0090.00414.25
5.5.150.0040.00714.34
5.5.140.0050.00814.43
5.5.130.0050.00714.21
5.5.120.0100.00314.41
5.5.110.0090.00414.39
5.5.100.0060.00514.22
5.5.90.0050.00514.27
5.5.80.0070.00714.19
5.5.70.0020.01314.13
5.5.60.0080.00514.17
5.5.50.0060.00814.27
5.5.40.0040.00714.42
5.5.30.0080.00614.35
5.5.20.0030.01114.42
5.5.10.0080.00514.62
5.5.00.0080.00514.25
5.4.450.0120.02313.71
5.4.440.0150.02913.89
5.4.430.0080.02813.91
5.4.420.0130.02213.83
5.4.410.0120.02313.87
5.4.400.0130.02513.86
5.4.390.0100.02613.82
5.4.380.0130.02213.78
5.4.370.0160.02013.66
5.4.360.0170.02413.74
5.4.350.0180.02213.88
5.4.340.0130.02313.87
5.4.330.0030.00811.21
5.4.320.0140.02313.86
5.4.310.0110.02013.80
5.4.300.0090.02513.75
5.4.290.0160.02013.87
5.4.280.0170.02913.81
5.4.270.0140.02013.82
5.4.260.0160.01713.52
5.4.250.0160.02113.76
5.4.240.0160.02013.64
5.4.230.0160.02213.79
5.4.220.0150.02313.80
5.4.210.0180.01813.79
5.4.200.0120.02613.66
5.4.190.0130.03213.88
5.4.180.0130.02413.75
5.4.170.0090.02313.76
5.4.160.0470.02513.68
5.4.150.0330.02413.59
5.4.140.0370.02412.82
5.4.130.0410.02812.87
5.4.120.0340.02012.89
5.4.110.0330.02412.82
5.4.100.0370.02312.80
5.4.90.0330.01912.81
5.4.80.0340.02112.99
5.4.70.0350.02712.84
5.4.60.0340.02112.91
5.4.50.0370.02312.76
5.4.40.0340.02312.81
5.4.30.0330.02012.93
5.4.20.0310.02012.72
5.4.10.0330.02612.89
5.4.00.0360.02012.71

preferences:
61.75 ms | 401 KiB | 5 Q