3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL|E_SRTICT); class Foo { const FOO = 'foo'; } class Bar extends Foo { function showFoo() { return self::FOO; } } $bar = new Bar(); var_dump($bar->showFoo());
based on qh86H

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.2.60.0070.00916.61
7.2.00.0060.00619.18
7.1.200.0040.00715.63
7.1.100.0100.00318.06
7.1.70.0030.00617.32
7.1.60.0170.00719.13
7.1.50.0060.01916.83
7.1.00.0170.06022.28
7.0.200.0250.00414.49
7.0.60.0030.04019.96
7.0.50.0000.04717.86
7.0.40.0170.06720.30
7.0.30.0570.05720.07
7.0.20.0200.04320.26
7.0.10.0030.05020.15
7.0.00.0000.04320.07
5.6.280.0000.07720.90
5.6.210.0070.03720.75
5.6.200.0130.07718.20
5.6.190.0070.08320.45
5.6.180.0400.06720.64
5.6.170.0230.04720.39
5.6.160.0030.07320.45
5.6.150.0070.03318.17
5.6.140.0030.07718.17
5.6.130.0070.05718.18
5.6.120.0030.09320.96
5.6.110.0030.07720.89
5.6.100.0070.08321.04
5.6.90.0130.03320.88
5.6.80.0200.06720.37
5.5.350.0270.07720.41
5.5.340.0100.04317.97
5.5.330.0030.07720.30
5.5.320.0400.08020.52
5.5.310.0370.06320.27
5.5.300.0100.05717.96
5.5.290.0100.08318.08
5.5.280.0100.06720.90
5.5.270.0130.04720.63
5.5.260.0130.07720.80
5.5.250.0170.07020.50
5.5.240.0100.03320.22
5.4.450.0570.06019.34
5.4.440.0570.06019.34
5.4.430.0730.05319.57
5.4.420.0530.06019.60
5.4.410.0700.04319.32
5.4.400.0630.04719.15
5.4.390.0630.05318.98
5.4.380.0630.05019.15
5.4.370.0570.06019.14
5.4.360.0500.06719.26
5.4.350.0770.06019.15
5.4.340.0630.05319.30
5.4.320.0730.05318.89
5.4.310.0630.05719.31
5.4.300.0600.05719.38
5.4.290.0700.05019.30
5.4.280.0830.04319.26
5.4.270.0730.05019.26
5.4.260.0700.04319.15
5.4.250.0630.05318.86
5.4.240.0670.05019.37
5.4.230.0570.06019.14
5.4.220.0630.05319.21
5.4.210.0630.05319.15
5.4.200.0670.04719.14
5.4.190.0670.05019.29
5.4.180.0630.05319.21
5.4.170.0600.05719.29
5.4.160.0670.07719.13
5.4.150.0670.05719.30
5.4.140.0570.05316.52
5.4.130.0630.04716.57
5.4.120.0600.05016.49
5.4.110.0630.05316.70
5.4.100.0600.05316.48
5.4.90.0570.05716.57
5.4.80.0600.06016.48
5.4.70.0230.04716.40
5.4.60.0170.03016.53
5.4.50.0030.04716.34
5.4.40.0130.07316.54
5.4.30.0100.06716.48
5.4.20.0300.05316.55
5.4.10.0200.04016.16
5.3.290.0330.05314.78
5.3.280.0270.03714.60
5.3.270.0370.03714.68
5.3.260.0230.08014.53
5.3.250.0270.05314.72
5.3.240.0370.03714.59
5.3.230.0270.03314.84
5.3.220.0330.05314.65
5.3.210.1170.07714.64
5.3.200.1030.04314.68
5.3.190.1300.02714.55
5.3.180.1230.05014.49