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.0110.00416.73
8.3.50.0070.00716.40
8.3.40.0100.00719.22
8.3.30.0060.00919.04
8.3.20.0040.00420.17
8.3.10.0070.00421.89
8.3.00.0060.00319.63
8.2.180.0120.00318.48
8.2.170.0110.01122.96
8.2.160.0120.00320.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00721.17
8.2.120.0040.00426.35
8.2.110.0060.00322.16
8.2.100.0000.01118.28
8.2.90.0000.00819.20
8.2.80.0000.00818.29
8.2.70.0030.00618.00
8.2.60.0030.00518.05
8.2.50.0090.00018.10
8.2.40.0050.00320.31
8.2.30.0000.00820.95
8.2.20.0000.00718.11
8.2.10.0000.00718.19
8.2.00.0060.00318.24
8.1.280.0040.01125.92
8.1.270.0080.00323.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.98
8.1.230.0040.00717.82
8.1.220.0050.00317.91
8.1.210.0060.00318.77
8.1.200.0000.01017.48
8.1.190.0000.00817.48
8.1.180.0030.00618.10
8.1.170.0040.00419.00
8.1.160.0000.00719.09
8.1.150.0040.00420.63
8.1.140.0000.00819.62
8.1.130.0000.00718.97
8.1.120.0000.00717.68
8.1.110.0090.00017.63
8.1.100.0060.00317.70
8.1.90.0060.00317.55
8.1.80.0000.00717.54
8.1.70.0000.00817.69
8.1.60.0030.00517.75
8.1.50.0030.00617.73
8.1.40.0000.00817.60
8.1.30.0000.00817.95
8.1.20.0000.00817.87
8.1.10.0000.00817.81
8.1.00.0040.00417.61
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0070.00018.55
8.0.270.0080.00017.25
8.0.260.0070.00017.15
8.0.250.0040.00417.22
8.0.240.0040.00417.27
8.0.230.0070.00017.27
8.0.220.0030.00317.16
8.0.210.0070.00017.25
8.0.200.0070.00017.30
8.0.190.0060.00317.28
8.0.180.0030.00517.25
8.0.170.0030.00517.20
8.0.160.0050.00217.32
8.0.150.0030.00517.12
8.0.140.0040.00417.16
8.0.130.0030.00313.57
8.0.120.0050.00517.29
8.0.110.0090.00017.39
8.0.100.0090.00017.23
8.0.90.0000.00917.39
8.0.80.0100.01017.24
8.0.70.0060.00317.29
8.0.60.0070.00317.34
8.0.50.0000.01017.34
8.0.30.0070.01317.58
8.0.20.0110.01117.48
8.0.10.0060.00317.42
8.0.00.0030.01617.14
7.4.330.0080.00015.55
7.4.320.0030.00316.92
7.4.300.0030.00316.78
7.4.290.0080.00016.78
7.4.280.0000.01016.66
7.4.270.0000.00716.93
7.4.260.0070.00316.80
7.4.250.0040.00416.86
7.4.240.0060.00317.01
7.4.230.0040.00417.03
7.4.220.0180.00316.91
7.4.210.0030.01317.02
7.4.200.0040.00416.88
7.4.160.0140.01016.96
7.4.150.0110.01117.40
7.4.140.0110.01317.86
7.4.130.0120.00916.98
7.4.120.0130.00917.06
7.4.110.0170.00716.99
7.4.100.0110.01116.98
7.4.90.0140.00616.99
7.4.80.0090.00919.39
7.4.70.0130.00716.89
7.4.60.0110.00816.93
7.4.50.0060.01316.83
7.4.40.0110.00816.89
7.4.30.0030.01716.76
7.4.20.0070.01116.70
7.4.10.0060.01116.11
7.4.00.0080.01115.84
7.3.330.0050.00013.57
7.3.320.0050.00013.62
7.3.310.0000.00816.81
7.3.300.0000.00916.75
7.3.290.0030.00616.70
7.3.280.0080.01116.77
7.3.270.0070.01517.40
7.3.260.0140.00616.64
7.3.250.0120.01016.81
7.3.240.0090.01116.72
7.3.230.0120.01217.01
7.3.210.0090.00916.88
7.3.200.0060.01316.89
7.3.190.0110.01016.90
7.3.180.0150.00616.81
7.3.170.0090.01316.80
7.3.160.0050.01516.89
7.3.150.0160.00416.65
7.3.140.0070.01316.87
7.3.130.0110.01016.19
7.3.120.0100.01115.89
7.3.110.0070.01415.90
7.3.100.0090.01416.14
7.3.90.0050.01716.00
7.3.80.0110.01015.93
7.3.70.0100.00716.00
7.3.60.0100.00815.85
7.3.50.0040.01215.91
7.3.40.0130.00515.84
7.3.30.0100.00716.02
7.3.20.0090.00817.79
7.3.10.0070.01117.52
7.3.00.0100.00917.65
7.2.330.0080.01316.96
7.2.320.0080.01216.94
7.2.310.0080.01216.97
7.2.300.0120.01117.02
7.2.290.0110.01016.86
7.2.280.0080.01216.98
7.2.270.0100.01016.98
7.2.260.0130.00716.15
7.2.250.0060.01316.14
7.2.240.0100.00816.17
7.2.230.0110.01116.27
7.2.220.0110.01216.11
7.2.210.0060.01316.07
7.2.200.0100.00616.05
7.2.190.0050.01316.19
7.2.180.0100.00816.21
7.2.170.0070.01216.08
7.2.160.0080.01116.14
7.2.150.0070.01217.94
7.2.140.0080.01317.87
7.2.130.0100.01117.77
7.2.120.0100.00917.79
7.2.110.0060.01217.65
7.2.100.0050.01417.61
7.2.90.0050.01317.66
7.2.80.0090.00917.75
7.2.70.0040.01317.81
7.2.60.0090.00917.66
7.2.50.0100.00817.82
7.2.40.0090.01017.74
7.2.30.0080.01217.72
7.2.20.0050.01417.83
7.2.10.0080.00917.79
7.2.00.0070.01017.67
7.1.330.0080.00917.09
7.1.320.0090.01116.91
7.1.310.0060.00916.83
7.1.300.0020.01416.80
7.1.290.0110.00816.98
7.1.280.0060.01316.92
7.1.270.0080.01016.93
7.1.260.0090.01016.95
7.1.250.0040.01316.52
7.1.240.0040.01416.82
7.1.230.0070.01316.85
7.1.220.0090.01416.85
7.1.210.0060.01216.90
7.1.200.0060.00816.49
7.1.190.0070.01016.71
7.1.180.0030.01616.84
7.1.170.0070.01016.71
7.1.160.0130.00616.95
7.1.150.0090.00816.74
7.1.140.0090.00716.97
7.1.130.0070.01016.83
7.1.120.0070.01216.74
7.1.110.0060.01016.91
7.1.100.0060.01215.90
7.1.90.0120.00916.96
7.1.80.0110.00816.95
7.1.70.0050.00916.98
7.1.60.0100.00617.25
7.1.50.0050.01117.04
7.1.40.0070.01016.85
7.1.30.0070.00817.00
7.1.20.0060.01117.00
7.1.10.0060.00816.93
7.1.00.0060.01116.93
7.0.330.0060.01216.38
7.0.320.0120.00616.42
7.0.310.0130.00616.39
7.0.300.0060.01116.58
7.0.290.0140.01015.54
7.0.280.0070.00816.55
7.0.270.0060.01416.56
7.0.260.0110.00916.57
7.0.250.0070.00715.70
7.0.240.0050.01116.60
7.0.230.0050.01616.51
7.0.220.0050.01016.45
7.0.210.0070.01016.59
7.0.200.0050.00716.67
7.0.190.0050.00816.71
7.0.180.0070.00716.60
7.0.170.0030.01016.70
7.0.160.0090.00816.64
7.0.150.0060.00716.48
7.0.140.0050.01216.76
7.0.130.0080.00716.63
7.0.120.0050.00816.58
7.0.110.0050.01116.67
7.0.100.0060.00816.58
7.0.90.0050.00916.67
7.0.80.0030.00916.58
7.0.70.0030.01116.50
7.0.60.0060.00616.44
7.0.50.0080.00816.55
7.0.40.0050.00715.85
7.0.30.0070.00815.93
7.0.20.0040.01015.95
7.0.10.0080.01015.34
7.0.00.0040.01115.94
5.6.400.0060.01015.08
5.6.390.0060.00814.89
5.6.380.0070.01115.00
5.6.370.0100.00514.77
5.6.360.0090.00714.96
5.6.350.0070.00914.90
5.6.340.0050.00914.76
5.6.330.0060.00915.02
5.6.320.0090.00614.83
5.6.310.0070.00814.81
5.6.300.0050.01014.74
5.6.290.0070.01114.67
5.6.280.0050.01114.79
5.6.270.0100.00614.87
5.6.260.0060.00914.77
5.6.250.0130.00314.90
5.6.240.0080.00914.77
5.6.230.0070.00814.87
5.6.220.0060.01115.13
5.6.210.0080.00614.84
5.6.200.0080.00614.90
5.6.190.0070.00714.89
5.6.180.0060.00914.78
5.6.170.0100.00714.98
5.6.160.0060.01114.98
5.6.150.0090.00714.73
5.6.140.0060.01114.84
5.6.130.0070.00714.89
5.6.120.0110.00514.69
5.6.110.0120.00214.81
5.6.100.0050.00814.76
5.6.90.0100.00614.86
5.6.80.0100.00614.77
5.6.70.0070.00914.79
5.6.60.0040.01014.74
5.6.50.0070.00714.85
5.6.40.0040.01114.66
5.6.30.0130.00514.74
5.6.20.0080.00614.83
5.6.10.0040.01214.68
5.6.00.0070.00814.66

preferences:
61.08 ms | 400 KiB | 5 Q