3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $strings = '"int2", "int4", "oid", "int8", "cash", "money", "numeric", "float4", "float8", "bpchar", "char", "char2", "char4", "char8", "char16", "varchar", "text", "name", "filename", "bytea", "bool", "bit", "date", "time", "timetz", "abstime", "timestamp", "timestamptz", "_bool", "_char", "_int2", "_int4", "_text", "_oid", "_varchar", "_int8", "_float4", "_float8", "_abstime", "_date", "_time", "_timestamp", "_numeric", "_bytea"'; $integers = 'Types.SMALLINT, Types.INTEGER, Types.INTEGER, Types.BIGINT, Types.DOUBLE, Types.DOUBLE, Types.NUMERIC, Types.REAL, Types.DOUBLE, Types.CHAR, Types.CHAR, Types.CHAR, Types.CHAR, Types.CHAR, Types.CHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.BINARY, Types.BOOLEAN, Types.BIT, Types.DATE, Types.TIME, Types.TIME, Types.TIMESTAMP, Types.TIMESTAMP, Types.TIMESTAMP, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY, Types.ARRAY'; $strings = explode(',', preg_replace('/s+/', '', $strings)); $integers = explode(',', preg_replace('/s+/', '', $integers)); $length = size($strings); for ($i = 0; $i < $length; ++$i) { printf('map.put(%s, %s)', $strings[$i], $integers[$i]); echo PHP_EOL; }

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0040.01116.41
7.3.00.0100.00316.48
7.2.130.0100.00717.05
7.2.120.0060.00917.05
7.2.110.0100.00316.98
7.2.100.0120.00616.99
7.2.90.0070.00417.24
7.2.80.0070.00716.91
7.2.70.0000.01616.77
7.2.60.0050.00716.99
7.2.50.0000.01417.00
7.2.40.0060.00917.10
7.2.30.0070.00716.73
7.2.20.0000.01516.97
7.2.10.0000.01017.12
7.2.00.0050.01018.24
7.1.250.0030.01316.01
7.1.200.0030.01015.79
7.1.100.0000.00818.20
7.1.70.0000.00717.06
7.1.60.0120.01219.82
7.1.50.0070.01716.84
7.1.00.0070.07322.41
7.0.200.0070.00016.87
7.0.140.0100.06722.04
7.0.60.0170.06719.94
7.0.50.0000.05317.79
7.0.40.0070.05319.94
7.0.30.0370.07020.20
7.0.20.0300.07720.26
7.0.10.0170.07320.18
7.0.00.0130.04320.03
5.6.280.0030.07320.93
5.6.210.0100.08020.72
5.6.200.0030.05018.10
5.6.190.0030.04320.69
5.6.180.3730.04720.56
5.6.170.0270.07320.49
5.6.160.0100.07020.47
5.6.150.0100.05318.16
5.6.140.0030.04318.12
5.6.130.0100.04318.15
5.6.120.0170.08020.96
5.6.110.0070.04020.99
5.6.100.0100.05020.98
5.6.90.0070.05020.98
5.6.80.0070.08320.39
5.6.70.3570.04320.27
5.5.350.0230.05020.34
5.5.340.0070.07717.88
5.5.330.0000.04720.29
5.5.320.0100.04720.49
5.5.310.0130.08320.32
5.5.300.0100.07717.98
5.5.290.0070.08717.91
5.5.280.0100.04020.80
5.5.270.0030.05020.75
5.5.260.0100.04020.64
5.5.250.0000.06720.68
5.5.240.0300.06320.15
5.4.450.0500.06319.11
5.4.440.0700.06719.48
5.4.430.0130.06719.62
5.4.420.0600.05319.47
5.4.410.0770.07019.41
5.4.400.0800.05319.00
5.4.390.0970.06019.25
5.4.380.0230.06018.77
5.4.370.0170.04318.50
5.4.360.0170.03718.51
5.4.350.0090.03111.99
5.4.340.0040.03811.98
5.4.320.0070.03312.48
5.4.310.0030.04012.47
5.4.300.0040.03712.47
5.4.290.0050.03712.47
5.4.280.0080.03212.37
5.4.270.0170.06318.58
5.4.260.0200.06318.84
5.4.250.0070.09018.75
5.4.240.0070.05718.74
5.4.230.0130.05718.60
5.4.220.0100.07718.77
5.4.210.0070.06018.65
5.4.200.0130.06718.65
5.4.190.0030.05718.63
5.4.180.0170.05718.67
5.4.170.0070.07718.66
5.4.160.0230.05718.77
5.4.150.0200.07318.84
5.4.140.0200.06316.41
5.4.130.0200.07016.50
5.4.120.0370.05316.50
5.4.110.0170.06716.36
5.4.100.0100.06716.36
5.4.90.0130.04716.10
5.4.80.0230.04016.14
5.4.70.0030.07016.33
5.4.60.0100.05716.11
5.4.50.0170.05716.11
5.4.40.0170.06716.29
5.4.30.0100.05316.41
5.4.20.0230.04316.46
5.4.10.0170.06716.26
5.4.00.0070.05315.73
5.3.290.0030.04112.80
5.3.280.0130.06014.48
5.3.270.0170.05014.63
5.3.260.0000.07014.48
5.3.250.0070.08014.64
5.3.240.0130.05014.63
5.3.230.0230.05014.62
5.3.220.0070.07314.42
5.3.210.0230.05714.60
5.3.200.0130.05714.36
5.3.190.0100.06014.46
5.3.180.0170.04314.45
5.3.170.0070.06014.57
5.3.160.0100.07014.49
5.3.150.0170.06314.64
5.3.140.0170.05314.34
5.3.130.0070.06314.41
5.3.120.0070.06714.42
5.3.110.0130.05714.58
5.3.100.0130.06013.82
5.3.90.0170.04714.03
5.3.80.0170.05313.73
5.3.70.0170.04714.04
5.3.60.0130.07013.88
5.3.50.0100.06713.66
5.3.40.0100.05013.98
5.3.30.0100.04713.81
5.3.20.0230.05013.86
5.3.10.0070.07013.81
5.3.00.0100.05313.64
5.2.170.0100.05311.31
5.2.160.0100.06010.92
5.2.150.0170.04010.93
5.2.140.0100.04011.27
5.2.130.0070.05311.13
5.2.120.0000.05711.11
5.2.110.0100.04011.13
5.2.100.0100.04011.00
5.2.90.0030.04711.13
5.2.80.0030.05711.26
5.2.70.0130.04310.94
5.2.60.0100.05711.09
5.2.50.0200.04311.15
5.2.40.0100.05010.91
5.2.30.0030.06710.93
5.2.20.0100.04711.00
5.2.10.0030.06010.71
5.2.00.0000.06710.82
5.1.60.0070.0339.86
5.1.50.0030.03710.07
5.1.40.0130.03710.05
5.1.30.0070.05010.56
5.1.20.0170.04710.25
5.1.10.0130.0339.84
5.1.00.0070.04310.31
5.0.50.0000.0408.62
5.0.40.0070.0338.45
5.0.30.0130.0338.14
5.0.20.0100.0338.15
5.0.10.0030.0338.17
5.0.00.0100.0438.23
4.4.90.0000.0337.01
4.4.80.0070.0337.01
4.4.70.0030.0277.01
4.4.60.0030.0277.01
4.4.50.0130.0207.01
4.4.40.0070.0407.01
4.4.30.0030.0207.01
4.4.20.0070.0277.01
4.4.10.0030.0207.01
4.4.00.0030.0437.01
4.3.110.0070.0337.01
4.3.100.0070.0277.01
4.3.90.0070.0177.01
4.3.80.0100.0407.01
4.3.70.0030.0337.01
4.3.60.0130.0237.01
4.3.50.0070.0237.01
4.3.40.0030.0377.00
4.3.30.0030.0307.00
4.3.20.0000.0237.00
4.3.10.0030.0277.00
4.3.00.0070.0237.40