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.4.20.0130.00722.62
8.4.10.0060.00319.77
8.3.140.0090.00916.67
8.3.130.0160.01417.43
8.3.120.0240.00517.82
8.3.110.0200.00518.64
8.3.100.0200.00716.78
8.3.90.0210.00821.07
8.3.80.0210.00923.73
8.3.70.0230.00517.47
8.3.60.0240.00416.59
8.3.50.0180.01119.67
8.3.40.0250.00518.41
8.3.30.0220.00617.96
8.3.20.0200.00521.94
8.3.10.0170.00520.51
8.3.00.0210.00321.57
8.2.260.0040.00420.10
8.2.250.0180.00516.92
8.2.240.0140.00917.60
8.2.230.0150.00919.48
8.2.220.0170.00620.12
8.2.210.0170.00521.47
8.2.200.0190.00517.52
8.2.190.0160.01116.55
8.2.180.0180.01216.45
8.2.170.0250.00620.23
8.2.160.0260.00318.90
8.2.150.0180.00721.61
8.2.140.0140.01121.05
8.2.130.0130.01123.92
8.2.120.0190.00222.24
8.2.110.0160.00921.66
8.2.100.0200.00721.06
8.2.90.0170.00721.22
8.2.80.0150.00921.57
8.2.70.0190.00221.10
8.2.60.0210.00520.26
8.2.50.0170.00620.23
8.2.40.0160.00620.85
8.2.30.0140.00520.60
8.2.20.0160.00620.28
8.2.10.0120.00519.33
8.2.00.0120.00519.26
8.1.310.0030.01216.45
8.1.300.0190.00818.27
8.1.290.0170.00623.51
8.1.280.0210.00721.07
8.1.270.0150.00921.04
8.1.260.0130.00823.99
8.1.250.0170.00324.52
8.1.240.0140.00422.18
8.1.230.0120.00722.04
8.1.220.0190.00721.06
8.1.210.0200.00421.39
8.1.200.0220.00520.87
8.1.190.0190.00719.82
8.1.180.0160.00720.03
8.1.170.0160.00520.28
8.1.160.0160.00220.44
8.1.150.0140.00620.69
8.1.140.0120.00720.49
8.1.130.0120.00420.49
8.1.120.0100.00720.01
8.1.110.0110.00620.05
8.1.100.0090.00418.46
8.1.90.0170.00220.05
8.1.80.0120.00519.55
8.1.70.0090.00418.28
8.1.60.0120.00518.42
8.1.50.0130.00518.38
8.1.40.0120.00518.40
8.1.30.0110.00618.45
8.1.20.0140.00518.45
8.1.10.0140.00518.24
8.1.00.0120.00618.17
8.0.300.0190.00121.60
8.0.290.0170.00420.48
8.0.280.0120.00418.88
8.0.270.0140.00619.53
8.0.260.0180.00519.91
8.0.250.0130.00519.60
8.0.240.0170.00619.62
8.0.230.0140.00619.43
8.0.220.0150.00519.53
8.0.210.0150.00318.89
8.0.200.0090.00717.73
8.0.190.0110.00517.74
8.0.180.0100.00717.72
8.0.170.0130.00417.73
8.0.160.0120.00517.69
8.0.150.0140.00317.60
8.0.140.0130.00417.59
8.0.130.0120.00617.23
8.0.120.0130.00317.49
8.0.110.0120.00517.48
8.0.100.0120.00417.47
8.0.90.0130.00517.50
8.0.80.0110.00617.47
8.0.70.0100.00717.45
8.0.60.0120.00617.48
8.0.50.0130.00517.46
8.0.30.0100.00817.42
8.0.20.0110.00817.50
8.0.10.0130.00517.53
8.0.00.0100.00617.56
7.4.330.0150.00619.12
7.4.320.0160.00719.35
7.4.300.0130.00317.55
7.4.290.0100.00517.36
7.4.280.0110.00617.47
7.4.270.0130.00517.43
7.4.260.0120.00517.32
7.4.250.0160.00417.33
7.4.240.0130.00517.26
7.4.230.0130.00617.33
7.4.220.0110.00617.31
7.4.210.0110.00717.29
7.4.200.0130.00517.28
7.4.190.0130.00517.35
7.4.180.0130.00517.36
7.4.160.0150.00517.33
7.4.150.0130.00617.35
7.4.140.0130.00517.36
7.4.130.0130.00517.16
7.4.120.0110.00717.19
7.4.110.0120.00617.23
7.4.100.0130.00517.14
7.4.90.0130.00717.05
7.4.80.0130.00517.16
7.4.70.0110.00817.01
7.4.60.0130.00617.05
7.4.50.0130.00616.96
7.4.40.0130.00617.02
7.4.30.0120.00617.05
7.4.20.0130.00516.96
7.4.10.0120.00617.02
7.4.00.0110.00716.90
7.3.330.0130.00416.90
7.3.320.0120.00616.90
7.3.310.0120.00517.08
7.3.300.0130.00517.06
7.3.290.0130.00417.07
7.3.280.0140.00616.88
7.3.270.0140.00517.03
7.3.260.0140.00616.97
7.3.250.0130.00516.96
7.3.240.0130.00516.98
7.3.230.0140.00516.97
7.3.220.0130.00516.84
7.3.210.0140.00616.81
7.3.200.0140.00616.85
7.3.190.0140.00716.83
7.3.180.0140.00616.83
7.3.170.0130.00616.81
7.3.160.0140.00616.81
7.3.150.0130.00716.80
7.3.140.0120.00716.80
7.3.130.0110.00716.82
7.3.120.0130.00516.75
7.3.110.0130.00716.70
7.3.100.0140.00616.65
7.3.90.0140.00616.75
7.3.80.0140.00616.52
7.3.70.0120.00616.49
7.3.60.0120.00716.52
7.3.50.0110.00716.50
7.3.40.0120.00716.52
7.3.30.0110.00716.50
7.3.20.0130.00617.36
7.3.10.0160.00717.28
7.3.00.0260.00717.18
7.2.340.0150.00517.13
7.2.330.0140.00616.97
7.2.320.0150.00517.03
7.2.310.0140.00716.99
7.2.300.0160.00616.97
7.2.290.0150.00617.01
7.2.280.0140.00616.98
7.2.270.0130.00717.00
7.2.260.0120.00717.00
7.2.250.0120.00716.88
7.2.240.0130.00616.91
7.2.230.0120.00816.83
7.2.220.0140.00616.66
7.2.210.0120.00716.62
7.2.200.0130.00816.65
7.2.190.0120.00816.60
7.2.180.0130.00716.62
7.2.170.0120.00716.64
7.2.160.0120.00716.63
7.2.150.0130.00817.53
7.2.140.0130.00717.55
7.2.130.0310.00817.42
7.2.120.0250.00717.32
7.2.110.0280.00717.30
7.2.100.0240.00817.31
7.2.90.0280.00717.31
7.2.80.0280.00717.21
7.2.70.0290.00717.13
7.2.60.0280.00617.17
7.2.50.0250.00617.17
7.2.40.0230.00717.24
7.2.30.0330.00817.22
7.2.20.0210.00717.23
7.2.10.0180.00717.20
7.2.00.0170.00717.21
7.1.330.0150.00616.99
7.1.320.0130.00716.74
7.1.310.0150.00516.70
7.1.300.0190.00616.63
7.1.290.0130.00616.61
7.1.280.0130.00616.59
7.1.270.0170.00616.58
7.1.260.0140.00616.57
7.1.250.0320.00716.36
7.1.240.0260.00716.34
7.1.230.0320.00516.33
7.1.220.0320.00616.33
7.1.210.0270.00716.36
7.1.200.0290.00616.30
7.1.190.0280.00616.26
7.1.180.0280.00616.21
7.1.170.0250.00616.12
7.1.160.0290.00716.18
7.1.150.0210.00716.23
7.1.140.0200.00816.24
7.1.130.0220.00716.23
7.1.120.0210.00616.21
7.1.110.0300.00716.28
7.1.100.0290.00716.26
7.1.90.0240.00616.24
7.1.80.0220.00616.31
7.1.70.0250.00716.18
7.1.60.0270.00717.78
7.1.50.0270.00817.78
7.1.40.0240.00617.71
7.1.30.0240.00817.73
7.1.20.0210.00717.71
7.1.10.0290.00616.17
7.1.00.0210.00616.15
7.0.330.0330.00716.13
7.0.320.0280.00616.07
7.0.310.0240.00615.96
7.0.300.0280.00615.91
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.99
7.0.240.0170.00716.01
7.0.230.0230.00615.98
7.0.220.0220.00615.97
7.0.210.0240.00715.94
7.0.200.0270.00615.90
7.0.190.0220.00615.95
7.0.180.0270.00615.91
7.0.170.0230.00615.95
7.0.160.0240.00515.86
7.0.150.0250.00715.83
7.0.140.0210.00615.87
7.0.130.0190.00715.91
7.0.120.0200.00615.91
7.0.110.0190.00715.88
7.0.100.0200.00615.87
7.0.90.0220.00615.84
7.0.80.0200.00715.80
7.0.70.0200.00615.82
7.0.60.0190.00715.82
7.0.50.0190.00615.83
7.0.40.0170.00615.85
7.0.30.0190.00715.86
7.0.20.0200.00615.79
7.0.10.0240.00815.78
7.0.00.0210.00715.77
5.6.400.0150.00715.88
5.6.390.0130.00815.90
5.6.380.0140.00715.75
5.6.370.0140.00715.70
5.6.360.0160.00615.76
5.6.350.0130.00915.73
5.6.340.0140.00715.75
5.6.330.0130.00815.74
5.6.320.0140.00715.74
5.6.310.0150.00615.73
5.6.300.0140.00815.73
5.6.290.0140.00915.76
5.6.280.0130.00915.80
5.6.270.0120.01015.80
5.6.260.0140.00815.82
5.6.250.0140.00915.78
5.6.240.0130.00915.80
5.6.230.0130.00915.80
5.6.220.0130.00915.79
5.6.210.0140.00915.81
5.6.200.0140.00915.85
5.6.190.0130.00915.85
5.6.180.0130.00915.83
5.6.170.0140.00815.83
5.6.160.0140.00715.81
5.6.150.0130.00815.80
5.6.140.0130.00915.83
5.6.130.0140.00815.81
5.6.120.0130.00815.82
5.6.110.0130.00915.80
5.6.100.0130.00915.76
5.6.90.0130.00815.77
5.6.80.0130.00915.73
5.6.70.0130.00915.75
5.6.60.0130.00815.80
5.6.50.0120.00815.74
5.6.40.0130.00815.74
5.6.30.0120.00815.72
5.6.20.0130.00715.70
5.6.10.0110.00915.71
5.6.00.0120.00815.68

preferences:
70.79 ms | 403 KiB | 5 Q