3v4l.org

run code in 300+ PHP versions simultaneously
<?php function camelCaseToUnderscore($input) { return strtoupper(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.0170.00318.56
8.3.50.0150.00016.50
8.3.40.0150.00018.62
8.3.30.0060.00918.98
8.3.20.0070.00021.51
8.3.10.0040.00423.53
8.3.00.0080.00019.69
8.2.180.0120.00618.29
8.2.170.0100.00622.96
8.2.160.0090.00620.52
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0000.00720.52
8.2.120.0040.00426.35
8.2.110.0000.00920.50
8.2.100.0000.01217.80
8.2.90.0000.00819.05
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0000.00717.80
8.2.50.0040.00418.10
8.2.40.0040.00420.36
8.2.30.0030.00619.21
8.2.20.0030.00518.02
8.2.10.0040.00417.95
8.2.00.0070.00017.92
8.1.280.0200.00325.92
8.1.270.0000.00820.52
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.13
8.1.230.0110.00319.08
8.1.220.0030.00617.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0060.00318.64
8.1.160.0000.00718.98
8.1.150.0040.00420.59
8.1.140.0000.00719.46
8.1.130.0030.00518.79
8.1.120.0000.00717.45
8.1.110.0050.00317.55
8.1.100.0030.00617.49
8.1.90.0050.00217.38
8.1.80.0040.00417.40
8.1.70.0050.00517.37
8.1.60.0030.00617.63
8.1.50.0000.00817.49
8.1.40.0040.00417.57
8.1.30.0040.00417.77
8.1.20.0040.00417.79
8.1.10.0040.00417.69
8.1.00.0000.00817.53
8.0.300.0040.00420.02
8.0.290.0080.00016.75
8.0.280.0000.00718.32
8.0.270.0000.00717.13
8.0.260.0060.00018.96
8.0.250.0030.00616.98
8.0.240.0080.00017.05
8.0.230.0080.00017.00
8.0.220.0000.00716.90
8.0.210.0000.00716.82
8.0.200.0000.00616.98
8.0.190.0040.00416.94
8.0.180.0040.00416.90
8.0.170.0000.00716.87
8.0.160.0000.00716.88
8.0.150.0040.00416.75
8.0.140.0040.00416.84
8.0.130.0030.00413.37
8.0.120.0000.00716.80
8.0.110.0040.00416.87
8.0.100.0040.00416.78
8.0.90.0070.00016.73
8.0.80.0000.01716.90
8.0.70.0000.00716.69
8.0.60.0030.00516.95
8.0.50.0030.00516.93
8.0.30.0070.00917.01
8.0.20.0110.01017.41
8.0.10.0070.00017.04
8.0.00.0100.00716.64
7.4.330.0050.00015.55
7.4.320.0050.00316.69
7.4.300.0000.00616.65
7.4.290.0000.00716.79
7.4.280.0050.00316.73
7.4.270.0070.00016.77
7.4.260.0100.00016.71
7.4.250.0000.00816.63
7.4.240.0050.00316.52
7.4.230.0030.00316.73
7.4.220.0060.01216.70
7.4.210.0120.00916.63
7.4.200.0000.00716.55
7.4.160.0060.01116.53
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0090.00916.68
7.4.120.0070.01416.69
7.4.110.0120.00616.70
7.4.100.0100.00716.64
7.4.90.0090.00916.65
7.4.80.0090.01419.39
7.4.70.0140.00716.64
7.4.60.0100.00616.68
7.4.50.0070.00716.74
7.4.40.0090.00816.61
7.4.30.0120.01216.40
7.4.00.0050.01214.85
7.3.330.0000.00513.44
7.3.320.0000.00613.45
7.3.310.0040.00416.29
7.3.300.0030.00316.22
7.3.290.0100.00516.41
7.3.280.0100.00716.37
7.3.270.0030.01317.40
7.3.260.0080.00816.56
7.3.250.0050.01216.58
7.3.240.0100.00716.42
7.3.230.0070.01016.34
7.3.210.0140.00416.50
7.3.200.0100.00716.43
7.3.190.0160.00316.36
7.3.180.0090.00616.65
7.3.170.0130.00316.61
7.3.160.0060.01016.69
7.3.120.0040.01214.81
7.3.110.0060.01114.92
7.3.100.0020.01514.97
7.3.90.0070.00614.73
7.3.80.0050.01014.93
7.3.70.0040.00914.86
7.3.60.0010.00814.99
7.3.50.0060.00814.87
7.3.40.0080.00514.64
7.3.30.0070.00614.94
7.3.20.0040.00616.74
7.3.10.0080.00716.75
7.3.00.0070.00516.60
7.2.330.0110.01616.84
7.2.320.0100.01116.54
7.2.310.0070.01016.70
7.2.300.0100.00716.66
7.2.290.0100.00716.81
7.2.250.0030.01615.00
7.2.240.0090.01215.09
7.2.230.0090.00915.12
7.2.220.0050.01215.13
7.2.210.0060.00915.13
7.2.200.0060.00815.13
7.2.190.0060.00515.04
7.2.180.0030.01214.92
7.2.170.0100.00315.16
7.2.80.0140.00516.53
7.2.60.0030.01016.88
7.2.50.0060.00316.98
7.1.330.0090.00615.98
7.1.320.0060.00615.84
7.1.310.0080.00715.81
7.1.300.0060.00615.77
7.1.290.0050.00715.94
7.1.280.0090.00515.98
7.1.270.0080.00315.97
7.1.260.0030.00815.69
7.1.200.0100.00315.98
7.1.70.0040.00417.47
7.1.60.1000.01033.43
7.1.50.1000.00733.28
7.1.40.1570.01332.89
7.1.30.0200.02033.03
7.1.20.0170.02032.85
7.1.10.0130.01014.95
7.1.00.1300.00715.01
7.0.200.1430.01715.05
7.0.190.1330.00315.09
7.0.180.1030.01314.52
7.0.170.1670.01014.45
7.0.160.0100.00714.79
7.0.150.0070.01014.75
7.0.140.1870.01014.61
7.0.130.0070.01314.75
7.0.120.0030.01714.87
7.0.110.0070.01314.60
7.0.100.1430.01714.74
7.0.90.0070.01314.68
7.0.80.0100.01314.66
7.0.70.1130.01314.52
7.0.60.0800.01314.27
7.0.50.1030.01014.61
7.0.40.0100.00314.94
7.0.30.0800.01314.88
7.0.20.0630.01014.74
7.0.10.0130.01714.76
7.0.00.0000.01714.91

preferences:
56.84 ms | 401 KiB | 5 Q