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.0120.00317.00
8.3.50.0090.00616.88
8.3.40.0110.00719.11
8.3.30.0080.00818.97
8.3.20.0040.00420.47
8.3.10.0070.00321.73
8.3.00.0080.00019.54
8.2.180.0060.00918.71
8.2.170.0070.00722.96
8.2.160.0120.00320.42
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00821.25
8.2.120.0040.00426.35
8.2.110.0060.00320.47
8.2.100.0090.00318.09
8.2.90.0050.00318.14
8.2.80.0000.00818.16
8.2.70.0080.00017.93
8.2.60.0050.00518.05
8.2.50.0030.00518.10
8.2.40.0000.00820.54
8.2.30.0040.00420.95
8.2.20.0050.00218.08
8.2.10.0080.00018.11
8.2.00.0040.00418.11
8.1.280.0040.01125.92
8.1.270.0050.00323.92
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0110.00723.86
8.1.230.0080.00422.27
8.1.220.0090.00017.91
8.1.210.0060.00318.77
8.1.200.0040.00417.60
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0000.00919.01
8.1.160.0000.00719.00
8.1.150.0000.00820.71
8.1.140.0070.00319.70
8.1.130.0070.00019.01
8.1.120.0040.00417.72
8.1.110.0030.00717.63
8.1.100.0000.00717.75
8.1.90.0040.00417.71
8.1.80.0050.00217.65
8.1.70.0000.00717.57
8.1.60.0030.00617.79
8.1.50.0040.00417.72
8.1.40.0030.00617.75
8.1.30.0030.00617.84
8.1.20.0000.00917.83
8.1.10.0030.00517.79
8.1.00.0000.00917.63
8.0.300.0000.00819.97
8.0.290.0040.00417.13
8.0.280.0070.00018.43
8.0.270.0000.00717.38
8.0.260.0050.00317.08
8.0.250.0000.00717.35
8.0.240.0040.00417.21
8.0.230.0000.00717.32
8.0.220.0030.00317.21
8.0.210.0040.00417.26
8.0.200.0040.00417.24
8.0.190.0040.00417.18
8.0.180.0040.00417.25
8.0.170.0050.00217.23
8.0.160.0050.00317.28
8.0.150.0000.00817.14
8.0.140.0050.00217.11
8.0.130.0060.00013.55
8.0.120.0030.00617.23
8.0.110.0000.00917.32
8.0.100.0060.00317.24
8.0.90.0060.00317.32
8.0.80.0070.01117.33
8.0.70.0000.00917.41
8.0.60.0040.00417.32
8.0.50.0030.00617.39
8.0.30.0130.00617.48
8.0.20.0100.01217.46
8.0.10.0040.00417.46
8.0.00.0070.01317.25
7.4.330.0070.00015.55
7.4.320.0040.00416.79
7.4.300.0030.00316.75
7.4.290.0000.00716.86
7.4.280.0040.00416.77
7.4.270.0030.00516.70
7.4.260.0030.00816.71
7.4.250.0040.00417.01
7.4.240.0060.00316.99
7.4.230.0030.00616.82
7.4.220.0100.01316.90
7.4.210.0040.01316.99
7.4.200.0040.00417.03
7.4.160.0090.00817.02
7.4.150.0140.01217.40
7.4.140.0110.01317.86
7.4.130.0120.00916.82
7.4.120.0120.00816.94
7.4.110.0140.01016.78
7.4.100.0130.00616.95
7.4.90.0090.00916.88
7.4.80.0120.00619.39
7.4.70.0200.00516.98
7.4.60.0150.00916.88
7.4.50.0070.01516.88
7.4.40.0150.01616.82
7.4.30.0130.02016.94
7.4.20.0320.00817.11
7.4.10.0190.01116.19
7.4.00.0070.01215.76
7.3.330.0000.00513.57
7.3.320.0050.00013.44
7.3.310.0000.00816.88
7.3.300.0030.00616.70
7.3.290.0000.00816.87
7.3.280.0100.01016.82
7.3.270.0000.01917.40
7.3.260.0100.01017.04
7.3.250.0130.00816.77
7.3.240.0150.01117.00
7.3.230.0100.01016.91
7.3.210.0060.01216.76
7.3.200.0110.01116.68
7.3.190.0150.01316.91
7.3.180.0150.00916.77
7.3.170.0160.00916.87
7.3.160.0110.01216.91
7.3.150.0160.02116.84
7.3.140.0330.00716.98
7.3.130.0160.01415.97
7.3.120.0150.01016.08
7.3.110.0150.01116.02
7.3.100.0120.01615.99
7.3.90.0140.01116.17
7.3.80.0080.00816.06
7.3.70.0060.01415.98
7.3.60.0050.01416.10
7.3.50.0100.00815.89
7.3.40.0100.01416.05
7.3.30.0080.01515.96
7.3.20.0140.00916.95
7.3.10.0100.00816.94
7.3.00.0050.01017.04
7.2.330.0040.01716.98
7.2.320.0060.01616.89
7.2.310.0180.00916.82
7.2.300.0080.01316.95
7.2.290.0110.01316.92
7.2.280.0320.01117.07
7.2.270.0200.02016.97
7.2.260.0180.01216.17
7.2.250.0170.01416.05
7.2.240.0220.00816.27
7.2.230.0160.01316.11
7.2.220.0150.00816.22
7.2.210.0100.00716.03
7.2.200.0090.01116.07
7.2.190.0110.01116.21
7.2.180.0140.00916.06
7.2.170.0090.01616.09
7.2.160.0090.01016.04
7.2.150.0120.01217.13
7.2.140.0110.01117.16
7.2.130.0110.00717.16
7.2.120.0110.00717.04
7.2.110.0120.00717.02
7.2.100.0090.00917.14
7.2.90.0070.01117.19
7.2.80.0060.01117.19
7.2.70.0090.00617.21
7.2.60.0080.00917.13
7.2.50.0060.01117.11
7.2.40.0080.00917.09
7.2.30.0060.01117.20
7.2.20.0060.01317.20
7.2.10.0090.01017.18
7.2.00.0070.01117.62
7.1.330.0160.00715.92
7.1.320.0130.01016.03
7.1.310.0090.00815.94
7.1.300.0070.01016.09
7.1.290.0120.01115.87
7.1.280.0100.01215.93
7.1.270.0090.00815.93
7.1.260.0090.01215.91
7.1.250.0100.00916.06
7.1.240.0160.01316.04
7.1.230.0110.00816.11
7.1.220.0100.00816.01
7.1.210.0080.00915.88
7.1.200.0060.01016.05
7.1.190.0060.00915.92
7.1.180.0070.01015.93
7.1.170.0080.01015.90
7.1.160.0080.01116.09
7.1.150.0120.00816.13
7.1.140.0110.00616.13
7.1.130.0050.00916.05
7.1.120.0050.01215.98
7.1.110.0080.00816.08
7.1.100.0080.01116.66
7.1.90.0060.00816.06
7.1.80.0080.00816.19
7.1.70.0090.00916.33
7.1.60.0120.01320.61
7.1.50.0200.01220.75
7.1.40.0090.01120.62
7.1.30.0110.01020.59
7.1.20.0120.00920.67
7.1.10.0080.01216.17
7.1.00.0100.00916.30
7.0.330.0090.01015.51
7.0.320.0070.01015.55
7.0.310.0070.00815.72
7.0.300.0080.00815.64
7.0.290.0040.01215.70
7.0.280.0050.01115.76
7.0.270.0080.00715.54
7.0.260.0100.00615.70
7.0.250.0060.01015.64
7.0.240.0070.00815.69
7.0.230.0070.01015.79
7.0.220.0070.00915.62
7.0.210.0070.00915.83
7.0.200.0060.01116.04
7.0.190.0100.00816.05
7.0.180.0080.00915.95
7.0.170.0060.01115.95
7.0.160.0070.01115.84
7.0.150.0060.01115.89
7.0.140.0050.01315.89
7.0.130.0060.01115.85
7.0.120.0080.00916.00
7.0.110.0080.00915.94
7.0.100.0050.01215.93
7.0.90.0080.00915.86
7.0.80.0080.01215.84
7.0.70.0060.01115.88
7.0.60.0090.00815.77
7.0.50.0090.00715.90
7.0.40.0090.00814.86
7.0.30.0080.01415.00
7.0.20.0080.00814.86
7.0.10.0080.01114.91
7.0.00.0110.00914.86
5.6.400.0100.00715.02
5.6.390.0140.00515.14
5.6.380.0100.00614.44
5.6.370.0080.00714.99
5.6.360.0050.00914.96
5.6.350.0050.01114.91
5.6.340.0060.01115.00
5.6.330.0040.01114.84
5.6.320.0020.01414.91
5.6.310.0110.00614.73
5.6.300.0110.00714.92
5.6.290.0060.01314.52
5.6.280.0100.00514.90
5.6.270.0090.00914.94
5.6.260.0050.01314.89
5.6.250.0090.00614.74
5.6.240.0140.00514.95
5.6.230.0110.00914.76
5.6.220.0150.00414.78
5.6.210.0070.00914.93
5.6.200.0110.00814.96
5.6.190.0100.01014.95
5.6.180.0120.00614.92
5.6.170.0040.01314.99
5.6.160.0130.01015.00
5.6.150.0140.00814.77
5.6.140.0070.01314.78
5.6.130.0130.00414.95
5.6.120.0100.00614.74
5.6.110.0100.00414.80
5.6.100.0130.00714.69
5.6.90.0090.00614.72
5.6.80.0060.01114.61
5.6.70.0090.00714.67
5.6.60.0110.00514.71
5.6.50.0070.01014.63
5.6.40.0120.00714.84
5.6.30.0030.01514.81
5.6.20.0070.01114.65
5.6.10.0100.00814.59
5.6.00.0140.00514.70

preferences:
47.22 ms | 401 KiB | 5 Q