3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCaseToUnderscore($input) { return ltrim(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.0140.00416.75
8.3.50.0130.00921.28
8.3.40.0170.00318.98
8.3.30.0180.00418.58
8.3.20.0130.00723.38
8.3.10.0040.00423.52
8.3.00.0170.00223.65
8.2.180.0130.00916.50
8.2.170.0180.00022.96
8.2.160.0110.00420.38
8.2.150.0070.00325.66
8.2.140.0050.00324.66
8.2.130.0080.00727.12
8.2.120.0160.00024.64
8.2.110.0130.01022.37
8.2.100.0130.00522.90
8.2.90.0130.00523.04
8.2.80.0080.00823.63
8.2.70.0100.00222.86
8.2.60.0160.00521.13
8.2.50.0130.00421.19
8.2.40.0120.00622.00
8.2.30.0090.00521.59
8.2.20.0070.00621.23
8.2.10.0090.00519.74
8.2.00.0100.00419.64
8.1.280.0120.00625.92
8.1.270.0050.00324.66
8.1.260.0050.01027.22
8.1.250.0090.00128.09
8.1.240.0080.00424.63
8.1.230.0050.00724.48
8.1.220.0170.00322.91
8.1.210.0110.00523.50
8.1.200.0170.00222.66
8.1.190.0150.00620.74
8.1.180.0110.00621.02
8.1.170.0120.00421.28
8.1.160.0130.00321.45
8.1.150.0100.00521.88
8.1.140.0100.00521.60
8.1.130.0090.00421.59
8.1.120.0030.00920.94
8.1.110.0080.00520.99
8.1.100.0060.00318.60
8.1.90.0120.00120.94
8.1.80.0080.00520.10
8.1.70.0070.00418.38
8.1.60.0110.00518.52
8.1.50.0110.00518.47
8.1.40.0100.00518.48
8.1.30.0100.00618.52
8.1.20.0120.00418.54
8.1.10.0130.00418.31
8.1.00.0110.00618.24
8.0.300.0110.00024.11
8.0.290.0140.00322.36
8.0.280.0100.00419.20
8.0.270.0110.00620.46
8.0.260.0120.00721.03
8.0.250.0070.00420.56
8.0.240.0140.00520.59
8.0.230.0120.00420.50
8.0.220.0120.00320.47
8.0.210.0090.00419.45
8.0.200.0080.00717.84
8.0.190.0100.00517.85
8.0.180.0080.00717.82
8.0.170.0110.00417.83
8.0.160.0100.00517.77
8.0.150.0130.00317.69
8.0.140.0120.00417.66
8.0.130.0100.00617.29
8.0.120.0120.00317.56
8.0.110.0110.00417.54
8.0.100.0110.00417.52
8.0.90.0120.00517.56
8.0.80.0100.00617.52
8.0.70.0100.00617.52
8.0.60.0100.00617.55
8.0.50.0120.00517.53
8.0.30.0090.00817.46
8.0.20.0100.00717.54
8.0.10.0130.00417.60
8.0.00.0090.00617.61
7.4.330.0110.00620.05
7.4.320.0130.00720.37
7.4.300.0110.00317.67
7.4.290.0090.00517.45
7.4.280.0100.00617.57
7.4.270.0120.00417.52
7.4.260.0110.00517.37
7.4.250.0160.00417.39
7.4.240.0120.00517.31
7.4.230.0120.00617.40
7.4.220.0100.00617.38
7.4.210.0100.00617.35
7.4.200.0120.00517.34
7.4.190.0120.00517.42
7.4.180.0120.00517.43
7.4.160.0140.00517.39
7.4.150.0120.00617.40
7.4.140.0120.00517.41
7.4.130.0130.00517.21
7.4.120.0100.00717.23
7.4.110.0120.00617.27
7.4.100.0120.00617.18
7.4.90.0120.00717.08
7.4.80.0130.00517.20
7.4.70.0100.00817.04
7.4.60.0120.00617.08
7.4.50.0120.00616.99
7.4.40.0120.00617.05
7.4.30.0110.00617.08
7.4.20.0120.00516.99
7.4.10.0110.00617.04
7.4.00.0100.00716.92
7.3.330.0130.00416.94
7.3.320.0110.00616.95
7.3.310.0110.00517.14
7.3.300.0120.00517.12
7.3.290.0130.00417.13
7.3.280.0130.00516.92
7.3.270.0140.00417.08
7.3.260.0130.00517.01
7.3.250.0130.00516.99
7.3.240.0120.00517.03
7.3.230.0120.00617.01
7.3.220.0120.00516.88
7.3.210.0130.00716.84
7.3.200.0140.00616.88
7.3.190.0130.00816.85
7.3.180.0130.00716.86
7.3.170.0130.00616.83
7.3.160.0130.00616.84
7.3.150.0120.00716.83
7.3.140.0120.00616.83
7.3.130.0110.00716.84
7.3.120.0130.00516.77
7.3.110.0120.00716.72
7.3.100.0130.00616.67
7.3.90.0130.00616.76
7.3.80.0130.00616.53
7.3.70.0120.00616.49
7.3.60.0110.00716.53
7.3.50.0100.00716.51
7.3.40.0120.00616.53
7.3.30.0110.00716.51
7.3.20.0120.00717.40
7.3.10.0160.00717.31
7.3.00.0260.00717.21
7.2.340.0140.00517.19
7.2.330.0140.00617.00
7.2.320.0140.00617.06
7.2.310.0130.00717.02
7.2.300.0150.00617.00
7.2.290.0150.00617.03
7.2.280.0140.00617.02
7.2.270.0130.00717.03
7.2.260.0110.00817.03
7.2.250.0120.00716.91
7.2.240.0130.00616.93
7.2.230.0120.00816.84
7.2.220.0130.00616.68
7.2.210.0110.00716.63
7.2.200.0120.00816.65
7.2.190.0110.00816.62
7.2.180.0130.00616.64
7.2.170.0120.00716.64
7.2.160.0120.00616.65
7.2.150.0120.00817.58
7.2.140.0130.00717.58
7.2.130.0310.00817.45
7.2.120.0250.00717.34
7.2.110.0280.00717.33
7.2.100.0240.00917.34
7.2.90.0280.00717.35
7.2.80.0280.00717.23
7.2.70.0290.00717.15
7.2.60.0280.00617.19
7.2.50.0250.00617.19
7.2.40.0230.00617.26
7.2.30.0340.00817.25
7.2.20.0210.00717.25
7.2.10.0180.00717.22
7.2.00.0170.00717.23
7.1.330.0150.00617.03
7.1.320.0120.00716.76
7.1.310.0150.00516.72
7.1.300.0150.00616.64
7.1.290.0130.00616.63
7.1.280.0130.00616.60
7.1.270.0170.00516.59
7.1.260.0130.00616.58
7.1.250.0320.00716.37
7.1.240.0260.00716.34
7.1.230.0320.00516.33
7.1.220.0320.00616.33
7.1.210.0270.00716.37
7.1.200.0290.00616.31
7.1.190.0280.00616.26
7.1.180.0280.00616.21
7.1.170.0250.00616.12
7.1.160.0300.00616.19
7.1.150.0200.00716.23
7.1.140.0190.00816.24
7.1.130.0220.00716.23
7.1.120.0210.00616.21
7.1.110.0300.00716.29
7.1.100.0290.00716.26
7.1.90.0240.00616.24
7.1.80.0200.00616.31
7.1.70.0250.00716.18
7.1.60.0270.00717.83
7.1.50.0270.00817.83
7.1.40.0240.00617.76
7.1.30.0240.00817.78
7.1.20.0210.00717.75
7.1.10.0290.00616.17
7.1.00.0210.00616.15
7.0.330.0340.00716.13
7.0.320.0280.00616.07
7.0.310.0240.00615.95
7.0.300.0280.00615.90
7.0.290.0220.00715.94
7.0.280.0180.00616.07
7.0.270.0190.00615.96
7.0.260.0260.00615.92
7.0.250.0260.00715.98
7.0.240.0170.00616.00
7.0.230.0230.00615.97
7.0.220.0220.00615.97
7.0.210.0240.00715.94
7.0.200.0260.00615.89
7.0.190.0220.00615.94
7.0.180.0270.00615.90
7.0.170.0220.00615.95
7.0.160.0230.00515.85
7.0.150.0260.00615.82
7.0.140.0210.00615.86
7.0.130.0190.00715.91
7.0.120.0200.00615.91
7.0.110.0190.00715.87
7.0.100.0200.00615.87
7.0.90.0220.00615.83
7.0.80.0200.00715.79
7.0.70.0200.00615.81
7.0.60.0190.00715.81
7.0.50.0190.00615.82
7.0.40.0170.00715.84
7.0.30.0200.00715.85
7.0.20.0200.00615.78
7.0.10.0240.00815.77
7.0.00.0210.00715.76
5.6.400.0140.00715.87
5.6.390.0130.00815.89
5.6.380.0140.00715.74
5.6.370.0140.00715.69
5.6.360.0150.00615.74
5.6.350.0130.00815.72
5.6.340.0130.00715.74
5.6.330.0130.00815.72
5.6.320.0140.00715.72
5.6.310.0150.00615.72
5.6.300.0140.00815.72
5.6.290.0130.00915.75
5.6.280.0130.00915.79
5.6.270.0120.01015.79
5.6.260.0140.00815.81
5.6.250.0140.00915.77
5.6.240.0130.00915.79
5.6.230.0130.00915.79
5.6.220.0130.00915.77
5.6.210.0130.00915.80
5.6.200.0130.00915.84
5.6.190.0130.00915.84
5.6.180.0130.00915.82
5.6.170.0130.00815.82
5.6.160.0140.00715.80
5.6.150.0130.00915.79
5.6.140.0120.00915.82
5.6.130.0130.00815.80
5.6.120.0130.00815.81
5.6.110.0130.00915.79
5.6.100.0130.00915.75
5.6.90.0130.00815.76
5.6.80.0130.01015.72
5.6.70.0130.00915.73
5.6.60.0130.00915.79
5.6.50.0120.00915.72
5.6.40.0130.00815.72
5.6.30.0120.00815.70
5.6.20.0130.00715.69
5.6.10.0110.00915.70
5.6.00.0120.00815.66

preferences:
32.52 ms | 401 KiB | 5 Q