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.4.120.0090.00924.00
8.4.110.0150.00518.91
8.4.100.0150.00818.50
8.4.90.0130.00717.75
8.4.80.0190.01018.04
8.4.70.0220.00917.92
8.4.60.0140.00518.28
8.4.50.0120.00618.24
8.4.40.0260.00917.60
8.4.30.0270.00818.46
8.4.20.0280.00819.06
8.4.10.0180.00519.08
8.3.250.0100.00918.85
8.3.240.0110.00817.02
8.3.230.0140.00416.73
8.3.220.0130.00917.09
8.3.210.0090.00616.75
8.3.200.0110.00716.83
8.3.190.0130.00517.60
8.3.180.0240.00617.01
8.3.170.0190.00417.95
8.3.160.0170.00818.63
8.3.150.0140.00717.17
8.3.140.0090.00616.86
8.3.130.0150.00516.84
8.3.120.0190.00818.69
8.3.110.0220.00417.78
8.3.100.0200.00723.74
8.3.90.0240.00922.34
8.3.80.0260.00922.27
8.3.70.0280.00821.91
8.3.60.0250.00922.68
8.3.50.0270.00523.58
8.3.40.0200.01023.52
8.3.30.0190.00823.29
8.3.20.0200.00823.86
8.3.10.0180.00524.37
8.3.00.0190.00723.86
8.2.290.0070.01220.56
8.2.280.0170.00717.83
8.2.270.0160.01417.11
8.2.260.0200.01018.46
8.2.250.0180.00816.82
8.2.240.0220.00417.97
8.2.230.0230.00619.77
8.2.220.0140.00826.19
8.2.210.0190.00824.36
8.2.200.0170.00721.78
8.2.190.0210.00621.97
8.2.180.0170.00623.02
8.2.170.0210.00623.56
8.2.160.0220.00624.34
8.2.150.0230.00424.89
8.2.140.0180.00724.80
8.2.130.0200.00925.03
8.2.120.0210.00424.14
8.2.110.0220.00623.29
8.2.100.0230.01022.97
8.2.90.0240.00822.98
8.2.80.0270.00523.07
8.2.70.0190.00721.22
8.2.60.0190.00721.29
8.2.50.0210.00621.28
8.2.40.0180.00720.91
8.2.30.0190.00721.11
8.2.20.0170.00621.11
8.2.10.0170.00620.67
8.2.00.0160.00820.65
8.1.330.0110.00822.13
8.1.320.0140.00716.75
8.1.310.0120.00217.78
8.1.300.0090.00618.49
8.1.290.0190.00422.38
8.1.280.0230.00824.47
8.1.270.0200.00624.70
8.1.260.0200.00825.01
8.1.250.0220.00525.29
8.1.240.0190.00624.42
8.1.230.0200.00523.34
8.1.220.0210.00622.84
8.1.210.0220.00722.94
8.1.200.0190.00621.05
8.1.190.0180.00621.01
8.1.180.0160.00821.11
8.1.170.0180.00420.91
8.1.160.0180.00720.91
8.1.150.0180.00720.86
8.1.140.0150.00820.69
8.1.130.0180.00620.44
8.1.120.0160.00520.34
8.1.110.0170.00420.35
8.1.100.0150.00720.39
8.1.90.0160.00620.40
8.1.80.0170.00520.36
8.1.70.0150.00620.15
8.1.60.0150.00620.12
8.1.50.0160.00619.76
8.1.40.0160.00619.81
8.1.30.0130.00719.43
8.1.20.0160.00619.60
8.1.10.0150.00719.62
8.1.00.0140.00619.56
8.0.300.0180.00723.00
8.0.290.0170.00620.77
8.0.280.0190.00520.66
8.0.270.0170.00420.49
8.0.260.0140.00620.21
8.0.250.0140.00720.21
8.0.240.0180.00620.04
8.0.230.0170.00620.02
8.0.220.0170.00619.97
8.0.210.0170.00520.01
8.0.200.0150.00519.78
8.0.190.0150.00619.61
8.0.180.0160.00519.26
8.0.170.0160.00519.28
8.0.160.0150.00619.26
8.0.150.0140.00619.24
8.0.140.0130.00719.08
8.0.130.0140.00518.82
8.0.120.0150.00619.00
8.0.110.0140.00418.89
8.0.100.0150.00418.79
8.0.90.0120.00618.79
8.0.80.0130.00518.62
8.0.70.0120.00518.78
8.0.60.0130.00618.80
8.0.50.0150.00618.77
8.0.30.0120.00718.57
8.0.20.0130.00718.61
8.0.10.0150.00518.78
8.0.00.0140.00518.62
7.4.330.0140.00418.97
7.4.320.0180.00619.95
7.4.300.0140.00418.77
7.4.290.0170.00519.18
7.4.280.0190.00419.14
7.4.270.0160.00619.02
7.4.260.0150.00518.90
7.4.250.0140.00618.91
7.4.240.0140.00518.79
7.4.230.0160.00518.67
7.4.220.0140.00518.68
7.4.210.0120.00718.51
7.4.200.0130.00618.69
7.4.190.0130.00518.82
7.4.180.0120.00618.83
7.4.160.0130.00518.62
7.4.150.0140.00518.66
7.4.140.0130.00518.49
7.4.130.0140.00618.22
7.4.120.0130.00618.19
7.4.110.0140.00618.27
7.4.100.0140.00618.15
7.4.90.0130.00718.11
7.4.80.0140.00618.10
7.4.70.0130.00618.04
7.4.60.0130.00618.04
7.4.50.0120.00718.01
7.4.40.0130.00617.97
7.4.30.0120.00617.97
7.4.20.0120.00717.81
7.4.10.0120.00617.78
7.4.00.0110.00717.66
7.3.330.0160.00618.55
7.3.320.0170.00418.54
7.3.310.0140.00618.74
7.3.300.0150.00618.47
7.3.290.0150.00518.43
7.3.280.0160.00418.33
7.3.270.0160.00518.53
7.3.260.0130.00718.26
7.3.250.0140.00518.04
7.3.240.0140.00518.20
7.3.230.0140.00618.11
7.3.220.0150.00617.96
7.3.210.0150.00617.94
7.3.200.0140.00617.93
7.3.190.0140.00717.88
7.3.180.0150.00617.89
7.3.170.0150.00717.90
7.3.160.0140.00717.83
7.3.150.0140.00617.84
7.3.140.0140.00717.85
7.3.130.0140.00717.64
7.3.120.0140.00717.52
7.3.110.0140.00717.46
7.3.100.0140.00617.36
7.3.90.0130.00717.33
7.3.80.0110.00817.08
7.3.70.0110.00817.12
7.3.60.0120.00617.09
7.3.50.0130.00617.03
7.3.40.0110.00817.03
7.3.30.0120.00816.97
7.3.20.0140.00717.53
7.3.10.0180.00817.49
7.3.00.0160.00717.43
7.2.340.0160.00618.13
7.2.330.0170.00618.06
7.2.320.0150.00618.00
7.2.310.0150.00817.97
7.2.300.0150.00718.01
7.2.290.0150.00617.98
7.2.280.0140.00717.96
7.2.270.0140.00817.96
7.2.260.0140.00817.76
7.2.250.0130.00917.68
7.2.240.0140.00917.63
7.2.230.0130.00817.48
7.2.220.0140.00717.34
7.2.210.0130.00717.19
7.2.200.0130.00817.25
7.2.190.0130.00817.14
7.2.180.0140.00817.12
7.2.170.0130.00817.15
7.2.160.0120.00817.11
7.2.150.0150.00717.73
7.2.140.0180.00717.70
7.2.130.0180.00817.63
7.2.120.0190.00717.50
7.2.110.0240.00717.40
7.2.100.0280.00717.34
7.2.90.0250.00817.32
7.2.80.0280.00817.34
7.2.70.0280.00817.38
7.2.60.0270.00717.38
7.2.50.0270.00817.35
7.2.40.0330.00817.42
7.2.30.0350.00817.46
7.2.20.0350.00817.45
7.2.10.0340.00917.44
7.2.00.0300.00617.43
7.1.330.0160.00617.44
7.1.320.0190.00717.16
7.1.310.0150.00617.00
7.1.300.0160.00616.91
7.1.290.0160.00716.89
7.1.280.0140.00716.87
7.1.270.0150.00716.82
7.1.260.0150.00716.79
7.1.250.0180.00716.69
7.1.240.0190.00816.53
7.1.230.0230.00616.45
7.1.220.0320.00816.41
7.1.210.0330.00716.41
7.1.200.0290.00616.43
7.1.190.0300.00716.45
7.1.180.0250.00816.43
7.1.170.0280.00716.45
7.1.160.0370.00816.46
7.1.150.0270.00716.51
7.1.140.0450.00716.48
7.1.130.0370.00716.46
7.1.120.0310.00816.48
7.1.110.0320.00716.49
7.1.100.0290.00716.52
7.1.90.0320.00716.50
7.1.80.0240.00716.51
7.1.70.0260.00716.45
7.1.60.0250.00618.08
7.1.50.0280.00718.06
7.1.40.0270.00718.08
7.1.30.0290.00618.07
7.1.20.0280.00718.04
7.1.10.0290.00816.42
7.1.00.0280.00716.42
7.0.330.0200.00716.41
7.0.320.0200.00816.31
7.0.310.0290.00716.19
7.0.300.0270.00616.18
7.0.290.0280.00716.19
7.0.280.0230.00716.17
7.0.270.0290.00616.20
7.0.260.0300.00716.18
7.0.250.0280.00816.25
7.0.240.0300.00716.28
7.0.230.0370.00716.22
7.0.220.0350.00716.21
7.0.210.0250.00716.16
7.0.200.0270.00716.16
7.0.190.0270.00716.17
7.0.180.0260.00716.16
7.0.170.0240.00716.15
7.0.160.0250.00716.16
7.0.150.0240.00816.11
7.0.140.0290.00716.16
7.0.130.0260.00816.19
7.0.120.0270.00616.20
7.0.110.0250.00716.14
7.0.100.0240.00716.15
7.0.90.0260.00716.11
7.0.80.0360.00716.10
7.0.70.0240.00716.09
7.0.60.0260.00716.13
7.0.50.0240.00716.11
7.0.40.0260.00716.14
7.0.30.0310.00616.12
7.0.20.0240.00616.07
7.0.10.0220.00716.11
7.0.00.0220.00716.08
5.6.400.0140.00916.45
5.6.390.0160.00916.49
5.6.380.0140.00816.13
5.6.370.0140.00916.18
5.6.360.0150.00916.17
5.6.350.0140.00916.22
5.6.340.0140.01016.19
5.6.330.0140.00916.17
5.6.320.0150.00916.17
5.6.310.0140.00916.19
5.6.300.0140.01216.35
5.6.290.0140.01116.36
5.6.280.0140.01116.38
5.6.270.0150.01116.36
5.6.260.0130.01116.31
5.6.250.0130.01116.32
5.6.240.0140.01116.34
5.6.230.0140.01016.35
5.6.220.0140.01116.31
5.6.210.0150.01016.34
5.6.200.0150.01116.34
5.6.190.0140.01116.36
5.6.180.0150.01016.33
5.6.170.0130.01216.37
5.6.160.0140.01216.33
5.6.150.0130.01216.35
5.6.140.0150.01016.32
5.6.130.0140.01116.34
5.6.120.0140.01116.34
5.6.110.0130.01116.33
5.6.100.0130.01216.33
5.6.90.0150.01016.28
5.6.80.0140.01116.25
5.6.70.0130.01116.26
5.6.60.0130.01116.29
5.6.50.0140.01016.23
5.6.40.0130.01116.27
5.6.30.0130.01016.25
5.6.20.0130.01116.24
5.6.10.0140.01016.25
5.6.00.0140.01016.26
4.3.00.0040.00114.84

preferences:
29.24 ms | 403 KiB | 5 Q