3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCaseToUnderscore($input) { return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $input)); } echo camelCaseToUnderscore('CamelCaseForTheWin'), "\n"; echo camelCaseToUnderscore('ACar'), "\n"; echo camelCaseToUnderscore('BuyACar'), "\n"; echo camelCaseToUnderscore('contractedHours123'), "\n"; echo camelCaseToUnderscore('XML'), "\n"; echo camelCaseToUnderscore('SimpleXML'), "\n";

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.0160.00316.75
8.3.50.0140.00016.36
8.3.40.0090.00618.63
8.3.30.0040.01119.02
8.3.20.0050.00321.74
8.3.10.0040.00423.61
8.3.00.0040.00417.80
8.2.180.0070.00716.50
8.2.170.0110.00422.96
8.2.160.0070.00720.11
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00420.41
8.2.120.0050.00226.35
8.2.110.0060.00322.16
8.2.100.0120.00417.91
8.2.90.0000.00819.12
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0000.00817.90
8.2.50.0000.00818.10
8.2.40.0080.00020.67
8.2.30.0040.00420.99
8.2.20.0040.00417.88
8.2.10.0050.00217.99
8.2.00.0030.00518.09
8.1.280.0040.01125.92
8.1.270.0000.00820.65
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00719.16
8.1.230.0070.00422.32
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0090.00017.22
8.1.180.0000.00918.10
8.1.170.0040.00418.69
8.1.160.0000.00818.91
8.1.150.0000.00718.80
8.1.140.0040.00419.49
8.1.130.0030.00318.71
8.1.120.0050.00317.38
8.1.110.0030.00617.38
8.1.100.0040.00417.46
8.1.90.0030.00517.51
8.1.80.0000.00817.45
8.1.70.0000.00717.46
8.1.60.0050.00317.56
8.1.50.0030.00517.57
8.1.40.0030.00617.50
8.1.30.0080.00017.64
8.1.20.0040.00417.71
8.1.10.0040.00417.54
8.1.00.0040.00417.55
8.0.300.0080.00018.77
8.0.290.0050.00316.88
8.0.280.0040.00418.40
8.0.270.0050.00317.32
8.0.260.0070.00018.85
8.0.250.0000.00717.04
8.0.240.0000.00817.07
8.0.230.0020.00516.85
8.0.220.0070.00016.90
8.0.210.0040.00416.80
8.0.200.0000.00716.86
8.0.190.0040.00816.85
8.0.180.0030.00516.98
8.0.170.0040.00416.95
8.0.160.0050.00216.91
8.0.150.0000.00716.75
8.0.140.0050.00316.77
8.0.130.0000.00913.33
8.0.120.0000.00716.88
8.0.110.0030.00516.78
8.0.100.0070.00016.77
8.0.90.0000.00716.70
8.0.80.0080.00716.85
8.0.70.0040.00416.95
8.0.60.0080.00016.89
8.0.50.0000.00716.81
8.0.30.0110.00617.42
8.0.20.0090.01017.43
8.0.10.0050.00316.91
8.0.00.0060.01217.04
7.4.330.0020.00215.55
7.4.320.0000.00616.68
7.4.300.0030.00316.65
7.4.290.0040.00416.74
7.4.280.0080.00016.63
7.4.270.0080.00016.75
7.4.260.0040.00416.63
7.4.250.0050.00216.63
7.4.240.0030.00516.52
7.4.230.0000.00716.70
7.4.220.0100.01016.66
7.4.210.0090.01216.69
7.4.200.0070.00016.68
7.4.160.0110.00616.49
7.4.150.0030.01317.40
7.4.140.0130.01117.86
7.4.130.0140.00716.59
7.4.120.0090.01016.76
7.4.110.0150.00916.52
7.4.100.0070.01016.61
7.4.90.0080.00816.64
7.4.80.0130.00719.39
7.4.70.0100.00716.79
7.4.60.0050.01116.64
7.4.50.0030.00716.40
7.4.40.0120.00616.50
7.4.30.0080.00916.72
7.4.00.0060.00915.01
7.3.330.0020.00213.37
7.3.320.0060.00013.37
7.3.310.0040.00316.18
7.3.300.0070.00016.28
7.3.290.0110.00616.45
7.3.280.0090.00916.38
7.3.270.0120.00617.40
7.3.260.0140.00516.45
7.3.250.0120.00716.51
7.3.240.0090.00816.47
7.3.230.0060.01216.75
7.3.210.0080.01116.25
7.3.200.0040.01416.63
7.3.190.0100.00716.69
7.3.180.0090.00616.33
7.3.170.0090.00616.66
7.3.160.0170.00416.48
7.3.120.0030.01415.25
7.3.110.0090.00914.96
7.3.100.0070.00715.18
7.3.90.0060.00915.11
7.3.80.0090.00315.14
7.3.70.0060.00914.84
7.3.60.0040.00815.06
7.3.50.0060.00614.86
7.3.40.0090.00614.98
7.3.30.0090.00915.04
7.3.20.0140.00016.64
7.3.10.0070.00616.94
7.3.00.0030.00816.77
7.2.330.0070.01316.80
7.2.320.0070.01016.60
7.2.310.0090.00916.60
7.2.300.0060.01616.69
7.2.290.0060.01216.81
7.2.250.0040.01814.90
7.2.240.0030.01415.15
7.2.230.0040.00714.67
7.2.220.0060.01115.05
7.2.210.0030.00715.34
7.2.200.0030.00714.99
7.2.190.0040.01215.04
7.2.180.0070.01115.00
7.2.170.0000.01215.07
7.2.130.0070.01017.10
7.2.120.0040.00816.91
7.2.110.0060.01017.01
7.2.100.0090.00317.02
7.2.90.0070.00717.25
7.2.80.0060.00616.90
7.2.70.0080.00416.88
7.2.60.0060.00817.08
7.2.50.0070.00716.88
7.2.40.0110.00016.90
7.2.30.0030.01117.01
7.2.20.0030.00916.88
7.2.10.0030.00716.65
7.2.00.0070.00716.88
7.1.330.0040.01215.73
7.1.320.0080.00415.70
7.1.310.0070.01015.83
7.1.300.0130.00315.87
7.1.290.0090.00616.01
7.1.280.0060.00915.91
7.1.270.0040.01215.83
7.1.260.0120.00316.00
7.1.250.0000.00815.62
7.1.200.0000.01015.91
7.1.70.0040.00417.07
7.1.60.0100.01735.27
7.1.50.0130.01735.07
7.1.40.0970.01734.79
7.1.30.0230.00734.68
7.1.20.0270.01034.65
7.1.10.0170.01016.84
7.1.00.0030.01016.82
7.0.200.0030.01017.04
7.0.190.0030.01016.88
7.0.180.0100.00716.41
7.0.170.0100.00316.42
7.0.160.0130.00316.50
7.0.150.0030.01316.33
7.0.140.0000.01716.49
7.0.130.0100.00316.70
7.0.120.0000.01716.57
7.0.110.0070.00716.39
7.0.100.0070.01316.50
7.0.90.0000.01316.42
7.0.80.0070.00716.40
7.0.70.0070.00716.37
7.0.60.0070.00716.35
7.0.50.0070.01016.68
7.0.40.0070.01016.74
7.0.30.0100.00316.83
7.0.20.0030.01016.33
7.0.10.0070.00716.74
7.0.00.0000.01016.55

preferences:
66.21 ms | 400 KiB | 5 Q