3v4l.org

run code in 300+ PHP versions simultaneously
<?php function toUpperCamelCase(string $text): string { $replacement = ""; $text = delete_all_between('(', ')', $text); $text = str_replace([" de ", " la ", " l'", " et "], ' ', $text); $text = ucwords($text); $text = preg_replace('~[^\pL\d]+~u', $replacement, $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $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.0180.00017.00
8.3.50.0110.00416.65
8.3.40.0060.01219.05
8.3.30.0120.00318.99
8.3.20.0080.00020.20
8.3.10.0040.00421.90
8.3.00.0040.00417.75
8.2.180.0060.01318.91
8.2.170.0060.01222.96
8.2.160.0140.00020.64
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.13
8.2.120.0040.00426.35
8.2.110.0050.00519.31
8.2.100.0120.00018.16
8.2.90.0040.00418.28
8.2.80.0060.00617.97
8.2.70.0060.00318.05
8.2.60.0030.00618.13
8.2.50.0000.00818.16
8.2.40.0050.00320.52
8.2.30.0040.00421.11
8.2.20.0000.00818.20
8.2.10.0000.00818.26
8.2.00.0000.00718.30
8.1.280.0100.01025.92
8.1.270.0040.00422.06
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0000.00922.21
8.1.230.0060.00622.74
8.1.220.0000.00917.90
8.1.210.0030.00618.77
8.1.200.0040.00717.61
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0000.00818.96
8.1.160.0000.00819.21
8.1.150.0070.00019.06
8.1.140.0030.00719.76
8.1.130.0000.00719.02
8.1.120.0080.00017.67
8.1.110.0050.00517.66
8.1.100.0000.00817.66
8.1.90.0040.00417.60
8.1.80.0000.00817.65
8.1.70.0040.00417.61
8.1.60.0080.00017.72
8.1.50.0040.00417.71
8.1.40.0040.00417.70
8.1.30.0030.00617.87
8.1.20.0040.00417.88
8.1.10.0060.00317.82
8.1.00.0000.00817.73
8.0.300.0050.00520.07
8.0.290.0080.00017.13
8.0.280.0030.00518.58
8.0.270.0000.00717.46
8.0.260.0030.00317.02
8.0.250.0030.00317.32
8.0.240.0030.00617.18
8.0.230.0000.00917.25
8.0.220.0070.00017.12
8.0.210.0000.00817.22
8.0.200.0000.00717.14
8.0.190.0000.00817.25
8.0.180.0030.00717.25
8.0.170.0000.00817.07
8.0.160.0040.00717.20
8.0.150.0000.00717.20
8.0.140.0070.00017.09
8.0.130.0060.00013.76
8.0.120.0090.00017.32
8.0.110.0040.00417.17
8.0.100.0060.00317.18
8.0.90.0050.00517.38
8.0.80.0100.01017.32
8.0.70.0070.00317.46
8.0.60.0000.01017.39
8.0.50.0090.00017.22
8.0.30.0080.01217.48
8.0.20.0100.01317.49
8.0.10.0000.01017.47
8.0.00.0060.01317.12
7.4.330.0000.00715.55
7.4.320.0030.00316.84
7.4.300.0050.00216.76
7.4.290.0000.00816.88
7.4.280.0030.00616.90
7.4.270.0070.00016.85
7.4.260.0030.00516.91
7.4.250.0040.00816.94
7.4.240.0040.00416.93
7.4.230.0040.00417.07
7.4.220.0030.01917.13
7.4.210.0090.01117.15
7.4.200.0030.00617.04
7.4.160.0050.01316.89
7.4.150.0100.01317.40
7.4.140.0120.01017.86
7.4.130.0140.00916.96
7.4.120.0130.01116.89
7.4.110.0110.00816.95
7.4.100.0100.01016.93
7.4.90.0150.01217.07
7.4.80.0130.01019.39
7.4.70.0170.00916.95
7.4.60.0130.01016.79
7.4.50.0130.01016.86
7.4.40.0160.01216.86
7.4.30.0190.01017.20
7.4.20.0220.00616.99
7.4.10.0200.00816.92
7.4.00.0070.01215.90
7.3.330.0040.00413.63
7.3.320.0000.00513.54
7.3.310.0000.00916.74
7.3.300.0000.00816.71
7.3.290.0100.00816.77
7.3.280.0100.01116.76
7.3.270.0110.00817.40
7.3.260.0150.01216.85
7.3.250.0090.01416.75
7.3.240.0070.01516.86
7.3.230.0130.00716.75
7.3.210.0040.01516.74
7.3.200.0090.00916.88
7.3.190.0180.00616.68
7.3.180.0190.00716.91
7.3.170.0130.01116.95
7.3.160.0160.00916.81
7.3.150.0190.01016.77
7.3.140.0180.01116.70
7.3.130.0070.02117.01
7.3.120.0080.01815.88
7.3.110.0130.01316.10
7.3.100.0130.01115.81
7.3.90.0160.00716.10
7.3.80.0140.00815.98
7.3.70.0100.01216.03
7.3.60.0120.01116.07
7.3.50.0150.00615.89
7.3.40.0140.00816.05
7.3.30.0100.01216.01
7.3.20.0130.01116.97
7.3.10.0100.01516.83
7.3.00.0200.00417.05
7.2.330.0060.01516.94
7.2.320.0120.01217.09
7.2.310.0150.00916.92
7.2.300.0130.01616.97
7.2.290.0180.00816.85
7.2.280.0190.01316.97
7.2.270.0180.01317.09
7.2.260.0100.01716.88
7.2.250.0160.01116.23
7.2.240.0120.01416.21
7.2.230.0130.01016.14
7.2.220.0120.01316.22
7.2.210.0130.00916.24
7.2.200.0130.00816.17
7.2.190.0140.01416.09
7.2.180.0150.00916.22
7.2.170.0130.01116.18
7.2.160.0230.00716.94
7.2.150.0200.01316.86
7.2.140.0170.01317.09
7.2.130.0490.00316.93
7.2.120.0200.01016.86
7.2.110.0150.01516.84
7.2.100.0220.00817.02
7.2.90.0250.00616.82
7.2.80.0120.00916.96
7.2.70.0260.00417.07
7.2.60.0110.01217.05
7.2.50.0180.01216.94
7.2.40.0160.01316.85
7.2.30.0200.01016.99
7.2.20.0140.01416.96
7.2.10.0270.00316.88
7.2.00.0060.01118.19
7.1.330.0270.01215.77
7.1.320.0060.01516.05
7.1.310.0130.00916.20
7.1.300.0100.01316.08
7.1.290.0150.00616.15
7.1.280.0100.01416.02
7.1.270.0150.00916.02
7.1.260.0140.00915.97
7.1.250.0130.01715.98
7.1.240.0150.01215.86
7.1.230.0180.01115.91
7.1.220.0160.01315.80
7.1.210.0240.00515.96
7.1.200.0130.00915.98
7.1.190.0220.01015.94
7.1.180.0180.00915.85
7.1.170.0110.01715.88
7.1.160.0190.00815.99
7.1.150.0200.00715.74
7.1.140.0170.01015.98
7.1.130.0400.00015.91
7.1.120.0190.01015.88
7.1.110.0170.01315.91
7.1.100.0160.00817.34
7.1.90.0160.01115.94
7.1.80.0220.00716.00
7.1.70.0290.01015.87
7.1.60.0210.01225.22
7.1.50.0290.01124.40
7.1.40.0240.01524.29
7.1.30.0250.01625.06
7.1.20.0470.00824.43
7.1.10.0140.01016.41
7.1.00.0130.01416.39
7.0.330.0250.00415.54
7.0.320.0370.01015.53
7.0.310.0140.01415.54
7.0.300.0150.01215.71
7.0.290.0110.01615.76
7.0.280.0160.01015.54
7.0.270.0260.01815.67
7.0.260.0120.01315.52
7.0.250.0150.00915.54
7.0.240.0270.00015.66
7.0.230.0100.01715.68
7.0.220.0190.00815.57
7.0.210.0200.00815.45
7.0.200.0110.01216.39
7.0.190.0150.01216.39
7.0.180.0290.01215.18
7.0.170.0370.01215.31
7.0.160.0180.01316.05
7.0.150.0150.00716.17
7.0.140.0210.00716.14
7.0.130.0350.01316.29
7.0.120.0120.01516.11
7.0.110.0120.01116.09
7.0.100.0140.00916.07
7.0.90.0200.01116.18
7.0.80.0180.00716.13
7.0.70.0160.01016.21
7.0.60.0190.00316.01
7.0.50.0270.01016.22
7.0.40.0140.01016.24
7.0.30.0100.01716.24
7.0.20.0390.00916.10
7.0.10.0150.01116.14
7.0.00.0280.00916.15
5.6.400.0210.00715.80
5.6.390.0180.00915.64
5.6.380.0180.00915.91
5.6.370.0140.01215.89
5.6.360.0220.00415.64
5.6.350.0130.01315.75
5.6.340.0110.01516.03
5.6.330.0160.01015.96
5.6.320.0190.00815.70
5.6.310.0200.01015.63
5.6.300.0220.00615.73
5.6.290.0220.00515.85
5.6.280.0150.01215.66
5.6.270.0190.00915.76
5.6.260.0220.00415.80
5.6.250.0200.00815.83
5.6.240.0150.01115.63
5.6.230.0250.00615.92
5.6.220.0200.00815.74
5.6.210.0230.00615.66
5.6.200.0120.01515.68
5.6.190.0190.00815.43
5.6.180.0090.01815.77
5.6.170.0190.00815.55
5.6.160.0160.01115.63
5.6.150.0180.00715.65
5.6.140.0200.01715.64
5.6.130.0160.02015.59
5.6.120.0090.01615.38
5.6.110.0220.00615.69
5.6.100.0180.00615.75
5.6.90.0140.01415.50
5.6.80.0120.01615.31
5.6.70.0180.00715.74
5.6.60.0050.02015.68
5.6.50.0210.00415.76
5.6.40.0170.01115.58
5.6.30.0260.00015.57
5.6.20.0230.00315.59
5.6.10.0200.00715.55
5.6.00.0260.00015.61

preferences:
42.45 ms | 401 KiB | 5 Q