3v4l.org

run code in 300+ PHP versions simultaneously
<?php function smart_uc_words($string) { $string = strtolower(trim($string)); // Capitalise any word char preceded by a non-word char other than an apostrophe $string = preg_replace_callback('/(?<!\w|\')(\w)/', function($m){ return strtoupper($m[1]); }, $string); // Capitalise any word char which comes between an apostrophe and another word char $string = preg_replace_callback('/(?<=\')(\w)(?=\w)/', function($m){ return strtoupper($m[1]); }, $string); return $string; } echo smart_uc_words("s'hertogengebosch");

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.70.0190.00316.75
8.3.60.0210.00016.63
8.3.50.0180.00221.96
8.3.40.0110.00419.04
8.3.30.0090.00619.09
8.3.20.0040.00420.39
8.3.10.0060.00323.44
8.3.00.0030.00519.19
8.2.180.0200.00016.88
8.2.170.0110.00422.96
8.2.160.0070.00720.29
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00420.96
8.2.110.0060.00322.14
8.2.100.0090.00317.91
8.2.90.0030.00519.10
8.2.80.0050.00317.97
8.2.70.0000.00917.88
8.2.60.0050.00517.91
8.2.50.0030.00518.07
8.2.40.0040.00421.22
8.2.30.0000.00718.23
8.2.20.0000.00717.78
8.2.10.0050.00318.08
8.2.00.0080.00017.91
8.1.280.0070.01125.92
8.1.270.0090.00023.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00322.18
8.1.230.0060.00619.02
8.1.220.0050.00317.78
8.1.210.0030.00618.77
8.1.200.0060.00317.60
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0040.00418.63
8.1.160.0000.00822.05
8.1.150.0040.00418.84
8.1.140.0060.00317.60
8.1.130.0070.00017.90
8.1.120.0070.00017.59
8.1.110.0040.00417.59
8.1.100.0000.00717.63
8.1.90.0040.00417.57
8.1.80.0040.00417.54
8.1.70.0040.00417.63
8.1.60.0040.00417.64
8.1.50.0000.00817.74
8.1.40.0000.00917.63
8.1.30.0050.00317.74
8.1.20.0030.00517.86
8.1.10.0040.00417.61
8.1.00.0050.00317.55
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00718.50
8.0.270.0070.00317.19
8.0.260.0030.00317.20
8.0.250.0000.00717.09
8.0.240.0080.00017.12
8.0.230.0000.00716.90
8.0.220.0070.00016.87
8.0.210.0030.00316.95
8.0.200.0000.00817.06
8.0.190.0070.00017.13
8.0.180.0000.00716.95
8.0.170.0040.00417.06
8.0.160.0030.00617.10
8.0.150.0050.00317.11
8.0.140.0030.00517.01
8.0.130.0030.00313.46
8.0.120.0000.00816.95
8.0.110.0000.00717.11
8.0.100.0070.00017.07
8.0.90.0000.00817.16
8.0.80.0060.00917.07
8.0.70.0040.00417.09
8.0.60.0000.00717.04
8.0.50.0080.00017.04
8.0.30.0110.00717.29
8.0.20.0110.00817.40
8.0.10.0050.00317.16
8.0.00.0080.01017.00
7.4.330.0000.00515.10
7.4.320.0060.00016.70
7.4.300.0080.00016.62
7.4.290.0000.00716.83
7.4.280.0040.00416.85
7.4.270.0000.00716.82
7.4.260.0040.00416.69
7.4.250.0000.00716.77
7.4.240.0070.00016.78
7.4.230.0040.00416.79
7.4.220.0030.01416.66
7.4.210.0100.00716.74
7.4.200.0070.00016.66
7.4.190.0040.00416.77
7.4.160.0060.00916.50
7.4.150.0080.01117.40
7.4.140.0110.01017.86
7.4.130.0070.01216.70
7.4.120.0100.00716.68
7.4.110.0140.00716.75
7.4.100.0130.01016.74
7.4.90.0110.00816.87
7.4.80.0120.00619.39
7.4.70.0100.00716.75
7.4.60.0110.00816.62
7.4.50.0030.00316.71
7.4.40.0060.01016.72
7.4.30.0140.00316.72
7.4.00.0070.01115.21
7.3.330.0030.00313.40
7.3.320.0030.00313.44
7.3.310.0000.00816.31
7.3.300.0000.00716.33
7.3.290.0080.00816.37
7.3.280.0060.01516.42
7.3.270.0070.01117.40
7.3.260.0110.00716.84
7.3.250.0090.00916.72
7.3.240.0130.00716.47
7.3.230.0070.01116.80
7.3.210.0140.00716.35
7.3.200.0080.00819.39
7.3.190.0080.01116.41
7.3.180.0120.00316.39
7.3.170.0120.00616.71
7.3.160.0060.01016.39
7.3.120.0070.00715.20
7.3.110.0060.01315.28
7.3.100.0100.00315.28
7.3.90.0070.00715.28
7.3.80.0060.00315.28
7.3.70.0050.00515.28
7.3.60.0100.00315.28
7.3.50.0070.00315.28
7.3.40.0030.00615.28
7.3.30.0000.01315.28
7.3.20.0100.00716.89
7.3.10.0060.00616.72
7.3.00.0070.00716.80
7.2.330.0120.00617.00
7.2.320.0100.01316.63
7.2.310.0100.00716.79
7.2.300.0080.00916.88
7.2.290.0100.00716.91
7.2.250.0090.00615.28
7.2.240.0030.01715.44
7.2.230.0170.00015.28
7.2.220.0040.01115.28
7.2.210.0030.01015.28
7.2.200.0030.01415.48
7.2.190.0000.01515.32
7.2.180.0000.01615.28
7.2.170.0030.01015.28
7.2.00.0030.01219.64
7.1.330.0070.00716.23
7.1.320.0070.00716.19
7.1.310.0070.01016.13
7.1.300.0030.00615.93
7.1.290.0100.00715.69
7.1.280.0070.00716.05
7.1.270.0080.00616.05
7.1.260.0060.00315.97
7.1.100.0060.00618.22
7.1.70.0070.00717.13
7.1.60.0030.02119.46
7.1.50.0130.00917.22
7.1.00.0070.07322.50
7.0.200.0080.00416.92
7.0.140.0030.06722.21
7.0.60.0130.05720.01
7.0.50.0000.06717.98
7.0.40.0100.08320.15
7.0.30.0230.05720.27
7.0.20.0230.07720.26
7.0.10.0030.06720.14
7.0.00.0100.08320.18
5.6.280.0070.07020.93
5.6.210.0100.08320.71
5.6.200.0070.08318.13
5.6.190.0170.07320.33
5.6.180.0100.04720.60
5.6.170.0230.05020.45
5.6.160.0130.07320.54
5.6.150.0070.08018.25
5.6.140.0100.08318.18
5.6.130.0070.08018.21
5.6.120.0030.04321.16
5.6.110.0000.05021.02
5.6.100.0100.04021.01
5.6.90.0030.04321.09
5.6.80.0130.07320.45
5.5.350.0030.07020.40
5.5.340.0130.06717.98
5.5.330.0130.05020.42
5.5.320.0230.05720.36
5.5.310.0330.07020.32
5.5.300.0030.04317.95
5.5.290.0030.08317.95
5.5.280.0000.04720.90
5.5.270.0070.05020.87
5.5.260.0030.04020.77
5.5.250.0100.05720.56
5.5.240.0000.07720.16
5.4.450.0330.06019.48
5.4.440.0870.05019.63
5.4.430.0800.05719.51
5.4.420.0670.06319.28
5.4.410.0970.06019.51
5.4.400.0900.05719.34
5.4.390.0870.06018.98
5.4.380.0470.05318.77
5.4.370.0300.05318.70
5.4.360.0530.07018.78
5.4.350.0870.05318.62
5.4.340.0430.05018.77
5.4.320.0020.04012.52
5.4.310.0080.03612.51
5.4.300.0090.04912.51
5.4.290.0120.04712.50
5.4.280.0050.04612.40
5.4.270.0080.04012.41
5.4.260.0090.04612.41
5.4.250.0120.03712.40
5.4.240.0070.04112.41
5.4.230.0060.04312.40
5.4.220.0060.03912.40
5.4.210.0060.03712.39
5.4.200.0060.04112.40
5.4.190.0060.03912.39
5.4.180.0070.04112.39
5.4.170.0090.03812.40
5.4.160.0090.04712.40
5.4.150.0080.03912.40
5.4.140.0110.05012.08
5.4.130.0110.05212.07
5.4.120.0120.04912.03
5.4.110.0110.04812.02
5.4.100.0080.05512.02
5.4.90.0110.04212.02
5.4.80.0090.04512.02
5.4.70.0100.04412.02
5.4.60.0120.04112.02
5.4.50.0090.03412.02
5.4.40.0070.03912.01
5.4.30.0070.04012.00
5.4.20.0110.04012.00
5.4.10.0120.04312.00
5.4.00.0060.04911.49
5.3.290.0050.04112.80
5.3.280.0050.04212.71
5.3.270.0070.04212.73
5.3.260.0100.04112.72
5.3.250.0050.04412.72
5.3.240.0100.03912.72
5.3.230.0070.04412.71
5.3.220.0090.03812.68
5.3.210.0070.05012.68
5.3.200.0080.04312.68
5.3.190.0110.03512.68
5.3.180.0060.03712.67
5.3.170.0100.03612.67
5.3.160.0060.03912.67
5.3.150.0090.03712.68
5.3.140.0040.03912.66
5.3.130.0050.04112.66
5.3.120.0070.03912.66
5.3.110.0050.04112.66
5.3.100.0070.03912.13
5.3.90.0070.04612.11
5.3.80.0100.04312.11
5.3.70.0070.04112.10
5.3.60.0070.04712.09
5.3.50.0100.04212.04
5.3.40.0080.04312.04
5.3.30.0070.04911.99
5.3.20.0070.05011.77
5.3.10.0090.05011.73
5.3.00.0060.04211.73
5.2.170.0070.0359.22
5.2.160.0060.0319.21
5.2.150.0050.0329.22
5.2.140.0100.0289.21
5.2.130.0080.0309.17
5.2.120.0080.0309.17
5.2.110.0060.0319.18
5.2.100.0060.0309.18
5.2.90.0090.0429.18
5.2.80.0050.0479.17
5.2.70.0060.0459.18
5.2.60.0070.0439.13
5.2.50.0060.0449.10
5.2.40.0060.0409.07
5.2.30.0040.0469.04
5.2.20.0040.0439.04
5.2.10.0050.0418.95
5.2.00.0070.0428.81
5.1.60.0090.0328.09
5.1.50.0060.0298.09
5.1.40.0060.0268.07
5.1.30.0050.0358.42
5.1.20.0040.0388.43
5.1.10.0060.0358.16
5.1.00.0080.0358.17
5.0.50.0070.0286.64
5.0.40.0040.0306.51
5.0.30.0070.0406.31
5.0.20.0030.0236.28
5.0.10.0020.0266.27
5.0.00.0030.0376.26
4.4.90.0030.0214.78
4.4.80.0060.0184.75
4.4.70.0030.0204.75
4.4.60.0030.0164.76
4.4.50.0030.0164.77
4.4.40.0050.0254.71
4.4.30.0030.0184.76
4.4.20.0020.0224.85
4.4.10.0050.0154.85
4.4.00.0030.0284.76
4.3.110.0040.0154.67
4.3.100.0030.0164.66
4.3.90.0020.0174.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0020.0174.62
4.3.40.0050.0234.54
4.3.30.0020.0213.30
4.3.20.0040.0163.28
4.3.10.0020.0163.24
4.3.00.0030.0207.08

preferences:
43.56 ms | 401 KiB | 5 Q