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('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.01221.27
8.3.50.0190.00423.46
8.3.40.0120.00722.44
8.3.30.0120.00822.67
8.3.20.0120.00623.53
8.3.10.0100.00624.45
8.3.00.0110.00823.58
8.2.180.0090.00822.10
8.2.170.0150.00822.38
8.2.160.0160.00724.44
8.2.150.0200.00625.75
8.2.140.0130.00825.42
8.2.130.0110.01025.91
8.2.120.0150.00724.04
8.2.110.0170.00522.70
8.2.100.0150.01122.01
8.2.90.0140.00922.00
8.2.80.0210.00322.26
8.2.70.0160.00519.99
8.2.60.0150.00720.04
8.2.50.0180.00420.05
8.2.40.0140.00719.70
8.2.30.0110.00719.96
8.2.20.0120.00519.95
8.2.10.0130.00619.50
8.2.00.0110.00719.48
8.1.280.0110.01025.92
8.1.270.0120.00725.42
8.1.260.0110.00825.98
8.1.250.0130.00726.56
8.1.240.0140.00924.78
8.1.230.0190.00522.77
8.1.220.0160.00821.94
8.1.210.0160.00722.20
8.1.200.0140.00619.82
8.1.190.0140.00519.80
8.1.180.0130.00719.89
8.1.170.0150.00319.74
8.1.160.0140.00619.78
8.1.150.0140.00619.69
8.1.140.0120.00819.56
8.1.130.0130.00619.28
8.1.120.0140.00519.26
8.1.110.0150.00519.25
8.1.100.0140.00719.29
8.1.90.0150.00519.31
8.1.80.0140.00519.26
8.1.70.0130.00619.11
8.1.60.0150.00619.11
8.1.50.0140.00618.83
8.1.40.0140.00618.87
8.1.30.0120.00718.63
8.1.20.0160.00618.94
8.1.10.0130.00718.73
8.1.00.0120.00618.67
8.0.300.0160.00622.50
8.0.290.0170.00419.51
8.0.280.0140.00619.52
8.0.270.0140.00519.30
8.0.260.0120.00719.04
8.0.250.0120.00719.14
8.0.240.0130.00518.97
8.0.230.0140.00518.93
8.0.220.0130.00518.89
8.0.210.0140.00518.93
8.0.200.0130.00618.72
8.0.190.0130.00618.60
8.0.180.0130.00518.32
8.0.170.0120.00518.34
8.0.160.0120.00518.32
8.0.150.0120.00618.29
8.0.140.0100.00718.17
8.0.130.0110.00517.91
8.0.120.0120.00618.13
8.0.110.0120.00418.06
8.0.100.0120.00417.98
8.0.90.0110.00617.99
8.0.80.0110.00617.88
8.0.70.0100.00517.97
8.0.60.0110.00617.98
8.0.50.0120.00517.96
8.0.30.0090.00717.85
8.0.20.0110.00717.92
8.0.10.0130.00418.00
8.0.00.0120.00517.91
7.4.330.0110.00317.97
7.4.320.0150.00618.84
7.4.300.0110.00417.93
7.4.290.0150.00518.22
7.4.280.0160.00318.18
7.4.270.0130.00618.11
7.4.260.0130.00518.01
7.4.250.0130.00518.03
7.4.240.0120.00517.93
7.4.230.0140.00517.85
7.4.220.0120.00517.86
7.4.210.0100.00717.74
7.4.200.0110.00617.88
7.4.190.0110.00617.98
7.4.180.0100.00617.97
7.4.160.0120.00517.83
7.4.150.0120.00517.88
7.4.140.0120.00517.79
7.4.130.0120.00617.55
7.4.120.0110.00617.54
7.4.110.0120.00617.58
7.4.100.0120.00617.52
7.4.90.0120.00617.47
7.4.80.0130.00617.46
7.4.70.0120.00617.41
7.4.60.0120.00617.43
7.4.50.0110.00817.40
7.4.40.0120.00617.37
7.4.30.0110.00717.37
7.4.20.0120.00717.25
7.4.10.0120.00617.25
7.4.00.0100.00717.16
7.3.330.0130.00517.62
7.3.320.0150.00417.61
7.3.310.0140.00517.83
7.3.300.0130.00617.64
7.3.290.0130.00417.62
7.3.280.0140.00417.55
7.3.270.0130.00517.70
7.3.260.0120.00617.51
7.3.250.0130.00517.36
7.3.240.0140.00617.46
7.3.230.0130.00617.41
7.3.220.0130.00617.31
7.3.210.0130.00617.30
7.3.200.0120.00617.30
7.3.190.0130.00617.25
7.3.180.0140.00617.26
7.3.170.0140.00617.27
7.3.160.0130.00617.22
7.3.150.0130.00617.23
7.3.140.0130.00717.25
7.3.130.0130.00617.11
7.3.120.0120.00717.00
7.3.110.0120.00816.95
7.3.100.0120.00616.86
7.3.90.0110.00716.84
7.3.80.0100.00816.63
7.3.70.0100.00816.66
7.3.60.0110.00616.64
7.3.50.0120.00616.60
7.3.40.0100.00816.58
7.3.30.0110.00816.53
7.3.20.0130.00717.06
7.3.10.0180.00817.03
7.3.00.0160.00616.98
7.2.340.0150.00617.45
7.2.330.0160.00617.43
7.2.320.0140.00717.36
7.2.310.0140.00817.35
7.2.300.0150.00717.39
7.2.290.0140.00617.37
7.2.280.0140.00717.36
7.2.270.0140.00817.35
7.2.260.0140.00817.23
7.2.250.0120.00917.16
7.2.240.0120.00917.12
7.2.230.0130.00816.99
7.2.220.0130.00716.86
7.2.210.0120.00716.74
7.2.200.0120.00816.80
7.2.190.0120.00816.69
7.2.180.0120.00816.68
7.2.170.0120.00816.70
7.2.160.0110.00816.67
7.2.150.0140.00817.27
7.2.140.0180.00717.24
7.2.130.0170.00817.18
7.2.120.0190.00717.06
7.2.110.0240.00716.97
7.2.100.0280.00716.92
7.2.90.0250.00816.90
7.2.80.0280.00816.92
7.2.70.0280.00816.96
7.2.60.0270.00816.97
7.2.50.0270.00816.96
7.2.40.0340.00817.03
7.2.30.0360.00817.07
7.2.20.0360.00817.04
7.2.10.0350.00917.04
7.2.00.0300.00717.03
7.1.330.0160.00716.89
7.1.320.0190.00716.64
7.1.310.0140.00616.50
7.1.300.0150.00616.42
7.1.290.0160.00716.39
7.1.280.0140.00716.40
7.1.270.0150.00716.34
7.1.260.0150.00716.32
7.1.250.0180.00716.23
7.1.240.0190.00816.07
7.1.230.0230.00616.00
7.1.220.0330.00815.97
7.1.210.0340.00715.97
7.1.200.0290.00616.00
7.1.190.0300.00716.01
7.1.180.0250.00816.00
7.1.170.0290.00716.01
7.1.160.0380.00816.04
7.1.150.0270.00716.08
7.1.140.0470.00716.06
7.1.130.0390.00716.04
7.1.120.0310.00816.06
7.1.110.0330.00616.07
7.1.100.0300.00716.10
7.1.90.0330.00716.09
7.1.80.0250.00716.09
7.1.70.0270.00816.02
7.1.60.0250.00617.75
7.1.50.0280.00817.72
7.1.40.0270.00717.74
7.1.30.0290.00617.74
7.1.20.0280.00717.70
7.1.10.0300.00815.99
7.1.00.0280.00615.99
7.0.330.0200.00815.93
7.0.320.0200.00815.85
7.0.310.0300.00715.74
7.0.300.0280.00715.73
7.0.290.0290.00715.76
7.0.280.0240.00715.72
7.0.270.0300.00715.77
7.0.260.0310.00715.75
7.0.250.0290.00815.82
7.0.240.0310.00715.85
7.0.230.0380.00715.79
7.0.220.0360.00715.78
7.0.210.0250.00715.74
7.0.200.0280.00815.73
7.0.190.0280.00715.74
7.0.180.0270.00815.72
7.0.170.0250.00715.72
7.0.160.0260.00715.73
7.0.150.0240.00815.67
7.0.140.0290.00815.73
7.0.130.0270.00815.76
7.0.120.0280.00615.77
7.0.110.0260.00715.72
7.0.100.0250.00715.72
7.0.90.0260.00715.68
7.0.80.0370.00715.68
7.0.70.0240.00715.66
7.0.60.0260.00715.69
7.0.50.0240.00715.68
7.0.40.0270.00715.71
7.0.30.0320.00615.69
7.0.20.0240.00715.64
7.0.10.0220.00715.68
7.0.00.0220.00715.65
5.6.400.0130.00915.98
5.6.390.0150.00916.02
5.6.380.0140.00815.71
5.6.370.0140.00915.77
5.6.360.0140.00915.75
5.6.350.0130.01015.80
5.6.340.0130.01015.77
5.6.330.0140.00915.75
5.6.320.0140.00915.76
5.6.310.0130.00915.77
5.6.300.0140.01215.95
5.6.290.0130.01215.97
5.6.280.0140.01215.98
5.6.270.0140.01115.97
5.6.260.0130.01115.92
5.6.250.0130.01215.93
5.6.240.0140.01115.94
5.6.230.0140.01115.95
5.6.220.0130.01215.92
5.6.210.0150.01015.94
5.6.200.0140.01115.94
5.6.190.0140.01115.97
5.6.180.0150.01015.93
5.6.170.0130.01215.97
5.6.160.0130.01215.93
5.6.150.0130.01315.94
5.6.140.0140.01015.93
5.6.130.0130.01115.94
5.6.120.0140.01215.95
5.6.110.0130.01115.93
5.6.100.0130.01315.94
5.6.90.0150.01015.89
5.6.80.0130.01115.85
5.6.70.0130.01115.86
5.6.60.0120.01115.89
5.6.50.0140.01015.83
5.6.40.0120.01215.87
5.6.30.0130.01115.84
5.6.20.0120.01115.84
5.6.10.0130.01015.85
5.6.00.0130.01015.87

preferences:
79.86 ms | 401 KiB | 5 Q