3v4l.org

run code in 300+ PHP versions simultaneously
<?php function toUpperCamelCase(string $text): string { $replacement = ""; $text = preg_replace("/(\b(de|du|la|le|et)\b)|(\b((l|d)[',’]))/i", '', $text); $text = delete_all_between('(', ')', $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.0110.00417.25
8.3.50.0040.01116.56
8.3.40.0070.00718.96
8.3.30.0150.00018.88
8.3.20.0040.00420.16
8.3.10.0110.00021.94
8.3.00.0000.00819.51
8.2.180.0040.01517.13
8.2.170.0110.00422.96
8.2.160.0150.00020.36
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.07
8.2.120.0050.00326.35
8.2.110.0060.00321.12
8.2.100.0080.00418.16
8.2.90.0040.00419.31
8.2.80.0030.00518.16
8.2.70.0000.00817.88
8.2.60.0050.00318.16
8.2.50.0000.00918.10
8.2.40.0060.00320.54
8.2.30.0000.00820.93
8.2.20.0040.00418.13
8.2.10.0050.00318.08
8.2.00.0040.00418.08
8.1.280.0110.00425.92
8.1.270.0040.00422.23
8.1.260.0050.00326.35
8.1.250.0020.00528.09
8.1.240.0090.00023.92
8.1.230.0070.00419.22
8.1.220.0000.00817.91
8.1.210.0000.00818.77
8.1.200.0090.00017.47
8.1.190.0110.00017.47
8.1.180.0000.00918.10
8.1.170.0080.00019.13
8.1.160.0000.00719.10
8.1.150.0080.00020.71
8.1.140.0050.00519.76
8.1.130.0000.00718.97
8.1.120.0040.00417.69
8.1.110.0040.00417.50
8.1.100.0000.00817.68
8.1.90.0040.00417.65
8.1.80.0040.00417.57
8.1.70.0040.00417.68
8.1.60.0030.00617.79
8.1.50.0040.00417.78
8.1.40.0000.00817.64
8.1.30.0000.00817.82
8.1.20.0060.00517.69
8.1.10.0000.00817.66
8.1.00.0060.00317.76
8.0.300.0030.00518.77
8.0.290.0040.00417.13
8.0.280.0000.00718.41
8.0.270.0070.00017.25
8.0.260.0040.00417.03
8.0.250.0070.00017.29
8.0.240.0070.00017.28
8.0.230.0040.00417.27
8.0.220.0040.00417.24
8.0.210.0070.00017.07
8.0.200.0000.00817.32
8.0.190.0040.00417.27
8.0.180.0000.00717.19
8.0.170.0000.00717.23
8.0.160.0000.00717.32
8.0.150.0030.00617.03
8.0.140.0030.00517.20
8.0.130.0050.00013.55
8.0.120.0090.00017.20
8.0.110.0040.00417.24
8.0.100.0000.00917.26
8.0.90.0060.00317.34
8.0.80.0030.01817.34
8.0.70.0060.00317.37
8.0.60.0090.00017.36
8.0.50.0030.00617.39
8.0.30.0080.00917.46
8.0.20.0080.01617.66
8.0.10.0090.00017.42
8.0.00.0090.01217.33
7.4.330.0040.00415.55
7.4.320.0030.00316.89
7.4.300.0070.00016.67
7.4.290.0000.00816.84
7.4.280.0000.00716.71
7.4.270.0000.00716.79
7.4.260.0040.00416.82
7.4.250.0060.00316.95
7.4.240.0040.00416.86
7.4.230.0060.00317.08
7.4.220.0130.00916.81
7.4.210.0120.00716.96
7.4.200.0000.00917.00
7.4.160.0110.01116.95
7.4.150.0120.00917.40
7.4.140.0110.01317.86
7.4.130.0140.00716.99
7.4.120.0110.00916.93
7.4.110.0130.00617.07
7.4.100.0100.01717.13
7.4.90.0090.01216.93
7.4.80.0060.01319.39
7.4.70.0140.01217.09
7.4.60.0120.01116.88
7.4.50.0150.00917.00
7.4.40.0170.01016.94
7.4.30.0210.00716.62
7.4.20.0220.00616.97
7.4.10.0150.01516.98
7.4.00.0050.01616.00
7.3.330.0030.00313.61
7.3.320.0060.00013.59
7.3.310.0000.00816.84
7.3.300.0040.00416.74
7.3.290.0030.00516.69
7.3.280.0070.01316.78
7.3.270.0160.00317.40
7.3.260.0140.00916.67
7.3.250.0150.00616.97
7.3.240.0090.01016.89
7.3.230.0230.00316.85
7.3.210.0100.01016.65
7.3.200.0090.00916.73
7.3.190.0120.01216.66
7.3.180.0180.00716.89
7.3.170.0140.01016.79
7.3.160.0100.01216.78
7.3.150.0220.00817.09
7.3.140.0150.01517.04
7.3.130.0210.01316.89
7.3.120.0080.01916.82
7.3.110.0200.00716.89
7.3.100.0140.00616.60
7.3.90.0130.00817.02
7.3.80.0100.01116.80
7.3.70.0140.01116.58
7.3.60.0130.01316.75
7.3.50.0160.00816.72
7.3.40.0120.01216.53
7.3.30.0150.00916.69
7.3.20.0100.01416.70
7.3.10.0120.00716.88
7.3.00.0060.01216.75
7.2.330.0100.01817.00
7.2.320.0100.01017.00
7.2.310.0130.01116.95
7.2.300.0100.01216.79
7.2.290.0100.01116.84
7.2.280.0240.00516.81
7.2.270.0150.01816.70
7.2.260.0190.00916.96
7.2.250.0210.00817.09
7.2.240.0080.01916.84
7.2.230.0130.00716.94
7.2.220.0080.01316.89
7.2.210.0130.01016.73
7.2.200.0150.01216.52
7.2.190.0140.01216.93
7.2.180.0230.00416.75
7.2.170.0040.01916.94
7.2.160.0100.01316.82
7.2.150.0190.00816.88
7.2.140.0230.00316.95
7.2.130.0090.01017.10
7.2.120.0060.01117.01
7.2.110.0170.00517.14
7.2.100.0110.00917.10
7.2.90.0090.00816.90
7.2.80.0120.00917.03
7.2.70.0140.01017.02
7.2.60.0070.01216.96
7.2.50.0120.01117.06
7.2.40.0130.00616.99
7.2.30.0190.01217.04
7.2.20.0140.01016.95
7.2.10.0090.01217.07
7.2.00.0080.00917.67
7.1.330.0100.01615.84
7.1.320.0090.00915.96
7.1.310.0230.00815.76
7.1.300.0200.00415.82
7.1.290.0040.01815.76
7.1.280.0090.01315.86
7.1.270.0090.01315.82
7.1.260.0110.01415.65
7.1.250.0060.01215.83
7.1.240.0370.00715.83
7.1.230.0080.01215.80
7.1.220.0160.00815.68
7.1.210.0090.01215.78
7.1.200.0150.00715.94
7.1.190.0080.01315.77
7.1.180.0150.00615.53
7.1.170.0100.01015.79
7.1.160.0140.00715.64
7.1.150.0120.00815.87
7.1.140.0180.00515.89
7.1.130.0170.00615.73
7.1.120.0110.01315.83
7.1.110.0180.00816.09
7.1.100.0120.01117.21
7.1.90.0150.01515.97
7.1.80.0190.01115.94
7.1.70.0190.00716.69
7.1.60.0240.01125.35
7.1.50.0220.01225.22
7.1.40.0160.01625.13
7.1.30.0460.00825.10
7.1.20.0230.01225.20
7.1.10.0110.01116.39
7.1.00.0100.01716.54
7.0.330.0050.01615.54
7.0.320.0120.00915.27
7.0.310.0120.00915.55
7.0.300.0050.01515.52
7.0.290.0120.00915.32
7.0.280.0140.00915.42
7.0.270.0130.00815.51
7.0.260.0150.00615.57
7.0.250.0180.00915.78
7.0.240.0140.01415.79
7.0.230.0200.00715.72
7.0.220.0250.00415.69
7.0.210.0190.01215.45
7.0.200.0390.00716.14
7.0.190.0120.00916.36
7.0.180.0120.01216.09
7.0.170.0140.00716.14
7.0.160.0110.01216.24
7.0.150.0160.01116.13
7.0.140.0150.00816.20
7.0.130.0130.01016.26
7.0.120.0130.01016.30
7.0.110.0060.01816.19
7.0.100.0160.00916.11
7.0.90.0150.00916.15
7.0.80.0090.01216.04
7.0.70.0210.01315.17
7.0.60.0100.01216.09
7.0.50.0340.00516.09
7.0.40.0180.00516.15
7.0.30.0110.01516.11
7.0.20.0090.01216.24
7.0.10.0130.01216.22
7.0.00.0100.01416.20
5.6.400.0100.00815.49
5.6.390.0110.00815.71
5.6.380.0110.01115.51
5.6.370.0070.01515.47
5.6.360.0150.00715.35
5.6.350.0070.01515.38
5.6.340.0090.01215.99
5.6.330.0090.01415.57
5.6.320.0150.01215.65
5.6.310.0110.01715.60
5.6.300.0250.00415.62
5.6.290.0170.01115.62
5.6.280.0200.00715.86
5.6.270.0210.00715.81
5.6.260.0240.00415.47
5.6.250.0380.00015.82
5.6.240.0110.01915.48
5.6.230.0150.01015.77
5.6.220.0270.00015.95
5.6.210.0160.00815.55
5.6.200.0160.00815.68
5.6.190.0110.01315.66
5.6.180.0130.01315.55
5.6.170.0190.00615.94
5.6.160.0240.00015.63
5.6.150.0060.01915.50
5.6.140.0200.00815.57
5.6.130.0180.00915.61
5.6.120.0170.00815.95
5.6.110.0190.00815.59
5.6.100.0160.01015.70
5.6.90.0120.01215.63
5.6.80.0210.00415.48
5.6.70.0090.01715.59
5.6.60.0150.01115.55
5.6.50.0190.00815.68
5.6.40.0190.00615.73
5.6.30.0170.00915.75
5.6.20.0210.00415.43
5.6.10.0180.00715.73
5.6.00.0180.00715.61

preferences:
43.64 ms | 401 KiB | 5 Q