3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get() { return SOME_CONST; } define('sOmE_CoNsT', 1, true); echo get(); // Prints 1 define('SOME_CONST', 2); echo get(); // Prints 2
based on 8atvM

Here you find the average performance (time & memory) of each version. A greyed 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.1.120.1120.01716.56
7.1.110.0380.01216.10
7.1.100.0730.01016.02
7.1.90.0600.01315.75
7.1.80.0630.00916.04
7.1.70.0340.01515.19
7.1.60.0700.02033.01
7.1.50.0510.01432.88
7.1.40.0510.01632.40
7.1.30.0600.01632.53
7.1.20.0580.01932.63
7.1.10.0270.01214.61
7.1.00.0500.00714.66
7.0.250.0650.00915.63
7.0.240.0760.00415.58
7.0.230.0680.01115.64
7.0.220.0580.01015.62
7.0.210.0560.00914.60
7.0.200.0620.00814.88
7.0.190.0470.00614.62
7.0.180.0370.00914.34
7.0.170.0530.01114.38
7.0.160.0580.01014.26
7.0.150.0310.00914.21
7.0.140.0360.00814.27
7.0.130.0320.01214.58
7.0.120.0430.00914.62
7.0.110.0410.01014.35
7.0.100.0420.01014.41
7.0.90.0320.00714.33
7.0.80.0400.00914.35
7.0.70.0470.00914.38
7.0.60.0300.01114.16
7.0.50.0320.00914.52
7.0.40.0330.01414.55
7.0.30.0380.00814.44
7.0.20.0320.01014.42
7.0.10.0430.01114.33
7.0.00.0290.01014.40
hhvm-3.22.00.1440.22489.88
hhvm-3.21.30.1060.20689.52
hhvm-3.21.00.1610.20489.21
hhvm-3.20.20.1150.20889.93
hhvm-3.19.20.0870.22888.86
hhvm-3.18.50.0740.19687.62
hhvm-3.18.40.0950.20887.85
hhvm-3.17.30.0840.20786.94
hhvm-3.15.40.0780.17184.65
hhvm-3.13.20.1100.20096.16
hhvm-3.12.140.0790.18795.02
hhvm-3.11.10.1060.17887.11
hhvm-3.10.10.0920.17484.00
5.6.300.0120.05920.70
5.6.290.0140.07020.93
5.6.280.0150.06820.84
5.6.270.0150.06520.88
5.6.260.0180.07320.88
5.6.250.0230.06020.85
5.6.240.0180.06220.86
5.6.230.0140.07220.88
5.6.220.0130.07020.74
5.6.210.0130.06320.80
5.6.200.0120.06120.84
5.6.190.0090.06220.85
5.6.180.0130.06320.86
5.6.170.0160.06320.80
5.6.160.0080.06420.80
5.6.150.0150.06120.92
5.6.140.0150.06020.77
5.6.130.0120.06520.93
5.6.120.0160.06220.81
5.6.110.0120.06420.84
5.6.100.0100.06520.72
5.6.90.0150.05020.69
5.6.80.0150.05820.15
5.6.70.0160.05720.23
5.6.60.0160.05520.21
5.6.50.0150.05420.11
5.6.40.0090.06420.22
5.6.30.0140.05920.11
5.6.20.0150.05120.07
5.6.10.0090.05520.21
5.6.00.0080.05920.24
5.5.380.0150.05717.47
5.5.370.0160.05717.51
5.5.360.0150.06317.45
5.5.350.0120.06817.45
5.5.340.0130.05517.83
5.5.330.0100.05517.90
5.5.320.0140.05718.00
5.5.310.0180.05717.95
5.5.300.0120.06117.95
5.5.290.0150.06117.86
5.5.280.0140.06217.80
5.5.270.0170.05218.02
5.5.260.0090.06518.00
5.5.250.0180.05617.78
5.5.240.0120.06117.31
5.5.230.0110.05517.35
5.5.220.0090.05917.21
5.5.210.0130.05817.41
5.5.200.0120.06417.42
5.5.190.0100.06217.20
5.5.180.0110.05517.35
5.5.160.0150.05617.38
5.5.150.0150.05017.35
5.5.140.0140.04917.26
5.5.130.0120.05317.31
5.5.120.0120.04817.27
5.5.110.0070.06317.27
5.5.100.0150.05617.16
5.5.90.0140.05117.29
5.5.80.0060.05817.25
5.5.70.0090.05417.18
5.5.60.0110.05617.13
5.5.50.0110.04817.14
5.5.40.0160.04717.18
5.5.30.0120.05917.26
5.5.20.0130.06117.24
5.5.10.0100.06817.28
5.5.00.0080.06017.18
5.4.450.0120.06419.38
5.4.440.0130.06319.39
5.4.430.0160.05719.25
5.4.420.0130.05719.33
5.4.410.0100.06419.16
5.4.400.0110.05819.02
5.4.390.0100.06018.98
5.4.380.0100.05518.96
5.4.370.0150.05619.04
5.4.360.0080.06519.09
5.4.350.0120.06018.93
5.4.340.0100.06219.07
5.4.320.0090.06119.05
5.4.310.0080.05418.97
5.4.300.0080.05719.06
5.4.290.0080.06019.05
5.4.280.0130.05719.14
5.4.270.0180.04918.96
5.4.260.0060.06119.06
5.4.250.0110.05619.03
5.4.240.0060.05618.97
5.4.230.0110.05119.00
5.4.220.0140.05819.04
5.4.210.0100.05418.98
5.4.200.0100.05019.05
5.4.190.0110.06519.04
5.4.180.0130.04818.97
5.4.170.0080.06319.01
5.4.160.0160.05019.02
5.4.150.0080.06919.08
5.4.140.0120.05016.41
5.4.130.0100.05216.56
5.4.120.0090.04916.56
5.4.110.0130.05316.62
5.4.100.0140.05816.55
5.4.90.0140.05816.60
5.4.80.0140.04416.56
5.4.70.0080.06716.58
5.4.60.0110.05916.66
5.4.50.0120.05616.58
5.4.40.0140.05016.53
5.4.30.0120.05116.63
5.4.20.0100.06116.51
5.4.10.0130.06016.51
5.4.00.0020.06216.11
5.3.290.0130.05514.81
5.3.280.0130.04914.76
5.3.270.0160.05414.82
5.3.260.0110.05614.76
5.3.250.0080.05914.70
5.3.240.0050.06314.85
5.3.230.0100.05014.65
5.3.220.0130.05514.57
5.3.210.0130.05114.79
5.3.200.0120.05514.69
5.3.190.0120.06014.69
5.3.180.0060.06414.71
5.3.170.0130.05914.74
5.3.160.0150.05014.75
5.3.150.0100.05914.84
5.3.140.0150.04614.69
5.3.130.0120.06314.78
5.3.120.0160.05714.70
5.3.110.0110.07014.75
5.3.100.0160.04414.11
5.3.90.0130.05514.27
5.3.80.0140.05114.21
5.3.70.0120.05014.11
5.3.60.0070.05114.19
5.3.50.0120.05214.11
5.3.40.0110.05413.98
5.3.30.0130.04914.07
5.3.20.0130.05213.85
5.3.10.0170.04613.70
5.3.00.0150.04913.65
5.2.170.0110.04911.22
5.2.160.0100.04611.40
5.2.150.0100.04211.11
5.2.140.0090.04711.28
5.2.130.0110.03811.22
5.2.120.0070.04311.23
5.2.110.0090.04111.29
5.2.100.0080.04211.27
5.2.90.0110.03511.24
5.2.80.0100.04211.24
5.2.70.0090.05011.23
5.2.60.0120.03911.28
5.2.50.0110.03911.10
5.2.40.0080.03811.09
5.2.30.0150.03911.06
5.2.20.0070.04011.04
5.2.10.0110.04210.94
5.2.00.0110.04110.91
5.1.60.0080.03110.18
5.1.50.0060.03410.02
5.1.40.0080.03210.08
5.1.30.0090.03610.48
5.1.20.0090.03610.56
5.1.10.0090.03610.33
5.1.00.0130.03210.27
5.0.50.0060.0278.66
5.0.40.0060.0278.69
5.0.30.0090.0428.62
5.0.20.0050.0278.62
5.0.10.0070.0278.53
5.0.00.0090.0428.59
4.4.90.0060.0218.27
4.4.80.0050.0238.27
4.4.70.0060.0208.27
4.4.60.0090.0198.27
4.4.50.0030.0228.27
4.4.40.0000.0398.27
4.4.30.0070.0188.27
4.4.20.0050.0208.27
4.4.10.0060.0208.27
4.4.00.0000.0418.27
4.3.110.0060.0228.27
4.3.100.0030.0258.27
4.3.90.0060.0198.27
4.3.80.0110.0288.27
4.3.70.0030.0238.27
4.3.60.0090.0188.27
4.3.50.0040.0238.27
4.3.40.0010.0428.27
4.3.30.0040.0228.27
4.3.20.0040.0218.27
4.3.10.0020.0268.27
4.3.00.0030.0248.27