3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCaseToUnderscore($input) { return strtolower(preg_replace('/(?<!^)[A-Z]([A-Z](?![a-z]))*/', '_$0', $input)); } echo camelCaseToUnderscore('CamelCaseForTheWin'), "\n"; echo camelCaseToUnderscore('ACar'), "\n"; echo camelCaseToUnderscore('BuyACar'), "\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.0070.01416.63
8.3.50.0070.00716.80
8.3.40.0060.01018.96
8.3.30.0070.00718.66
8.3.20.0070.00021.89
8.3.10.0080.00023.66
8.3.00.0000.00818.06
8.2.180.0140.00718.54
8.2.170.0100.01022.96
8.2.160.0110.00322.06
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00420.48
8.2.120.0040.00426.35
8.2.110.0040.00422.10
8.2.100.0030.00917.84
8.2.90.0000.00818.03
8.2.80.0040.00417.97
8.2.70.0040.00417.80
8.2.60.0040.00417.91
8.2.50.0000.00818.10
8.2.40.0050.00220.42
8.2.30.0040.00419.27
8.2.20.0040.00418.05
8.2.10.0040.00417.91
8.2.00.0040.00417.95
8.1.280.0120.00325.92
8.1.270.0040.00423.70
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00320.58
8.1.230.0030.00720.95
8.1.220.0040.00420.89
8.1.210.0030.00618.77
8.1.200.0000.01017.35
8.1.190.0000.00917.23
8.1.180.0030.00618.10
8.1.170.0050.00318.75
8.1.160.0040.00418.70
8.1.150.0050.00222.14
8.1.140.0040.00419.43
8.1.130.0040.00420.45
8.1.120.0000.00817.50
8.1.110.0000.00917.45
8.1.100.0000.00817.50
8.1.90.0000.00717.37
8.1.80.0050.00317.37
8.1.70.0000.00717.38
8.1.60.0040.00417.66
8.1.50.0000.00817.49
8.1.40.0030.00617.64
8.1.30.0000.00917.71
8.1.20.0000.00917.56
8.1.10.0030.00617.55
8.1.00.0040.00417.51
8.0.300.0000.00719.76
8.0.290.0080.00016.75
8.0.280.0030.00318.41
8.0.270.0000.00717.21
8.0.260.0000.00716.81
8.0.250.0000.00716.94
8.0.240.0070.00017.03
8.0.230.0030.00316.84
8.0.220.0000.00716.92
8.0.210.0070.00316.80
8.0.200.0000.00616.97
8.0.190.0040.00416.95
8.0.180.0000.00716.95
8.0.170.0000.00716.99
8.0.160.0030.00316.85
8.0.150.0000.00816.86
8.0.140.0040.00416.95
8.0.130.0050.00013.29
8.0.120.0000.00716.76
8.0.110.0000.00816.76
8.0.100.0040.00416.95
8.0.90.0050.00216.87
8.0.80.0060.00916.93
8.0.70.0070.00016.80
8.0.60.0000.00816.91
8.0.50.0000.00716.79
8.0.30.0120.00917.09
8.0.20.0110.00817.42
8.0.10.0050.00317.04
8.0.00.0110.00616.68
7.4.330.0000.00615.55
7.4.320.0030.00316.61
7.4.300.0060.00016.74
7.4.290.0000.00816.64
7.4.280.0030.00616.55
7.4.270.0040.00416.60
7.4.260.0030.00316.73
7.4.250.0040.00416.71
7.4.240.0000.00716.61
7.4.230.0000.00716.58
7.4.220.0000.02316.77
7.4.210.0070.00716.77
7.4.200.0030.00516.84
7.4.160.0030.01316.57
7.4.150.0000.02417.40
7.4.140.0070.01017.86
7.4.130.0100.01016.85
7.4.120.0130.00716.70
7.4.110.0130.01316.45
7.4.100.0120.00916.71
7.4.90.0060.01116.55
7.4.80.0070.01019.39
7.4.70.0100.00716.48
7.4.60.0070.01016.72
7.4.50.0090.00516.61
7.4.40.0030.01316.75
7.4.30.0170.00016.60
7.4.00.0070.00715.15
7.3.330.0060.00013.23
7.3.320.0030.00313.30
7.3.310.0000.00716.21
7.3.300.0000.00716.46
7.3.290.0080.00816.40
7.3.280.0080.01016.37
7.3.270.0050.01117.40
7.3.260.0130.00716.35
7.3.250.0140.00516.55
7.3.240.0120.00816.66
7.3.230.0070.01116.78
7.3.210.0130.00616.46
7.3.200.0090.01216.74
7.3.190.0000.01616.64
7.3.180.0000.01716.46
7.3.170.0080.00816.54
7.3.160.0060.01016.54
7.3.10.0110.00916.66
7.3.00.0130.00416.34
7.2.330.0100.01016.80
7.2.320.0040.01416.77
7.2.310.0090.00816.52
7.2.300.0150.00316.86
7.2.290.0080.00816.67
7.2.130.0190.00016.68
7.2.120.0070.01116.61
7.2.110.0100.01016.35
7.2.100.0150.00616.77
7.2.90.0130.00716.16
7.2.80.0140.01016.91
7.2.70.0180.00316.55
7.2.60.0080.00917.02
7.2.50.0100.01016.76
7.2.40.0070.01116.60
7.2.30.0110.00816.21
7.2.20.0110.01116.50
7.2.10.0120.00916.55
7.2.00.0150.00916.82
7.1.250.0160.00315.23
7.1.200.0070.00415.86
7.1.70.0090.00617.32
7.1.60.1030.01333.51
7.1.50.1070.00733.11
7.1.40.1030.01732.89
7.1.30.2500.01733.10
7.1.20.1630.01032.95
7.1.10.0970.00714.86
7.1.00.1000.01315.00
7.0.200.1300.01314.87
7.0.190.1300.00715.01
7.0.180.1100.01314.47
7.0.170.2130.00714.77
7.0.160.1130.01014.45
7.0.150.0930.00714.46
7.0.140.1270.00314.60
7.0.130.1230.01314.76
7.0.120.0830.01014.82
7.0.110.0870.01014.71
7.0.100.0770.01014.53
7.0.90.1230.01014.79
7.0.80.1300.01014.58
7.0.70.0970.00714.58
7.0.60.0870.00714.64
7.0.50.1270.01014.78
7.0.40.0830.02314.84
7.0.30.0770.01314.87
7.0.20.1430.00714.84
7.0.10.1430.02014.53
7.0.00.1030.01314.84

preferences:
63.04 ms | 400 KiB | 5 Q