3v4l.org

run code in 300+ PHP versions simultaneously
<?php const testNamespacedClasses = [ "Namespace\To\SettingOption", "I\Was\Born\InTheUSAIwas", "Something\Onething" ]; function testSnakeCasedModelNames() { foreach (testNamespacedClasses as $class) { echo "$class => "; echo strtolower(preg_replace_callback( '~([^\\\\]*\\\\)*([A-Z][a-z]*)~', function($m) { return ($m[1] ? '' : '_') . $m[2]; }, $class )); echo "\n---\n"; } } echo testSnakeCasedModelNames();

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.00818.55
8.3.50.0150.01521.19
8.3.40.0180.00419.09
8.3.30.0140.00018.92
8.3.20.0040.00421.89
8.3.10.0000.00821.92
8.3.00.0080.00023.61
8.2.180.0090.01216.75
8.2.170.0120.00618.86
8.2.160.0140.00022.96
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0070.00026.16
8.2.110.0040.00422.33
8.2.100.0120.00017.84
8.2.90.0050.00319.34
8.2.80.0030.00619.04
8.2.70.0050.00318.03
8.2.60.0030.00518.03
8.2.50.0050.00318.10
8.2.40.0040.00419.07
8.2.30.0040.00419.33
8.2.20.0000.00818.22
8.2.10.0040.00419.26
8.2.00.0040.00419.29
8.1.280.0080.00825.92
8.1.270.0060.00322.25
8.1.260.0000.00726.35
8.1.250.0080.00828.09
8.1.240.0040.00420.84
8.1.230.0050.00519.21
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0000.01017.48
8.1.190.0030.00517.34
8.1.180.0030.00518.10
8.1.170.0050.00318.82
8.1.160.0000.00818.91
8.1.150.0000.00718.86
8.1.140.0040.00422.08
8.1.130.0070.00020.09
8.1.120.0040.00417.59
8.1.110.0040.00417.51
8.1.100.0000.00717.45
8.1.90.0060.00317.41
8.1.80.0000.00917.58
8.1.70.0000.00917.58
8.1.60.0080.00017.67
8.1.50.0080.00017.54
8.1.40.0030.00517.53
8.1.30.0030.00617.73
8.1.20.0070.00017.75
8.1.10.0030.00517.68
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00818.52
8.0.270.0000.00717.28
8.0.260.0030.00321.73
8.0.250.0000.00717.01
8.0.240.0070.00017.11
8.0.230.0100.00017.12
8.0.220.0000.00716.94
8.0.210.0000.00816.91
8.0.200.0040.00416.99
8.0.190.0000.00717.13
8.0.180.0080.00017.07
8.0.170.0000.00816.99
8.0.160.0000.00717.03
8.0.150.0000.00816.98
8.0.140.0030.00316.89
8.0.130.0000.00613.48
8.0.120.0040.00416.90
8.0.110.0070.00016.99
8.0.100.0040.00417.00
8.0.90.0090.00016.88
8.0.80.0130.00516.98
8.0.70.0000.00717.10
8.0.60.0040.00417.02
8.0.50.0040.00416.84
8.0.30.0040.01617.48
8.0.20.0120.00917.38
8.0.10.0040.00417.23
8.0.00.0090.00917.03
7.4.330.0030.00315.55
7.4.320.0030.00316.81
7.4.300.0000.00716.65
7.4.290.0030.00316.59
7.4.280.0050.00316.74
7.4.270.0070.00016.75
7.4.260.0030.00316.66
7.4.250.0030.00316.72
7.4.240.0040.00416.67
7.4.230.0090.00016.55
7.4.220.0030.00316.78
7.4.210.0100.00716.72
7.4.200.0000.00716.69
7.4.130.0110.00716.63
7.4.120.0070.01016.83
7.4.110.0150.00416.65
7.4.100.0080.00816.64
7.4.90.0100.00716.63
7.4.80.0120.01219.39
7.4.70.0000.01716.82
7.4.60.0130.01016.75
7.4.50.0060.01016.60
7.4.40.0090.00616.78
7.4.00.0070.00915.21
7.3.330.0050.00013.30
7.3.320.0030.00313.50
7.3.310.0030.00516.48
7.3.300.0070.00016.44
7.3.290.0070.00816.48
7.3.280.0110.00316.45
7.3.260.0110.00816.80
7.3.240.0090.01016.62
7.3.230.0160.00016.41
7.3.210.0100.00716.73
7.3.200.0090.00916.69
7.3.190.0030.01416.44
7.3.180.0060.00916.75
7.3.170.0100.00716.78
7.3.160.0080.00816.52
7.3.120.0060.01215.07
7.3.110.0110.00715.20
7.3.100.0100.01014.86
7.3.90.0040.01115.32
7.3.80.0130.00615.20
7.3.70.0070.00814.86
7.3.60.0050.01015.02
7.3.50.0070.00415.01
7.3.40.0090.01114.99
7.3.30.0080.00714.96
7.3.20.0070.00715.90
7.3.10.0030.01316.05
7.3.00.0040.01215.78
7.2.330.0100.00716.98
7.2.320.0040.01517.00
7.2.310.0040.01416.79
7.2.300.0100.01316.89
7.2.290.0120.00616.75
7.2.250.0000.01515.31
7.2.240.0090.00915.46
7.2.230.0040.01214.93
7.2.220.0040.01215.22
7.2.210.0060.01315.42
7.2.200.0100.00815.09
7.2.190.0120.00215.23
7.2.180.0090.00915.17
7.2.170.0070.00515.25
7.2.160.0060.00815.29
7.2.150.0110.01116.19
7.2.140.0100.00716.04
7.2.130.0090.01016.37
7.2.120.0090.01216.12
7.2.110.0090.01016.29
7.2.100.0050.00816.01
7.2.90.0130.00516.26
7.2.80.0670.00616.27
7.2.70.0090.01016.27
7.2.60.0060.01016.31
7.2.50.0070.00716.07
7.2.40.0120.00416.25
7.2.30.0070.00716.20
7.2.20.0130.00916.26
7.2.10.0090.01116.30
7.2.00.0060.01216.21
7.1.330.0070.01016.16
7.1.320.0070.00416.14
7.1.310.0040.00816.14
7.1.300.0160.00515.07
7.1.290.0090.00715.12
7.1.280.0060.00915.05
7.1.270.0110.00915.08
7.1.260.0080.00715.08
7.1.250.0050.01115.14
7.1.240.0030.01015.93
7.1.230.0030.00615.96
7.1.220.0060.00615.78
7.1.210.0030.01015.83
7.1.200.0120.00316.17
7.1.190.0040.00415.85
7.1.180.0000.01116.00
7.1.170.0060.00315.90
7.1.160.0130.00016.08
7.1.150.0100.00315.70
7.1.140.0070.00316.08
7.1.130.0030.00915.98
7.1.120.0070.01016.08
7.1.110.0000.01716.00
7.1.100.0080.00416.08
7.1.90.0060.00315.88
7.1.80.0050.00516.18
7.1.70.0060.00316.00
7.1.60.0120.00015.88
7.1.50.0060.00616.06
7.1.40.0040.00815.93
7.1.30.0040.01116.04
7.1.20.0030.00915.98
7.1.10.0030.00916.09
7.1.00.0060.00616.04

preferences:
32.22 ms | 401 KiB | 5 Q