3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'SiteContentManagement'; echo strtolower(preg_replace('~(?!^)(?=[A-Z])~', '-', $string)); echo "\n"; echo strtolower(preg_replace('~(?!^)[A-Z]~', '-$0', $string)); echo "\n"; echo strtolower(preg_replace('~[^A-Z]+\K(?=[A-Z])~', '-', $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.4.140.0150.00817.52
8.4.130.0120.00820.46
8.4.120.0140.00524.08
8.4.110.0090.00718.82
8.4.100.0150.00617.79
8.4.90.0050.00424.20
8.4.80.0040.00418.83
8.4.70.0050.00318.27
8.4.60.0070.00418.86
8.4.50.0070.00218.99
8.4.40.0100.01019.54
8.4.30.0110.00720.27
8.4.20.0160.00620.50
8.4.10.0110.01119.75
8.3.270.0100.01016.73
8.3.260.0120.00816.77
8.3.250.0100.00918.59
8.3.240.0130.00617.13
8.3.230.0130.00616.71
8.3.220.0130.00618.64
8.3.210.0050.00316.86
8.3.200.0070.00516.75
8.3.190.0030.00517.07
8.3.180.0130.00617.00
8.3.170.0120.00620.45
8.3.160.0060.01316.92
8.3.150.0130.00617.19
8.3.140.0080.00017.13
8.3.130.0080.00818.45
8.3.120.0040.00418.71
8.3.110.0160.00316.73
8.3.100.0090.00020.37
8.3.90.0120.00618.24
8.3.80.0030.00618.30
8.3.70.0110.00418.68
8.3.60.0200.00718.56
8.3.50.0140.00517.53
8.3.40.0030.01218.98
8.3.30.0150.00018.97
8.3.20.0080.00021.80
8.3.10.0030.00520.00
8.3.00.0000.00821.77
8.2.290.0050.00320.60
8.2.280.0120.00918.21
8.2.270.0070.01017.13
8.2.260.0090.00618.74
8.2.250.0050.00319.04
8.2.240.0070.00717.21
8.2.230.0040.00420.94
8.2.220.0030.00524.06
8.2.210.0040.00426.77
8.2.200.0060.00318.18
8.2.190.0100.01016.63
8.2.180.0060.01216.63
8.2.170.0000.01422.96
8.2.160.0130.00320.18
8.2.150.0070.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00819.77
8.2.120.0050.00326.35
8.2.110.0060.00621.31
8.2.100.0040.00818.03
8.2.90.0060.00318.16
8.2.80.0030.00617.97
8.2.70.0000.00817.80
8.2.60.0000.00918.09
8.2.50.0000.00918.10
8.2.40.0060.00319.30
8.2.30.0040.00420.51
8.2.20.0040.00718.01
8.2.10.0000.00719.15
8.2.00.0040.00417.95
8.1.330.0090.01021.64
8.1.320.0140.00516.40
8.1.310.0060.00316.46
8.1.300.0030.01618.53
8.1.290.0060.00318.88
8.1.280.0100.00625.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0110.00320.55
8.1.230.0040.00820.88
8.1.220.0000.00817.74
8.1.210.0000.00818.91
8.1.200.0000.00817.35
8.1.190.0000.00817.23
8.1.180.0090.00018.10
8.1.170.0000.00818.84
8.1.160.0050.00218.82
8.1.150.0000.00718.84
8.1.140.0040.00418.75
8.1.130.0040.00417.39
8.1.120.0040.00417.55
8.1.110.0000.00817.45
8.1.100.0060.00317.49
8.1.90.0070.00317.52
8.1.80.0040.00417.60
8.1.70.0000.00717.52
8.1.60.0000.00817.63
8.1.50.0000.00817.64
8.1.40.0030.00617.64
8.1.30.0090.00017.77
8.1.20.0060.00317.72
8.1.10.0000.00717.63
8.1.00.0040.00417.48
8.0.300.0040.00419.98
8.0.290.0040.00417.00
8.0.280.0000.00818.37
8.0.270.0040.00417.34
8.0.260.0040.00416.96
8.0.250.0040.00417.05
8.0.240.0000.01017.13
8.0.230.0030.00317.07
8.0.220.0070.00416.94
8.0.210.0030.00517.08
8.0.200.0070.00017.08
8.0.190.0000.00717.09
8.0.180.0040.00416.93
8.0.170.0040.00416.93
8.0.160.0040.00417.02
8.0.150.0070.00016.99
8.0.140.0040.00417.01
8.0.130.0000.00613.41
8.0.120.0050.00316.96
8.0.110.0000.00716.84
8.0.100.0040.00416.97
8.0.90.0000.00716.81
8.0.80.0050.01116.96
8.0.70.0000.01916.98
8.0.60.0060.01316.99
8.0.50.0120.00316.93
8.0.30.0100.00717.26
8.0.20.0070.01217.08
8.0.10.0090.00616.99
8.0.00.0100.00916.80
7.4.330.0000.00415.55
7.4.320.0030.00316.63
7.4.300.0030.00316.64
7.4.290.0040.00416.54
7.4.280.0000.00916.71
7.4.270.0000.00716.59
7.4.260.0000.00816.58
7.4.250.0040.00416.50
7.4.240.0000.00816.79
7.4.230.0070.00016.55
7.4.220.0020.00516.39
7.4.210.0070.01116.70
7.4.200.0080.00616.82
7.4.190.0060.01016.74
7.4.180.0030.01016.68
7.4.160.0070.01016.64
7.4.150.0030.01316.72
7.4.140.0120.00717.21
7.4.130.0090.01016.71
7.4.120.0110.00916.69
7.4.110.0040.01316.65
7.4.100.0040.01216.60
7.4.90.0130.00616.63
7.4.80.0080.01217.98
7.4.70.0090.00916.58
7.4.60.0050.01016.66
7.4.50.0100.00816.60
7.4.40.0080.01116.62
7.4.30.0150.00616.75
7.4.20.0160.00416.68
7.4.10.0130.00716.60
7.4.00.0060.01115.76
7.3.330.0070.00013.07
7.3.320.0000.00613.26
7.3.310.0000.00716.21
7.3.300.0050.00216.30
7.3.290.0030.01316.37
7.3.280.0080.00716.33
7.3.270.0090.00616.27
7.3.260.0110.01116.46
7.3.250.0070.01116.33
7.3.240.0030.01316.26
7.3.230.0090.00616.45
7.3.220.0030.01016.29
7.3.210.0060.01016.23
7.3.200.0140.00216.42
7.3.190.0100.00716.20
7.3.180.0110.00716.39
7.3.170.0090.00716.35
7.3.160.0100.00716.39
7.3.150.0080.00616.21
7.3.140.0070.00716.20
7.3.130.0030.01016.21
7.3.120.0100.01016.23
7.3.110.0060.00916.14
7.3.100.0090.00916.13
7.3.90.0070.01116.50
7.3.80.0090.00616.27
7.3.70.0070.00716.45
7.3.60.0030.01016.52
7.3.50.0090.00915.70
7.3.40.0100.00615.68
7.3.30.0180.00415.60
7.3.20.0660.00615.63
7.3.10.0080.00815.63
7.3.00.0090.00815.63
7.2.340.0030.01216.48
7.2.330.0110.00916.61
7.2.320.0100.01316.65
7.2.310.0150.00916.64
7.2.300.0160.01016.53
7.2.290.0180.00616.66
7.2.280.0190.01616.41
7.2.270.0230.00816.49
7.2.260.0220.01116.42
7.2.250.0570.00616.45
7.2.240.0180.01216.49
7.2.230.0220.00516.41
7.2.220.0170.00716.51
7.2.210.0200.01016.51
7.2.200.0220.00916.54
7.2.190.0140.01816.46
7.2.180.0160.00715.68
7.2.170.0170.00815.79
7.2.160.0120.01215.65
7.2.150.0200.00715.94
7.2.140.0540.00615.80
7.2.130.0140.00815.95
7.2.120.0150.00615.97
7.2.110.0190.00815.84
7.2.100.0150.01315.91
7.2.90.0180.00515.76
7.2.80.0460.00615.93
7.2.70.0120.00915.81
7.2.60.0180.00915.86
7.2.50.0170.00515.81
7.2.40.0150.00615.93
7.2.30.0270.01115.93
7.2.20.0190.00915.78
7.2.10.0180.00815.89
7.2.00.0140.01115.87
7.1.330.0150.00315.48
7.1.320.0150.00815.68
7.1.310.0170.00615.63
7.1.300.0220.00615.69
7.1.290.0190.00815.73
7.1.280.0120.00914.83
7.1.270.0140.00714.81
7.1.260.0110.00814.71
7.1.250.0130.00614.83
7.1.240.0130.01015.52
7.1.230.0220.00415.63
7.1.220.0360.01415.66
7.1.210.0310.00717.44
7.1.200.0190.00717.50
7.1.190.0190.01317.49
7.1.180.0190.00817.38
7.1.170.0190.00817.35
7.1.160.0230.00617.48
7.1.150.0190.00717.31
7.1.140.0240.00317.33
7.1.130.0190.00917.32
7.1.120.0190.00317.37
7.1.110.0180.00417.36
7.1.100.0510.00917.36
7.1.90.0220.00517.43
7.1.80.0210.00317.55
7.1.70.0110.01417.30
7.1.60.0240.00017.48
7.1.50.0150.01117.48
7.1.40.0130.01017.55
7.1.30.0230.00217.54
7.1.20.0170.01317.54
7.1.10.0200.00717.59
7.1.00.0180.01215.52

preferences:
134.25 ms | 403 KiB | 5 Q