3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($propertyName): string { $lcPropertyName = lcfirst($propertyName); $snakeCasedName = ''; $len = strlen($lcPropertyName); for ($i = 0; $i < $len; ++$i) { if (ctype_upper($propertyName[$i])) { $snakeCasedName .= '_'.strtolower($propertyName[$i]); } else { $snakeCasedName .= strtolower($propertyName[$i]); } } return $snakeCasedName; } echo f('ThisIsATest').PHP_EOL; echo f('thisIsATest');

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.0090.00916.62
8.3.50.0250.00622.11
8.3.40.0070.00718.89
8.3.30.0120.00318.73
8.3.20.0070.00021.77
8.3.10.0040.00421.67
8.3.00.0040.00419.51
8.2.180.0100.01018.23
8.2.170.0090.00622.96
8.2.160.0090.00620.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00719.83
8.2.120.0000.00726.35
8.2.110.0030.00722.31
8.2.100.0090.00317.91
8.2.90.0040.00420.72
8.2.80.0040.00418.16
8.2.70.0080.00018.03
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0040.00420.60
8.2.30.0040.00419.30
8.2.20.0070.00018.12
8.2.10.0030.00518.11
8.2.00.0040.00417.61
8.1.280.0070.01125.92
8.1.270.0040.00420.38
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.62
8.1.230.0080.00320.85
8.1.220.0080.00017.74
8.1.210.0000.01019.03
8.1.200.0000.00817.23
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0040.00418.90
8.1.160.0070.00018.79
8.1.150.0000.00720.26
8.1.140.0000.00719.63
8.1.130.0000.00618.96
8.1.120.0050.00217.49
8.1.110.0000.00817.47
8.1.100.0070.00017.43
8.1.90.0040.00417.45
8.1.80.0030.00517.45
8.1.70.0030.00317.30
8.1.60.0030.00617.43
8.1.50.0000.00817.47
8.1.40.0030.00617.40
8.1.30.0000.00917.58
8.1.20.0030.00617.62
8.1.10.0000.00717.62
8.1.00.0050.00317.55
8.0.300.0040.00420.06
8.0.290.0040.00416.75
8.0.280.0000.00718.55
8.0.270.0000.00717.17
8.0.260.0000.00717.17
8.0.250.0030.00316.95
8.0.240.0040.00416.96
8.0.230.0040.00416.84
8.0.220.0050.00316.79
8.0.210.0040.00416.82
8.0.200.0040.00416.92
8.0.190.0030.00316.86
8.0.180.0070.00016.84
8.0.170.0050.00216.81
8.0.160.0070.00016.97
8.0.150.0030.00416.71
8.0.140.0000.00716.84
8.0.130.0030.00313.32
8.0.120.0030.00516.89
8.0.110.0020.00516.77
8.0.100.0050.00316.76
8.0.90.0000.00716.75
8.0.80.0060.00916.87
8.0.70.0040.00416.82
8.0.60.0030.00516.65
8.0.50.0000.00716.85
8.0.30.0070.01116.98
8.0.20.0090.01017.40
8.0.10.0000.00716.96
8.0.00.0130.00716.79
7.4.330.0000.00615.55
7.4.320.0030.00316.43
7.4.300.0000.00716.46
7.4.290.0020.00516.62
7.4.280.0030.00516.50
7.4.270.0000.00716.59
7.4.260.0030.00616.50
7.4.250.0030.00316.57
7.4.240.0000.00616.52
7.4.230.0000.00716.70
7.4.220.0130.00616.67
7.4.210.0100.00716.54
7.4.200.0080.00016.50
7.4.160.0060.00916.38
7.4.150.0000.01917.40
7.4.140.0120.00817.86
7.4.130.0070.01016.46
7.4.120.0120.00816.56
7.4.110.0140.00516.70
7.4.100.0060.01616.37
7.4.90.0060.01116.36
7.4.80.0130.00619.39
7.4.70.0070.01016.61
7.4.60.0140.03216.44
7.4.50.0040.00716.51
7.4.40.0070.01416.57
7.4.30.0160.00316.55
7.4.00.0070.01114.89
7.3.330.0060.00013.39
7.3.320.0050.00013.18
7.3.310.0040.00416.21
7.3.300.0030.00316.29
7.3.290.0050.01116.38
7.3.280.0090.01016.34
7.3.270.0090.00917.40
7.3.260.0130.00416.61
7.3.250.0100.00916.55
7.3.240.0150.00216.58
7.3.230.0130.01016.64
7.3.210.0110.01116.48
7.3.200.0070.01016.61
7.3.190.0130.00316.53
7.3.180.0060.00916.48
7.3.170.0200.00316.29
7.3.160.0040.01216.58
7.3.120.0090.00614.86
7.3.110.0040.01114.77
7.3.100.0000.01114.57
7.3.90.0030.00714.70
7.3.80.0070.00714.58
7.3.70.0090.00914.96
7.3.60.0060.01014.97
7.3.50.0040.01115.03
7.3.40.0030.00714.70
7.3.30.0030.00614.96
7.3.20.0000.00916.37
7.3.10.0100.00316.75
7.3.00.0120.00416.82
7.2.330.0140.00316.48
7.2.320.0120.00616.87
7.2.310.0080.01216.57
7.2.300.0130.00616.48
7.2.290.0100.00716.48
7.2.240.0000.01715.21
7.2.230.0090.00315.05
7.2.220.0030.01315.36
7.2.210.0100.00715.20
7.2.200.0060.00915.19
7.2.190.0040.01415.02
7.2.180.0150.00315.03
7.2.170.0040.01115.15
7.2.160.0030.01314.74
7.2.150.0090.00616.79
7.2.140.0080.00817.03
7.2.130.0060.00617.11
7.2.120.0000.01516.78
7.2.110.0060.00917.05
7.2.100.0070.01016.80
7.2.90.0090.00616.84
7.2.80.0000.01216.64
7.2.70.0000.01716.86
7.2.60.0110.00517.01
7.2.50.0040.01417.07
7.2.40.0060.00916.95
7.2.30.0000.01416.78
7.2.20.0060.00616.75
7.2.10.0060.00917.02
7.2.00.0050.01018.37
7.1.330.0000.01515.61
7.1.320.0030.00715.74
7.1.310.0040.00715.68
7.1.300.0070.01015.84
7.1.290.0000.01615.86
7.1.280.0090.00615.74
7.1.270.0090.00315.84
7.1.260.0030.00615.77
7.1.250.0040.01115.86
7.1.200.0090.00316.01
7.1.100.0080.00618.12
7.1.70.0040.00817.12
7.1.60.0110.00317.14
7.1.50.0100.00317.01
7.1.10.0030.06322.28
7.1.00.0200.04722.36
7.0.200.0030.01016.75
7.0.150.0030.06021.84
7.0.140.0130.04721.88
7.0.130.0100.05321.86
7.0.120.0030.06021.82
7.0.110.0030.06021.78
7.0.100.0030.05721.79
7.0.90.0170.05021.71
7.0.80.0070.07021.95
7.0.70.0030.05721.81
7.0.60.0030.07321.82
7.0.50.0070.05721.86
7.0.40.0130.07021.83
7.0.30.0030.06021.89
7.0.20.0070.05721.75
7.0.10.0070.06021.88
7.0.00.0030.06021.89

preferences:
57.3 ms | 401 KiB | 5 Q