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( implode('_', preg_match_all('~(?:[^\\\\]*\\\\)*\K[A-Z][a-z]*~', $class, $words) ? $words[0] : [] ) ); 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.70.0180.00316.88
8.3.60.0150.00618.35
8.3.50.0090.00921.24
8.3.40.0040.01218.92
8.3.30.0000.01418.95
8.3.20.0080.00021.93
8.3.10.0000.00821.92
8.3.00.0050.00323.59
8.2.190.0040.01117.00
8.2.180.0140.00716.63
8.2.170.0070.00722.96
8.2.160.0060.01221.28
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0090.00026.16
8.2.110.0030.00721.27
8.2.100.0090.00319.82
8.2.90.0030.00519.17
8.2.80.0050.00317.97
8.2.70.0090.00017.63
8.2.60.0070.00417.80
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0040.00418.07
8.2.20.0040.00418.07
8.2.10.0000.00919.16
8.2.00.0030.00519.14
8.1.280.0160.00325.92
8.1.270.0000.00822.20
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0130.01022.02
8.1.230.0100.00322.75
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0070.00317.35
8.1.190.0050.00317.22
8.1.180.0030.00518.93
8.1.170.0050.00318.61
8.1.160.0070.00018.76
8.1.150.0070.00018.75
8.1.140.0070.00022.16
8.1.130.0000.00720.15
8.1.120.0070.00017.59
8.1.110.0060.00317.50
8.1.100.0050.00317.59
8.1.90.0000.01017.43
8.1.80.0030.00517.54
8.1.70.0070.00417.41
8.1.60.0030.00717.63
8.1.50.0030.00617.54
8.1.40.0000.00817.62
8.1.30.0000.00817.73
8.1.20.0030.00617.66
8.1.10.0050.00317.68
8.1.00.0060.00317.55
8.0.300.0040.00418.77
8.0.290.0040.00716.75
8.0.280.0030.00318.47
8.0.270.0040.00416.94
8.0.260.0030.00321.87
8.0.250.0000.00717.12
8.0.240.0030.00316.98
8.0.230.0030.00617.05
8.0.220.0000.00717.01
8.0.210.0070.00017.07
8.0.200.0000.00816.96
8.0.190.0070.00017.10
8.0.180.0030.00517.09
8.0.170.0030.00617.03
8.0.160.0000.00717.02
8.0.150.0030.00516.98
8.0.140.0040.00417.01
8.0.130.0000.00513.47
8.0.120.0050.00216.83
8.0.110.0040.00417.00
8.0.100.0040.00417.09
8.0.90.0030.00617.10
8.0.80.0070.00817.02
8.0.70.0000.00816.91
8.0.60.0050.00216.86
8.0.50.0030.00616.85
8.0.30.0170.00316.95
8.0.20.0070.01417.29
8.0.10.0000.00817.22
8.0.00.0120.00616.73
7.4.330.0000.00515.55
7.4.320.0030.00316.66
7.4.300.0000.00616.70
7.4.290.0070.00016.55
7.4.280.0040.00416.76
7.4.270.0000.00716.64
7.4.260.0030.00316.65
7.4.250.0000.00816.53
7.4.240.0050.00316.64
7.4.230.0070.00016.77
7.4.220.0000.00716.72
7.4.210.0040.01116.61
7.4.200.0070.00016.70
7.4.130.0110.00716.68
7.4.120.0000.01716.77
7.4.110.0070.01416.88
7.4.100.0180.00316.85
7.4.90.0110.00616.71
7.4.80.0120.01019.39
7.4.70.0080.00916.77
7.4.60.0140.00316.64
7.4.50.0030.01316.57
7.4.40.0070.01016.84
7.4.10.0070.01115.32
7.4.00.0110.00515.21
7.3.330.0050.00013.49
7.3.320.0030.00313.51
7.3.310.0000.00716.52
7.3.300.0000.00716.37
7.3.290.0050.01416.51
7.3.280.0070.01016.42
7.3.260.0130.00716.75
7.3.240.0100.00816.58
7.3.230.0100.00616.79
7.3.210.0040.01216.59
7.3.200.0000.01616.70
7.3.190.0110.00716.77
7.3.180.0080.01516.70
7.3.170.0100.01316.48
7.3.160.0080.00816.46
7.3.130.0040.01415.35
7.3.120.0070.00816.20
7.3.110.0090.00616.18
7.3.100.0080.00616.11
7.3.90.0060.00816.02
7.3.80.0090.00516.18
7.3.70.0090.00915.71
7.3.60.0070.00515.72
7.3.50.0070.00815.72
7.3.40.0080.00715.57
7.3.30.0090.00815.64
7.3.20.0110.01116.40
7.3.10.0090.00816.37
7.3.00.0100.00716.42
7.2.330.0120.00616.81
7.2.320.0060.01016.69
7.2.310.0090.00916.85
7.2.300.0110.00916.91
7.2.290.0090.00816.86
7.2.260.0120.00615.20
7.2.250.0030.00915.40
7.2.240.0050.01016.29
7.2.230.0090.00716.10
7.2.220.0090.00516.29
7.2.210.0060.00816.09
7.2.200.0070.00815.86
7.2.190.0050.01315.94
7.2.180.0060.00815.80
7.2.170.0110.00815.88
7.2.160.0050.01515.86
7.2.150.0100.01116.50
7.2.140.0130.00316.62
7.2.130.0110.01116.46
7.2.120.0090.01216.43
7.2.110.0120.00716.36
7.2.100.0080.01016.49
7.2.90.0090.00616.55
7.2.80.0060.01516.51
7.2.70.0070.01416.50
7.2.60.0110.00816.60
7.2.50.0220.00616.54
7.2.40.0070.01116.54
7.2.30.0130.00716.52
7.2.20.0110.01016.60
7.2.10.0070.01416.51
7.2.00.0070.01016.59
7.1.330.0050.00916.52
7.1.320.0030.01016.56
7.1.310.0050.00716.55
7.1.300.0080.01015.69
7.1.290.0080.00515.72
7.1.280.0120.00815.73
7.1.270.0070.01115.60
7.1.260.0070.00915.61
7.1.250.0070.00715.73
7.1.240.0100.00615.88
7.1.230.0030.00915.89
7.1.220.0070.00715.70
7.1.210.0040.00716.09
7.1.200.0040.01115.93
7.1.190.0070.00715.69
7.1.180.0000.00916.01
7.1.170.0030.00615.98
7.1.160.0070.00715.91
7.1.150.0120.00315.98
7.1.140.0000.01015.92
7.1.130.0070.00715.92
7.1.120.0070.00715.79
7.1.110.0060.00915.77
7.1.100.0030.00915.96
7.1.90.0000.01416.02
7.1.80.0070.00415.93
7.1.70.0060.00616.10
7.1.60.0030.01016.16
7.1.50.0060.00616.16
7.1.40.0000.01216.07
7.1.30.0060.00315.62
7.1.20.0000.01115.80
7.1.10.0120.00016.04
7.1.00.0070.00716.09

preferences:
43.3 ms | 401 KiB | 5 Q