3v4l.org

run code in 300+ PHP versions simultaneously
<?php function toUpperCamelCase($text) { $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', '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($beginning, $end, $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.40.0070.00718.92
8.3.30.0040.01118.96
8.3.20.0060.00320.30
8.3.10.0080.00021.73
8.3.00.0050.00319.63
8.2.170.0040.01122.96
8.2.160.0110.00420.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00021.32
8.2.120.0040.00426.35
8.2.110.0030.00722.33
8.2.100.0080.00418.09
8.2.90.0030.00519.38
8.2.80.0030.00518.05
8.2.70.0000.00817.88
8.2.60.0080.00017.93
8.2.50.0030.00618.10
8.2.40.0000.00820.59
8.2.30.0030.00621.14
8.2.20.0040.00418.06
8.2.10.0000.00918.17
8.2.00.0000.00718.31
8.1.270.0050.00222.22
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0000.00822.09
8.1.230.0080.00319.20
8.1.220.0040.00417.90
8.1.210.0050.00318.77
8.1.200.0090.00017.60
8.1.190.0050.00517.47
8.1.180.0040.00418.10
8.1.170.0030.00519.14
8.1.160.0040.00419.20
8.1.150.0040.00420.63
8.1.140.0110.00019.61
8.1.130.0070.00019.01
8.1.120.0000.00717.64
8.1.110.0070.00317.65
8.1.100.0000.00717.63
8.1.90.0060.00317.70
8.1.80.0000.00717.68
8.1.70.0000.00717.63
8.1.60.0030.00617.75
8.1.50.0060.00317.68
8.1.40.0040.00417.74
8.1.30.0050.00317.79
8.1.20.0040.00417.86
8.1.10.0040.00417.59
8.1.00.0040.00417.52
8.0.300.0030.00518.77
8.0.290.0050.00317.00
8.0.280.0040.00418.56
8.0.270.0030.00317.24
8.0.260.0000.00717.20
8.0.250.0000.00717.34
8.0.240.0000.00917.18
8.0.230.0000.00817.19
8.0.220.0000.00717.15
8.0.210.0030.00317.12
8.0.200.0000.00717.29
8.0.190.0000.00817.32
8.0.180.0040.00417.13
8.0.170.0050.00317.29
8.0.160.0050.00217.12
8.0.150.0040.00417.13
8.0.140.0080.00017.14
8.0.130.0000.00513.56
8.0.120.0040.00417.20
8.0.110.0060.00317.21
8.0.100.0000.00917.43
8.0.90.0060.00317.32
8.0.80.0060.01317.25
8.0.70.0000.01017.33
8.0.60.0030.00617.30
8.0.50.0030.00617.25
8.0.30.0090.01117.45
8.0.20.0110.01117.44
8.0.10.0000.00917.32
8.0.00.0160.00617.14
7.4.330.0030.00315.55
7.4.320.0000.00716.77
7.4.300.0000.00716.82
7.4.290.0000.00716.85
7.4.280.0000.01116.85
7.4.270.0030.00316.80
7.4.260.0030.00316.75
7.4.250.0030.00616.93
7.4.240.0060.00316.99
7.4.230.0030.00616.83
7.4.220.0100.01017.07
7.4.210.0090.00916.97
7.4.200.0080.00016.97
7.4.160.0090.00916.89
7.4.150.0080.01217.40
7.4.140.0110.01217.86
7.4.130.0120.00917.01
7.4.120.0130.00916.94
7.4.110.0110.00816.96
7.4.100.0090.01917.05
7.4.90.0100.01017.09
7.4.80.0140.00619.39
7.4.70.0120.00616.91
7.4.60.0090.01116.83
7.4.50.0090.01016.90
7.4.40.0130.00916.81
7.4.30.0090.00916.70
7.4.20.0060.01216.69
7.4.10.0120.00616.10
7.4.00.0130.00615.85
7.3.330.0050.00013.55
7.3.320.0050.00013.40
7.3.310.0030.00616.71
7.3.300.0030.00616.61
7.3.290.0030.00616.70
7.3.280.0080.01016.77
7.3.270.0180.00617.40
7.3.260.0130.00616.86
7.3.250.0100.01416.81
7.3.240.0070.01916.78
7.3.230.0060.01316.76
7.3.210.0080.01216.50
7.3.200.0140.00616.91
7.3.190.0080.01316.62
7.3.180.0050.01416.68
7.3.170.0050.01516.58
7.3.160.0100.01016.79
7.3.150.0100.01316.49
7.3.140.0100.01316.53
7.3.130.0120.01015.96
7.3.120.0080.01315.72
7.3.110.0070.01115.82
7.3.100.0060.01115.75
7.3.90.0080.01015.82
7.3.80.0090.00916.20
7.3.70.0110.00816.08
7.3.60.0080.01015.96
7.3.50.0060.01416.00
7.3.40.0110.00815.81
7.3.30.0060.01015.73
7.3.20.0140.00616.74
7.3.10.0060.01116.77
7.3.00.0090.00616.58
7.2.330.0150.00616.91
7.2.320.0080.01216.83
7.2.310.0050.01416.84
7.2.300.0060.01616.96
7.2.290.0070.01216.97
7.2.280.0080.01016.62
7.2.270.0030.01516.54
7.2.260.0070.01515.87
7.2.250.0060.01216.20
7.2.240.0070.01316.08
7.2.230.0090.00816.16
7.2.220.0030.01616.02
7.2.210.0110.00816.17
7.2.200.0060.01116.00
7.2.190.0100.00716.22
7.2.180.0070.01416.04
7.2.170.0100.00816.09
7.2.160.0110.00516.06
7.2.150.0070.01517.00
7.2.140.0110.00717.03
7.2.130.0060.01017.01
7.2.120.0080.01116.81
7.2.110.0120.00516.88
7.2.100.0100.00916.97
7.2.90.0060.00816.93
7.2.80.0050.01317.08
7.2.70.0060.01117.02
7.2.60.0080.00817.00
7.2.50.0080.00817.09
7.2.40.0070.01116.91
7.2.30.0050.01416.97
7.2.20.0060.01016.88
7.2.10.0080.01116.92
7.2.00.0070.00917.89
7.1.330.0090.00816.03
7.1.320.0050.01416.09
7.1.310.0050.01116.10
7.1.300.0080.00815.95
7.1.290.0130.00616.16
7.1.280.0080.01115.99
7.1.270.0090.00816.05
7.1.260.0090.00915.87
7.1.250.0060.00815.97
7.1.240.0640.00815.93
7.1.230.0070.00915.80
7.1.220.0100.00615.99
7.1.210.0110.00515.81
7.1.200.0030.01315.98
7.1.190.0090.00715.70
7.1.180.0020.01215.94
7.1.170.0050.00815.89
7.1.160.0120.00615.92
7.1.150.0060.01015.81
7.1.140.0060.01015.87
7.1.130.0040.01216.05
7.1.120.0060.00715.97
7.1.110.0110.00516.03
7.1.100.0090.00916.78
7.1.90.0060.00815.99
7.1.80.0080.00815.94
7.1.70.0090.00916.30
7.1.60.0150.00822.28
7.1.50.0250.01222.23
7.1.40.0090.01222.07
7.1.30.0130.01022.06
7.1.20.0130.01122.16
7.1.10.0060.01216.32
7.1.00.0090.00816.28
7.0.330.0040.01315.50
7.0.320.0100.00615.59
7.0.310.0080.00815.54
7.0.300.0030.01015.74
7.0.290.0060.01115.21
7.0.280.0080.00815.67
7.0.270.0070.00915.44
7.0.260.0110.00315.67
7.0.250.0070.00815.65
7.0.240.0050.00915.56
7.0.230.0080.01015.68
7.0.220.0090.01115.40
7.0.210.0130.00615.57
7.0.200.0100.00616.15
7.0.190.0040.01316.12
7.0.180.0070.01115.97
7.0.170.0050.01316.09
7.0.160.0040.01416.02
7.0.150.0040.01215.93
7.0.140.0070.01115.81
7.0.130.0100.00915.92
7.0.120.0070.01216.06
7.0.110.0060.01115.98
7.0.100.0080.00715.95
7.0.90.0060.01016.00
7.0.80.0070.01115.96
7.0.70.0040.01416.06
7.0.60.0100.00815.90
7.0.50.0060.01115.95
7.0.40.0060.01215.36
7.0.30.0160.01315.27
7.0.20.0060.01315.40
7.0.10.0080.01115.31
7.0.00.0100.00815.37
5.6.400.0020.01515.52
5.6.390.0080.00915.42
5.6.380.0080.00815.11
5.6.370.0100.00615.41
5.6.360.0090.00815.29
5.6.350.0050.01015.31
5.6.340.0050.01415.19
5.6.330.0100.00815.29
5.6.320.0090.00914.99
5.6.310.0100.01215.40
5.6.300.0030.01415.31
5.6.290.0050.01215.43
5.6.280.0080.01115.39
5.6.270.0030.01215.25
5.6.260.0100.00515.38
5.6.250.0090.00815.39
5.6.240.0080.00915.37
5.6.230.0080.01315.39
5.6.220.0110.00915.34
5.6.210.0100.00815.40
5.6.200.0070.01115.26
5.6.190.0070.01115.20
5.6.180.0050.01315.26
5.6.170.0080.01015.36
5.6.160.0060.01415.48
5.6.150.0050.01515.39
5.6.140.0040.01415.35
5.6.130.0100.00915.48
5.6.120.0030.01515.50
5.6.110.0080.01115.54
5.6.100.0060.01515.35
5.6.90.0050.01615.15
5.6.80.0110.00715.35
5.6.70.0080.01015.16
5.6.60.0080.01015.14
5.6.50.0090.00615.29
5.6.40.0090.00915.45
5.6.30.0040.01615.30
5.6.20.0030.01415.21
5.6.10.0040.01515.30
5.6.00.0030.01515.16

preferences:
47.31 ms | 400 KiB | 5 Q