3v4l.org

run code in 300+ PHP versions simultaneously
<?php function toUpperCamelCase($text) { $replacement = ""; $text = delete_all_between('(', ')', $text); $text = preg_replace("/(\b(de|du|la|le|et)\b)|(\b((l|d)[',’]))/i", ' ', $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); $text = ucwords($text); $text = preg_replace('~[^\pL\d]+~u', $replacement, $text); $text = trim($text, $replacement); $text = preg_replace('~-+~', $replacement, $text); return $text; } function delete_all_between($beginning, $end, $string) { $beginningPos = strpos($string, $beginning); $endPos = strpos($string, $end); if ($beginningPos === false || $endPos === false) { return $string; } $textToDelete = substr($string, $beginningPos, ($endPos + strlen($end)) - $beginningPos); return str_replace($textToDelete, '', $string); } echo toUpperCamelCase("Identifiant de l’organisme destinataire de la déclaration néant");

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.40.0100.00718.86
8.3.30.0030.01218.74
8.3.20.0070.00020.21
8.3.10.0000.00821.85
8.3.00.0000.00819.38
8.2.170.0120.00322.96
8.2.160.0070.00720.28
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0030.00521.08
8.2.120.0000.00826.35
8.2.110.0030.00621.30
8.2.100.0040.00818.16
8.2.90.0040.00419.39
8.2.80.0040.00418.05
8.2.70.0040.00417.88
8.2.60.0080.00018.05
8.2.50.0030.00618.10
8.2.40.0040.00420.71
8.2.30.0050.00321.00
8.2.20.0030.00518.19
8.2.10.0040.00418.13
8.2.00.0000.00718.29
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00719.45
8.1.230.0110.00018.95
8.1.220.0080.00017.91
8.1.210.0050.00318.77
8.1.200.0030.00717.47
8.1.190.0040.00417.60
8.1.180.0040.00418.10
8.1.170.0040.00419.14
8.1.160.0070.00019.09
8.1.150.0030.00620.75
8.1.140.0030.00719.61
8.1.130.0080.00019.02
8.1.120.0050.00217.66
8.1.110.0030.00717.58
8.1.100.0070.00017.68
8.1.90.0080.00017.66
8.1.80.0000.00717.54
8.1.70.0000.00817.61
8.1.60.0000.00917.78
8.1.50.0090.00017.74
8.1.40.0040.00417.62
8.1.30.0040.00417.86
8.1.20.0040.00417.84
8.1.10.0030.00517.69
8.1.00.0030.00517.54
8.0.300.0000.00818.77
8.0.290.0040.00416.73
8.0.280.0000.00718.52
8.0.270.0030.00317.23
8.0.260.0070.00017.15
8.0.250.0000.00817.29
8.0.240.0060.00317.29
8.0.230.0040.00417.25
8.0.220.0000.00717.13
8.0.210.0040.00417.12
8.0.200.0040.00417.21
8.0.190.0090.00017.27
8.0.180.0080.00017.12
8.0.170.0040.00417.31
8.0.160.0050.00217.12
8.0.150.0040.00417.12
8.0.140.0070.00017.16
8.0.130.0030.00313.62
8.0.120.0030.00617.35
8.0.110.0090.00017.46
8.0.100.0040.00417.15
8.0.90.0030.00617.22
8.0.80.0090.01517.34
8.0.70.0030.00617.39
8.0.60.0030.00617.39
8.0.50.0000.00917.30
8.0.30.0060.01617.50
8.0.20.0090.01317.61
8.0.10.0040.00417.35
8.0.00.0080.01217.21
7.4.330.0030.00415.55
7.4.320.0030.00316.75
7.4.300.0030.00316.70
7.4.290.0040.00416.89
7.4.280.0070.00316.75
7.4.270.0030.00316.71
7.4.260.0100.00016.66
7.4.250.0060.00317.00
7.4.240.0030.00616.98
7.4.230.0060.00317.04
7.4.220.0140.00716.89
7.4.210.0060.01016.90
7.4.200.0060.00316.77
7.4.160.0110.00816.96
7.4.150.0210.00017.40
7.4.140.0160.00417.86
7.4.130.0100.01017.12
7.4.120.0090.01316.88
7.4.110.0180.00917.00
7.4.100.0130.01316.79
7.4.90.0130.00617.09
7.4.80.0090.01119.39
7.4.70.0020.01616.70
7.4.60.0130.01116.70
7.4.50.0050.01516.74
7.4.40.0080.01016.74
7.4.30.0060.01316.80
7.4.20.0130.01316.94
7.4.10.0080.01116.05
7.4.00.0090.01115.81
7.3.330.0050.00013.55
7.3.320.0000.00513.55
7.3.310.0000.00916.73
7.3.300.0000.00816.63
7.3.290.0040.00416.76
7.3.280.0080.00916.78
7.3.270.0130.00717.40
7.3.260.0080.01216.83
7.3.250.0090.01116.81
7.3.240.0110.01416.93
7.3.230.0060.01517.00
7.3.210.0120.00616.72
7.3.200.0100.01016.79
7.3.190.0130.01116.70
7.3.180.0060.01516.81
7.3.170.0100.01316.76
7.3.160.0100.00716.88
7.3.150.0070.01716.62
7.3.140.0040.02316.45
7.3.130.0110.01016.01
7.3.120.0080.01616.00
7.3.110.0130.00915.81
7.3.100.0030.01616.04
7.3.90.0110.00716.06
7.3.80.0110.01016.04
7.3.70.0100.01116.11
7.3.60.0150.00315.77
7.3.50.0060.01215.97
7.3.40.0090.00815.76
7.3.30.0080.01015.97
7.3.20.0130.00816.80
7.3.10.0090.00916.85
7.3.00.0080.01416.78
7.2.330.0120.01617.09
7.2.320.0070.01316.96
7.2.310.0120.00716.87
7.2.300.0070.01216.85
7.2.290.0100.01017.03
7.2.280.0160.00316.47
7.2.270.0070.02016.59
7.2.260.0070.01716.12
7.2.250.0140.01116.16
7.2.240.0090.01316.03
7.2.230.0090.01116.11
7.2.220.0110.00915.89
7.2.210.0060.01616.08
7.2.200.0070.01216.24
7.2.190.0110.01016.15
7.2.180.0090.01116.18
7.2.170.0090.01216.12
7.2.160.0100.01016.02
7.2.150.0080.01316.99
7.2.140.0100.00617.03
7.2.130.0120.01017.12
7.2.120.0110.01116.72
7.2.110.0090.01016.98
7.2.100.0140.00716.92
7.2.90.0100.00916.86
7.2.80.0040.01716.88
7.2.70.0100.01116.91
7.2.60.0060.00917.04
7.2.50.0080.01017.05
7.2.40.0100.00717.02
7.2.30.0070.01217.18
7.2.20.0300.01117.02
7.2.10.0080.01216.98
7.2.00.0050.01317.94
7.1.330.0060.01315.88
7.1.320.0110.00915.94
7.1.310.0110.01015.88
7.1.300.0040.01816.09
7.1.290.0070.01316.05
7.1.280.0130.00415.88
7.1.270.0070.01215.86
7.1.260.0090.00815.95
7.1.250.0040.01715.75
7.1.240.0060.01515.82
7.1.230.0510.01115.99
7.1.220.0080.01215.94
7.1.210.0120.01015.92
7.1.200.0080.01015.94
7.1.190.0080.00915.94
7.1.180.0100.01216.02
7.1.170.0110.01015.95
7.1.160.0100.00615.90
7.1.150.0090.01015.79
7.1.140.0090.00915.92
7.1.130.0120.00715.78
7.1.120.0140.00516.03
7.1.110.0080.01115.84
7.1.100.0030.01216.83
7.1.90.0030.01415.86
7.1.80.0090.00815.89
7.1.70.0080.00916.29
7.1.60.0140.01122.18
7.1.50.0090.01422.26
7.1.40.0090.01322.00
7.1.30.0120.01022.12
7.1.20.0120.00822.04
7.1.10.0090.00916.31
7.1.00.0060.01116.34
7.0.330.0100.00815.33
7.0.320.0060.01315.54
7.0.310.0070.01415.64
7.0.300.0100.01115.66
7.0.290.0110.00815.53
7.0.280.0110.00815.38
7.0.270.0080.01315.48
7.0.260.0050.01415.47
7.0.250.0100.01015.71
7.0.240.0070.00915.78
7.0.230.0020.01315.52
7.0.220.0040.01215.31
7.0.210.0100.00615.46
7.0.200.0060.01216.09
7.0.190.0040.01116.02
7.0.180.0070.00716.06
7.0.170.0060.01115.97
7.0.160.0080.01116.04
7.0.150.0060.01116.06
7.0.140.0060.01315.96
7.0.130.0070.00815.97
7.0.120.0070.00815.96
7.0.110.0100.00715.98
7.0.100.0110.00915.86
7.0.90.0060.01116.00
7.0.80.0070.01116.01
7.0.70.0080.01016.00
7.0.60.0070.01315.87
7.0.50.0030.01416.00
7.0.40.0070.01115.26
7.0.30.0050.01015.49
7.0.20.0060.01115.18
7.0.10.0060.01215.32
7.0.00.0150.01015.33
5.6.400.0100.01315.19
5.6.390.0170.00715.09
5.6.380.0100.01215.22
5.6.370.0110.01115.41
5.6.360.0110.00915.32
5.6.350.0110.01415.33
5.6.340.0060.01715.21
5.6.330.0140.00915.43
5.6.320.0030.01515.45
5.6.310.0090.01015.10
5.6.300.0150.00715.36
5.6.290.0110.01114.97
5.6.280.0120.00915.18
5.6.270.0080.00915.16
5.6.260.0080.01015.15
5.6.250.0130.00615.43
5.6.240.0080.01115.41
5.6.230.0050.01315.37
5.6.220.0040.01415.29
5.6.210.0090.00915.22
5.6.200.0100.01215.52
5.6.190.0050.01415.41
5.6.180.0090.00915.38
5.6.170.0110.00915.29
5.6.160.0100.00915.58
5.6.150.0050.01515.42
5.6.140.0150.00715.25
5.6.130.0100.01115.36
5.6.120.0090.01115.29
5.6.110.0100.01015.23
5.6.100.0120.00315.34
5.6.90.0050.01315.16
5.6.80.0050.01415.17
5.6.70.0090.00915.10
5.6.60.0080.01315.21
5.6.50.0090.01015.10
5.6.40.0120.00515.28
5.6.30.0080.01315.14
5.6.20.0060.01415.12
5.6.10.0100.01015.30
5.6.00.0030.01315.22

preferences:
51.52 ms | 400 KiB | 5 Q