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.130.0060.00316.71
8.3.120.0040.01220.41
8.3.110.0240.00318.06
8.3.100.0200.01027.13
8.3.90.0230.00924.13
8.3.80.0270.00924.04
8.3.70.0290.00923.55
8.3.60.0240.01024.11
8.3.50.0270.00524.90
8.3.40.0200.01124.98
8.3.30.0190.00824.27
8.3.20.0190.00825.13
8.3.10.0180.00525.70
8.3.00.0170.00825.10
8.2.250.0030.00616.67
8.2.240.0090.00018.98
8.2.230.0120.00422.58
8.2.220.0090.00830.80
8.2.210.0140.00826.83
8.2.200.0180.00823.39
8.2.190.0180.00623.64
8.2.180.0130.00624.53
8.2.170.0180.00525.01
8.2.160.0190.00426.01
8.2.150.0190.00426.43
8.2.140.0140.00726.26
8.2.130.0150.00926.53
8.2.120.0200.00425.41
8.2.110.0230.00524.09
8.2.100.0210.01023.87
8.2.90.0220.00823.86
8.2.80.0260.00423.97
8.2.70.0180.00621.63
8.2.60.0170.00721.73
8.2.50.0190.00621.71
8.2.40.0170.00721.26
8.2.30.0170.00721.48
8.2.20.0160.00621.47
8.2.10.0160.00620.97
8.2.00.0150.00820.93
8.1.300.0040.00420.02
8.1.290.0200.00424.18
8.1.280.0210.00926.34
8.1.270.0180.00626.18
8.1.260.0180.00726.54
8.1.250.0210.00526.89
8.1.240.0180.00625.82
8.1.230.0210.00524.33
8.1.220.0210.00623.76
8.1.210.0210.00723.87
8.1.200.0170.00621.49
8.1.190.0160.00621.44
8.1.180.0150.00821.54
8.1.170.0170.00421.28
8.1.160.0160.00621.29
8.1.150.0160.00721.21
8.1.140.0140.00820.98
8.1.130.0160.00620.75
8.1.120.0160.00620.62
8.1.110.0170.00520.60
8.1.100.0150.00720.64
8.1.90.0170.00620.66
8.1.80.0170.00520.60
8.1.70.0140.00620.39
8.1.60.0150.00620.30
8.1.50.0150.00519.91
8.1.40.0140.00619.95
8.1.30.0130.00719.52
8.1.20.0160.00619.99
8.1.10.0140.00719.75
8.1.00.0130.00619.70
8.0.300.0160.00624.00
8.0.290.0150.00621.19
8.0.280.0170.00521.03
8.0.270.0170.00420.84
8.0.260.0140.00620.50
8.0.250.0130.00720.48
8.0.240.0170.00520.30
8.0.230.0160.00620.27
8.0.220.0150.00620.22
8.0.210.0160.00520.26
8.0.200.0150.00519.99
8.0.190.0140.00619.80
8.0.180.0150.00519.41
8.0.170.0150.00519.42
8.0.160.0140.00519.40
8.0.150.0130.00619.38
8.0.140.0120.00719.21
8.0.130.0130.00518.92
8.0.120.0140.00619.11
8.0.110.0140.00418.99
8.0.100.0150.00418.88
8.0.90.0120.00618.88
8.0.80.0120.00518.70
8.0.70.0120.00518.87
8.0.60.0120.00618.89
8.0.50.0140.00618.86
8.0.30.0110.00718.64
8.0.20.0120.00718.68
8.0.10.0140.00518.87
8.0.00.0130.00418.69
7.4.330.0130.00419.09
7.4.320.0180.00520.20
7.4.300.0130.00418.87
7.4.290.0170.00519.32
7.4.280.0180.00419.28
7.4.270.0150.00619.14
7.4.260.0140.00519.00
7.4.250.0140.00619.02
7.4.240.0130.00518.89
7.4.230.0150.00518.76
7.4.220.0130.00518.77
7.4.210.0110.00618.58
7.4.200.0120.00618.78
7.4.190.0120.00618.92
7.4.180.0110.00618.93
7.4.160.0120.00418.69
7.4.150.0130.00518.74
7.4.140.0130.00518.55
7.4.130.0130.00618.27
7.4.120.0130.00618.23
7.4.110.0140.00618.32
7.4.100.0140.00618.20
7.4.90.0130.00718.15
7.4.80.0140.00618.14
7.4.70.0130.00618.07
7.4.60.0130.00618.08
7.4.50.0110.00818.05
7.4.40.0130.00618.01
7.4.30.0120.00618.01
7.4.20.0120.00717.83
7.4.10.0120.00617.80
7.4.00.0110.00717.68
7.3.330.0150.00618.64
7.3.320.0170.00418.63
7.3.310.0140.00618.83
7.3.300.0140.00618.55
7.3.290.0140.00518.50
7.3.280.0150.00418.39
7.3.270.0150.00518.61
7.3.260.0130.00718.32
7.3.250.0140.00518.08
7.3.240.0150.00518.25
7.3.230.0140.00618.16
7.3.220.0150.00618.00
7.3.210.0150.00717.97
7.3.200.0140.00617.97
7.3.190.0140.00717.91
7.3.180.0150.00617.93
7.3.170.0150.00717.94
7.3.160.0140.00717.86
7.3.150.0140.00617.87
7.3.140.0140.00717.88
7.3.130.0140.00717.66
7.3.120.0130.00717.53
7.3.110.0130.00717.48
7.3.100.0130.00617.37
7.3.90.0120.00717.34
7.3.80.0110.00817.09
7.3.70.0100.00817.12
7.3.60.0120.00617.09
7.3.50.0120.00617.04
7.3.40.0100.00817.03
7.3.30.0110.00816.98
7.3.20.0130.00617.51
7.3.10.0170.00817.48
7.3.00.0160.00717.41
7.2.340.0150.00618.18
7.2.330.0160.00618.09
7.2.320.0150.00618.04
7.2.310.0140.00818.01
7.2.300.0150.00718.05
7.2.290.0150.00618.01
7.2.280.0140.00718.00
7.2.270.0140.00817.99
7.2.260.0140.00817.78
7.2.250.0130.00917.70
7.2.240.0130.00917.64
7.2.230.0130.00817.50
7.2.220.0130.00717.35
7.2.210.0130.00717.20
7.2.200.0130.00817.26
7.2.190.0120.00717.15
7.2.180.0130.00817.13
7.2.170.0130.00817.15
7.2.160.0120.00817.11
7.2.150.0150.00717.72
7.2.140.0180.00717.69
7.2.130.0170.00817.61
7.2.120.0190.00717.48
7.2.110.0240.00717.38
7.2.100.0280.00717.32
7.2.90.0250.00817.31
7.2.80.0280.00817.32
7.2.70.0280.00817.36
7.2.60.0270.00717.36
7.2.50.0270.00817.34
7.2.40.0330.00817.41
7.2.30.0360.00817.45
7.2.20.0350.00817.43
7.2.10.0350.00917.42
7.2.00.0300.00617.41
7.1.330.0160.00617.45
7.1.320.0190.00717.16
7.1.310.0140.00616.99
7.1.300.0150.00616.91
7.1.290.0160.00716.88
7.1.280.0140.00716.87
7.1.270.0150.00716.81
7.1.260.0150.00716.79
7.1.250.0180.00716.68
7.1.240.0190.00816.52
7.1.230.0230.00616.44
7.1.220.0320.00816.40
7.1.210.0330.00716.40
7.1.200.0290.00616.42
7.1.190.0300.00716.44
7.1.180.0250.00816.42
7.1.170.0280.00716.44
7.1.160.0380.00816.45
7.1.150.0270.00716.49
7.1.140.0460.00716.46
7.1.130.0380.00716.45
7.1.120.0310.00816.47
7.1.110.0330.00716.48
7.1.100.0290.00716.50
7.1.90.0320.00716.49
7.1.80.0240.00716.50
7.1.70.0270.00716.43
7.1.60.0250.00618.10
7.1.50.0280.00718.08
7.1.40.0270.00718.09
7.1.30.0290.00618.09
7.1.20.0280.00718.05
7.1.10.0290.00816.40
7.1.00.0280.00716.40
7.0.330.0200.00716.40
7.0.320.0200.00816.30
7.0.310.0300.00716.17
7.0.300.0270.00616.17
7.0.290.0280.00716.17
7.0.280.0240.00716.15
7.0.270.0290.00716.18
7.0.260.0300.00716.16
7.0.250.0280.00816.23
7.0.240.0300.00716.26
7.0.230.0370.00716.21
7.0.220.0360.00716.20
7.0.210.0250.00716.15
7.0.200.0270.00716.15
7.0.190.0270.00716.15
7.0.180.0260.00716.14
7.0.170.0250.00716.14
7.0.160.0260.00716.14
7.0.150.0240.00816.09
7.0.140.0290.00816.15
7.0.130.0270.00816.18
7.0.120.0270.00616.19
7.0.110.0260.00716.13
7.0.100.0240.00716.13
7.0.90.0260.00716.09
7.0.80.0360.00716.09
7.0.70.0240.00716.08
7.0.60.0260.00716.11
7.0.50.0240.00716.10
7.0.40.0260.00716.13
7.0.30.0310.00616.11
7.0.20.0240.00616.06
7.0.10.0220.00716.10
7.0.00.0220.00716.06
5.6.400.0130.01016.44
5.6.390.0150.00916.48
5.6.380.0140.00816.12
5.6.370.0140.00916.17
5.6.360.0150.00916.16
5.6.350.0140.00916.20
5.6.340.0130.01016.17
5.6.330.0140.00916.16
5.6.320.0150.00916.16
5.6.310.0140.00916.18
5.6.300.0140.01216.33
5.6.290.0130.01216.35
5.6.280.0140.01116.37
5.6.270.0140.01116.35
5.6.260.0130.01116.30
5.6.250.0130.01116.31
5.6.240.0140.01116.33
5.6.230.0140.01116.34
5.6.220.0140.01116.30
5.6.210.0150.01016.33
5.6.200.0150.01116.33
5.6.190.0140.01116.35
5.6.180.0150.01016.32
5.6.170.0130.01216.36
5.6.160.0130.01216.32
5.6.150.0130.01216.33
5.6.140.0150.01016.31
5.6.130.0140.01116.33
5.6.120.0140.01216.33
5.6.110.0130.01216.31
5.6.100.0130.01216.32
5.6.90.0150.01016.27
5.6.80.0130.01116.23
5.6.70.0130.01116.25
5.6.60.0120.01116.27
5.6.50.0140.01016.22
5.6.40.0130.01116.26
5.6.30.0130.01016.23
5.6.20.0130.01116.22
5.6.10.0130.01016.23
5.6.00.0140.01016.25

preferences:
28.46 ms | 403 KiB | 5 Q