3v4l.org

run code in 300+ PHP versions simultaneously
<?php function toUpperCamelCase(string $text): string { $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(string $beginning, string $end, string $string): 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.60.0150.00016.88
8.3.50.0140.00016.51
8.3.40.0140.00318.91
8.3.30.0040.01118.95
8.3.20.0000.00820.32
8.3.10.0080.00021.85
8.3.00.0030.00619.63
8.2.180.0120.00318.66
8.2.170.0070.01522.96
8.2.160.0100.00320.55
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00821.10
8.2.120.0070.00026.35
8.2.110.0060.00321.30
8.2.100.0000.01218.34
8.2.90.0050.00319.22
8.2.80.0080.00018.05
8.2.70.0000.00817.60
8.2.60.0080.00018.05
8.2.50.0060.00318.10
8.2.40.0040.00420.58
8.2.30.0040.00421.07
8.2.20.0000.00818.14
8.2.10.0000.00718.24
8.2.00.0040.00418.24
8.1.280.0150.00625.92
8.1.270.0040.00423.76
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00424.03
8.1.230.0070.00419.18
8.1.220.0000.00817.80
8.1.210.0080.00018.77
8.1.200.0070.00317.47
8.1.190.0080.00017.47
8.1.180.0050.00318.10
8.1.170.0080.00019.04
8.1.160.0040.00419.16
8.1.150.0000.00720.70
8.1.140.0080.00019.71
8.1.130.0030.00318.93
8.1.120.0080.00017.68
8.1.110.0090.00017.51
8.1.100.0070.00017.75
8.1.90.0000.00817.56
8.1.80.0040.00417.55
8.1.70.0000.00817.55
8.1.60.0080.00017.77
8.1.50.0000.00817.59
8.1.40.0030.00517.64
8.1.30.0050.00317.79
8.1.20.0080.00017.71
8.1.10.0000.00817.78
8.1.00.0060.00317.71
8.0.300.0070.00018.77
8.0.290.0050.00217.00
8.0.280.0040.00418.49
8.0.270.0070.00017.39
8.0.260.0000.00717.15
8.0.250.0040.00417.26
8.0.240.0060.00317.32
8.0.230.0030.00317.17
8.0.220.0070.00017.13
8.0.210.0040.00417.23
8.0.200.0040.00417.28
8.0.190.0050.00317.15
8.0.180.0040.00417.14
8.0.170.0000.00717.23
8.0.160.0040.00417.14
8.0.150.0000.00817.22
8.0.140.0000.00717.24
8.0.130.0030.00313.51
8.0.120.0030.00617.35
8.0.110.0030.00617.35
8.0.100.0060.00317.39
8.0.90.0030.00617.39
8.0.80.0100.01017.33
8.0.70.0080.00317.37
8.0.60.0060.00317.18
8.0.50.0030.00617.18
8.0.30.0110.00717.56
8.0.20.0140.00817.57
8.0.10.0000.00917.28
8.0.00.0120.00917.18
7.4.330.0050.00215.55
7.4.320.0070.00016.78
7.4.300.0000.00616.76
7.4.290.0070.00016.67
7.4.280.0090.00016.75
7.4.270.0000.00816.86
7.4.260.0080.00416.77
7.4.250.0000.00916.83
7.4.240.0050.00316.80
7.4.230.0060.00316.94
7.4.220.0040.01816.99
7.4.210.0060.01116.89
7.4.200.0030.00616.80
7.4.160.0100.00916.88
7.4.150.0070.01317.40
7.4.140.0080.01617.86
7.4.130.0030.01717.06
7.4.120.0100.01316.99
7.4.110.0130.00616.86
7.4.100.0100.01017.11
7.4.90.0130.00717.00
7.4.80.0080.01719.39
7.4.70.0090.01216.78
7.4.60.0090.01216.82
7.4.50.0130.00916.65
7.4.40.0120.00916.78
7.4.30.0210.00816.56
7.4.20.0210.01116.58
7.4.10.0220.00616.87
7.4.00.0080.01515.91
7.3.330.0050.00013.43
7.3.320.0060.00013.57
7.3.310.0000.00916.93
7.3.300.0060.00316.74
7.3.290.0040.00416.69
7.3.280.0090.01016.81
7.3.270.0120.00917.40
7.3.260.0120.01116.84
7.3.250.0090.01316.78
7.3.240.0080.01816.73
7.3.230.0100.01016.85
7.3.210.0030.01516.82
7.3.200.0110.00716.92
7.3.190.0070.01316.81
7.3.180.0090.01416.85
7.3.170.0130.01116.89
7.3.160.0090.01116.78
7.3.150.0150.00916.55
7.3.140.0140.01416.67
7.3.130.0210.01016.88
7.3.120.0060.01816.08
7.3.110.0090.01115.78
7.3.100.0100.00915.85
7.3.90.0060.01215.97
7.3.80.0140.00916.01
7.3.70.0160.00616.09
7.3.60.0150.00616.05
7.3.50.0140.01116.05
7.3.40.0110.01316.06
7.3.30.0100.01616.10
7.3.20.0200.01316.89
7.3.10.0160.00916.73
7.3.00.0130.01116.96
7.2.330.0100.01316.97
7.2.320.0120.00916.91
7.2.310.0120.01316.81
7.2.300.0100.01216.89
7.2.290.0120.01416.87
7.2.280.0080.01716.94
7.2.270.0140.00916.61
7.2.260.0190.00816.45
7.2.250.0090.01115.85
7.2.240.0060.01615.94
7.2.230.0120.00916.16
7.2.220.0130.00916.13
7.2.210.0140.01016.17
7.2.200.0120.01016.10
7.2.190.0150.01016.04
7.2.180.0120.01416.03
7.2.170.0160.00916.23
7.2.160.0220.01716.96
7.2.150.0290.00516.94
7.2.140.0230.01117.05
7.2.130.0100.01216.94
7.2.120.0110.01316.89
7.2.110.0170.00817.03
7.2.100.0150.00816.79
7.2.90.0120.01217.69
7.2.80.0100.00917.69
7.2.70.0100.01017.70
7.2.60.0120.00917.47
7.2.50.0120.01217.96
7.2.40.0120.01517.82
7.2.30.0110.01117.76
7.2.20.0180.00317.83
7.2.10.0080.01017.67
7.2.00.0080.00918.47
7.1.330.0090.01016.02
7.1.320.0240.00716.15
7.1.310.0090.01316.14
7.1.300.0130.01316.13
7.1.290.0100.01416.04
7.1.280.0140.00816.05
7.1.270.0160.00816.11
7.1.260.0110.00816.07
7.1.250.0110.00415.70
7.1.240.0100.01315.58
7.1.230.0170.01015.84
7.1.220.0130.01317.75
7.1.210.0090.01217.70
7.1.200.0140.00316.98
7.1.190.0170.00617.49
7.1.180.0030.01617.68
7.1.170.0090.01517.43
7.1.160.0090.01317.73
7.1.150.0080.01117.73
7.1.140.0120.00917.53
7.1.130.0050.01317.74
7.1.120.0110.00817.53
7.1.110.0170.00317.79
7.1.100.0080.00718.15
7.1.90.0130.01317.78
7.1.80.0130.00717.40
7.1.70.0090.01017.49
7.1.60.0170.01126.32
7.1.50.0130.01726.04
7.1.40.0160.01226.13
7.1.30.0170.01726.07
7.1.20.0220.01126.16
7.1.10.0120.00817.17
7.1.00.0110.01117.37
7.0.330.0120.01115.20
7.0.320.0130.01317.38
7.0.310.0140.00717.25
7.0.300.0100.01017.49
7.0.290.0040.01517.39
7.0.280.0030.01717.37
7.0.270.0100.00817.45
7.0.260.0130.00617.45
7.0.250.0040.01517.22
7.0.240.0120.00917.55
7.0.230.0170.00317.20
7.0.220.0090.00917.07
7.0.210.0100.01017.04
7.0.200.0120.00716.97
7.0.190.0100.01217.20
7.0.180.0050.01516.96
7.0.170.0080.01116.89
7.0.160.0100.01116.91
7.0.150.0080.01216.98
7.0.140.0120.00916.95
7.0.130.0070.01217.22
7.0.120.0150.00716.04
7.0.110.0680.00916.00
7.0.100.0110.00716.06
7.0.90.0050.01416.07
7.0.80.0100.00816.08
7.0.70.0140.00716.17
7.0.60.0110.01415.87
7.0.50.0110.01316.18
7.0.40.0150.01516.19
7.0.30.0100.01316.12
7.0.20.0100.01316.19
7.0.10.0100.01015.95
7.0.00.0080.01316.05
5.6.400.0160.00315.34
5.6.390.0090.01515.58
5.6.380.0110.00815.57
5.6.370.0060.01315.85
5.6.360.0070.01715.64
5.6.350.0000.01915.67
5.6.340.0160.00315.61
5.6.330.0050.01415.88
5.6.320.0030.01515.77
5.6.310.0150.00415.44
5.6.300.0110.00815.25
5.6.290.0120.00415.14
5.6.280.0080.01115.10
5.6.270.0110.00715.68
5.6.260.0040.01315.20
5.6.250.0060.01215.52
5.6.240.0160.00315.65
5.6.230.0100.01015.65
5.6.220.0090.00915.66
5.6.210.0160.00315.44
5.6.200.0060.01315.54
5.6.190.0130.01015.84
5.6.180.0110.01115.76
5.6.170.0120.00915.49
5.6.160.0080.01015.69
5.6.150.0060.01315.69
5.6.140.0070.01315.50
5.6.130.0140.00715.49
5.6.120.0040.01515.24
5.6.110.0040.02215.67
5.6.100.0070.01315.88
5.6.90.0150.00815.57
5.6.80.0070.01215.29
5.6.70.0140.00715.29
5.6.60.0070.01115.46
5.6.50.0150.00315.79
5.6.40.0070.01815.64
5.6.30.0090.01715.65
5.6.20.0090.01515.42
5.6.10.0050.01815.60
5.6.00.0140.00715.52

preferences:
47.39 ms | 401 KiB | 5 Q