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); var_dump($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.70.0070.01718.55
8.3.60.0110.00416.75
8.3.50.0120.00316.54
8.3.40.0170.00018.85
8.3.30.0090.00618.88
8.3.20.0040.00420.13
8.3.10.0030.00821.91
8.3.00.0080.00019.38
8.2.180.0090.00618.29
8.2.170.0170.00322.96
8.2.160.0140.00020.30
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.24
8.2.120.0060.00326.35
8.2.110.0070.00322.20
8.2.100.0080.00417.84
8.2.90.0080.00019.16
8.2.80.0030.00617.97
8.2.70.0000.00817.88
8.2.60.0040.00418.05
8.2.50.0030.00618.10
8.2.40.0050.00220.55
8.2.30.0000.00821.02
8.2.20.0030.00518.02
8.2.10.0070.00018.05
8.2.00.0030.00618.07
8.1.280.0070.01425.92
8.1.270.0040.00423.82
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.69
8.1.230.0080.00417.77
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0060.00317.23
8.1.180.0050.00318.10
8.1.170.0000.00818.88
8.1.160.0000.00719.06
8.1.150.0070.00020.71
8.1.140.0000.00919.66
8.1.130.0040.00418.85
8.1.120.0040.00417.61
8.1.110.0070.00417.59
8.1.100.0000.00717.52
8.1.90.0060.00317.64
8.1.80.0080.00017.67
8.1.70.0000.00717.45
8.1.60.0000.00817.68
8.1.50.0030.00617.73
8.1.40.0030.00517.68
8.1.30.0030.00617.66
8.1.20.0040.00417.86
8.1.10.0040.00417.77
8.1.00.0050.00317.73
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0030.00318.42
8.0.270.0070.00017.30
8.0.260.0030.00517.00
8.0.250.0030.00316.98
8.0.240.0040.00417.14
8.0.230.0070.00017.14
8.0.220.0030.00316.94
8.0.210.0040.00417.07
8.0.200.0060.00017.16
8.0.190.0050.00317.01
8.0.180.0030.00516.99
8.0.170.0000.00817.09
8.0.160.0060.00317.10
8.0.150.0040.00417.07
8.0.140.0000.00817.01
8.0.130.0000.00513.49
8.0.120.0040.00416.96
8.0.110.0040.00417.10
8.0.100.0000.00716.93
8.0.90.0040.00416.90
8.0.80.0090.00917.12
8.0.70.0040.00417.11
8.0.60.0000.00717.13
8.0.50.0050.00316.91
8.0.30.0090.00917.38
8.0.20.0100.00817.45
8.0.10.0000.00717.25
8.0.00.0120.01216.85
7.4.330.0070.00015.55
7.4.320.0060.00016.82
7.4.300.0060.00016.83
7.4.290.0040.00416.73
7.4.280.0030.00616.74
7.4.270.0040.00416.79
7.4.260.0070.00016.81
7.4.250.0030.00316.78
7.4.240.0050.00216.76
7.4.230.0000.00716.95
7.4.220.0130.00616.80
7.4.210.0090.00616.88
7.4.200.0000.00816.64
7.4.160.0060.01016.71
7.4.150.0110.00617.40
7.4.140.0100.01017.86
7.4.130.0090.00916.71
7.4.120.0170.00716.81
7.4.110.0080.00916.83
7.4.100.0210.00716.63
7.4.90.0100.00716.59
7.4.80.0090.00919.39
7.4.70.0050.01316.89
7.4.60.0110.00616.64
7.4.50.0060.00916.60
7.4.40.0100.00716.63
7.4.30.0090.00816.80
7.4.00.0080.00815.21
7.3.330.0000.00513.49
7.3.320.0050.00013.62
7.3.310.0040.00416.39
7.3.300.0030.00316.46
7.3.290.0040.00416.54
7.3.280.0100.00716.52
7.3.270.0060.01217.40
7.3.260.0070.01116.71
7.3.250.0100.01116.50
7.3.240.0160.00816.84
7.3.230.0070.01716.88
7.3.210.0060.00916.53
7.3.200.0160.00416.73
7.3.190.0070.01016.81
7.3.180.0090.00616.80
7.3.170.0140.00316.56
7.3.160.0090.00616.59
7.2.330.0120.00916.62
7.2.320.0060.01516.86
7.2.310.0090.00916.89
7.2.300.0130.00316.76
7.2.290.0060.01016.72
7.2.60.0080.00817.07
7.2.00.0000.01619.59
7.1.200.0150.00016.17
7.1.100.0060.00618.09
7.1.70.0060.00917.59
7.1.60.0190.02235.29
7.1.50.0200.01635.17
7.1.40.0190.01334.70
7.1.30.0310.01234.68
7.1.20.0200.02034.73
7.1.10.0070.01316.70
7.1.00.0060.01316.84
7.0.200.0100.00716.96
7.0.190.0070.01016.95
7.0.180.0070.01116.61
7.0.170.0100.01016.50
7.0.160.0070.01416.44
7.0.150.0060.01016.36
7.0.140.0060.00916.78
7.0.130.0130.00616.89
7.0.120.0100.00716.73
7.0.110.0120.00916.51
7.0.100.0090.00916.21
7.0.90.0100.01016.45
7.0.80.0100.01016.58
7.0.70.0040.01116.52
7.0.60.0060.00916.31
7.0.50.0110.00616.41
7.0.40.0120.00916.66
7.0.30.0080.01216.75
7.0.20.0070.01016.59
7.0.10.0040.01416.61
7.0.00.0150.01116.63

preferences:
55.02 ms | 401 KiB | 5 Q