3v4l.org

run code in 200+ php & hhvm versions
<?php abstract class Result { private final function __construct() { } public static function success() { return new Success(); } public static function failure() { return new Failure(); } } final class Success extends Result { public static function fakeIt() { return new self(); } } final class Failure extends Result { } var_dump(Result::success()); var_dump(Result::failure()); Success::fakeIt();
based on QbJaF

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.4.0beta10.0070.00814.82
7.4.0alpha30.0090.00514.82
7.4.0alpha20.0070.00814.90
7.4.0alpha10.0070.00815.00
7.3.70.0080.00614.67
7.3.60.0070.00714.70
7.3.50.0080.00614.70
7.3.40.0070.00714.69
7.3.30.0080.00614.74
7.3.20.0110.00614.84
7.3.10.0200.00614.79
7.3.00.0110.00714.80
7.2.200.0070.00814.79
7.2.190.0050.00814.76
7.2.180.0060.01014.74
7.2.170.0070.00814.79
7.2.160.0080.00714.75
7.2.150.0110.00815.01
7.2.140.0130.00814.99
7.2.130.0120.00614.97
7.2.120.0130.00914.97
7.2.110.0130.00615.01
7.2.100.0250.00814.97
7.2.90.0120.00714.96
7.2.80.0240.00814.99
7.2.70.0190.00615.03
7.2.60.0120.00815.04
7.2.50.0110.00815.03
7.2.40.0120.00615.02
7.2.30.0170.00815.10
7.2.20.0170.00715.03
7.2.10.0130.00615.04
7.2.00.0110.00714.97
7.1.300.0110.00713.94
7.1.290.0160.00513.92
7.1.280.0220.00613.87
7.1.270.0100.00813.90
7.1.260.0160.00713.90
7.1.250.0110.00613.88
7.1.240.0200.00513.77
7.1.230.0300.00913.63
7.1.220.0200.00313.69
7.1.210.0170.00813.61
7.1.200.0180.00813.77
7.1.190.0170.00813.74
7.1.180.0200.00713.62
7.1.170.0150.00613.72
7.1.160.0270.00613.84
7.1.150.0190.00613.71
7.1.140.0200.00413.70
7.1.130.0160.00613.73
7.1.120.0130.00813.82
7.1.110.0170.00813.74
7.1.100.0480.00813.79
7.1.90.0170.00713.84
7.1.80.0160.00913.80
7.1.70.0130.01013.70
7.1.60.0170.00513.73
7.1.50.0180.00613.72
7.1.40.0170.00913.70
7.1.30.0140.00913.78
7.1.20.0230.00613.82
7.1.10.0790.00513.87
7.1.00.0190.00913.82
7.0.330.0140.00813.36
7.0.320.0210.00713.40
7.0.310.0140.00913.52
7.0.300.0170.00513.31
7.0.290.0180.00713.45
7.0.280.0150.01013.49
7.0.270.0150.01013.47
7.0.260.0230.00413.55
7.0.250.0280.00713.47
7.0.240.0190.00913.48
7.0.230.0170.00813.44
7.0.220.0170.01013.46
7.0.210.0200.00613.33
7.0.200.0180.00913.41
7.0.190.0180.00613.54
7.0.180.0150.00713.40
7.0.170.0180.00813.55
7.0.160.0200.00513.39
7.0.150.0180.00713.55
7.0.140.0440.00713.46
7.0.130.0150.00813.33
7.0.120.0180.00713.40
7.0.110.0190.00513.51
7.0.100.0190.00613.58
7.0.90.0230.00913.44
7.0.80.0180.00613.49
7.0.70.0160.00713.45
7.0.60.0160.00913.36
7.0.50.0160.00813.35
7.0.40.0200.00413.41
7.0.30.0150.00813.41
7.0.20.0130.00913.37
7.0.10.0140.00513.43
7.0.00.0280.00613.32
hhvm-3.22.00.1250.17991.03
hhvm-3.21.30.1160.17489.19
hhvm-3.21.00.1340.20489.15
hhvm-3.20.20.1420.18490.05
hhvm-3.19.20.1230.21688.94
hhvm-3.18.50.1170.17587.50
hhvm-3.18.40.1390.19187.64
hhvm-3.17.30.1150.17386.83
hhvm-3.15.40.1300.17884.60
hhvm-3.13.20.1320.18695.89
hhvm-3.12.140.1340.17894.53
hhvm-3.11.10.1240.18186.50
hhvm-3.10.10.1120.17583.44
5.6.400.0160.00714.30
5.6.390.0100.01014.13
5.6.380.0100.00913.99
5.6.370.0180.00414.25
5.6.360.0130.00814.23
5.6.350.0140.00814.31
5.6.340.0140.00814.20
5.6.330.0170.00314.23
5.6.320.0130.00714.35
5.6.310.0140.00714.15
5.6.300.0120.00914.10
5.6.290.0100.00914.12
5.6.280.0130.01114.14
5.6.270.0140.00814.27
5.6.260.0130.01014.18
5.6.250.0180.00514.22
5.6.240.0130.01014.22
5.6.230.0140.00914.13
5.6.220.0150.00514.24
5.6.210.0150.01014.22
5.6.200.0150.00514.12
5.6.190.0140.00914.24
5.6.180.0120.00914.18
5.6.170.0100.00914.16
5.6.160.0110.00914.08
5.6.150.0130.00914.08
5.6.140.0160.00714.18
5.6.130.0100.00714.17
5.6.120.0120.00814.28
5.6.110.0130.00614.08
5.6.100.0130.01014.15
5.6.90.0130.00514.20
5.6.80.0140.00714.13
5.6.70.0140.00713.98
5.6.60.0140.00814.02
5.6.50.0100.01013.98
5.6.40.0160.00614.10
5.6.30.0110.01014.11
5.6.20.0100.01114.08
5.6.10.0090.01214.06
5.6.00.0130.00614.04
5.5.380.0130.01014.07
5.5.370.0110.00914.10
5.5.360.0100.01313.99
5.5.350.0130.01014.17
5.5.340.0150.00813.99
5.5.330.0120.01014.09
5.5.320.0090.01014.13
5.5.310.0160.00714.01
5.5.300.0140.00614.20
5.5.290.0130.00714.14
5.5.280.0090.01114.07
5.5.270.0120.00914.13
5.5.260.0140.00514.03
5.5.250.0140.00613.92
5.5.240.0130.00614.09
5.5.230.0120.00813.86
5.5.220.0140.00514.10
5.5.210.0150.00713.91
5.5.200.0100.01113.96
5.5.190.0140.00714.02
5.5.180.0110.00813.97
5.5.170.0090.01214.02
5.5.160.0110.01013.91
5.5.150.0090.00814.08
5.5.140.0120.00813.83
5.5.130.0140.00914.14
5.5.120.0100.00914.02
5.5.110.0150.00414.05
5.5.100.0130.00613.92
5.5.90.0130.00613.97
5.5.80.0110.00813.95
5.5.70.0120.00714.10
5.5.60.0160.00614.01
5.5.50.0150.00613.91
5.5.40.0110.00713.93
5.5.30.0090.01314.04
5.5.20.0110.01013.96
5.5.10.0120.00714.03
5.5.00.0100.01014.00
5.4.450.0100.00511.34
5.4.440.0070.00711.34
5.4.430.0110.00311.34
5.4.420.0100.00611.34
5.4.410.0050.01011.34
5.4.400.0110.00311.34
5.4.390.0090.00411.34
5.4.380.0090.00311.34
5.4.370.0090.00611.34
5.4.360.0090.00811.34
5.4.350.0090.00411.34
5.4.340.0090.00711.34
5.4.330.0100.00511.34
5.4.320.0090.00711.34
5.4.310.0110.00411.34
5.4.300.0080.00711.34
5.4.290.0110.00411.34
5.4.280.0080.00511.34
5.4.270.0090.00311.34
5.4.260.0080.00511.34
5.4.250.0110.00411.34
5.4.240.0080.00511.34
5.4.230.0090.00611.34
5.4.220.0090.00611.34
5.4.210.0080.00411.34
5.4.200.0060.00811.34
5.4.190.0080.00611.34
5.4.180.0080.00611.34
5.4.170.0110.00411.34
5.4.160.0080.00711.34
5.4.150.0100.00611.34
5.4.140.0090.00611.34
5.4.130.0070.00711.34
5.4.120.0080.00611.34
5.4.110.0070.00711.34
5.4.100.0120.00311.34
5.4.90.0100.00711.34
5.4.80.0070.00711.34
5.4.70.0070.00711.34
5.4.60.0090.00711.34
5.4.50.0120.00311.34
5.4.40.0080.00811.34
5.4.30.0100.00711.34
5.4.20.0080.00711.34
5.4.10.0070.00511.34
5.4.00.0080.00511.34
5.3.290.0090.00411.34
5.3.280.0070.00811.34
5.3.270.0090.00411.34
5.3.260.0090.00711.34
5.3.250.0100.00711.34
5.3.240.0080.00611.34
5.3.230.0100.00511.34
5.3.220.0100.00311.34
5.3.210.0100.00411.34
5.3.200.0080.00711.34
5.3.190.0050.00611.34
5.3.180.0070.00711.34
5.3.170.0100.00211.34
5.3.160.0120.00311.34
5.3.150.0100.00611.34
5.3.140.0080.00611.34
5.3.130.0070.00911.34
5.3.120.0110.00311.34
5.3.110.0080.00511.34
5.3.100.0080.00411.34
5.3.90.0090.00611.34
5.3.80.0070.00511.34
5.3.70.0070.00511.34
5.3.60.0090.00611.34
5.3.50.0110.00211.34
5.3.40.0100.00411.34
5.3.30.0080.00511.34
5.3.20.0110.00411.34
5.3.10.0070.00611.34
5.3.00.0060.00911.34
5.2.170.0060.00511.34
5.2.160.0070.00511.34
5.2.150.0060.00511.34
5.2.140.0060.00511.34
5.2.130.0080.00411.34
5.2.120.0050.00511.34
5.2.110.0080.00311.34
5.2.100.0050.00611.34
5.2.90.0080.00511.34
5.2.80.0070.00511.34
5.2.70.0090.00111.34
5.2.60.0080.00411.34
5.2.50.0060.00511.34
5.2.40.0080.00311.34
5.2.30.0080.00411.34
5.2.20.0080.00411.34
5.2.10.0080.00411.34
5.2.00.0070.00511.34
5.1.60.0040.00611.34
5.1.50.0060.00411.34
5.1.40.0090.00411.34
5.1.30.0080.00211.34
5.1.20.0070.00511.34
5.1.10.0090.00311.34
5.1.00.0050.00511.34
5.0.50.0050.00511.34
5.0.40.0070.00111.34
5.0.30.0060.00211.34
5.0.20.0020.00511.34
5.0.10.0070.00211.34
5.0.00.0070.00111.34
4.4.90.0030.00411.34
4.4.80.0030.00411.34
4.4.70.0030.00511.34
4.4.60.0040.00411.34
4.4.50.0050.00211.34
4.4.40.0010.00511.34
4.4.30.0010.00611.34
4.4.20.0060.00311.34
4.4.10.0020.00511.34
4.4.00.0030.00511.34
4.3.110.0040.00411.34
4.3.100.0040.00511.34
4.3.90.0030.00411.34
4.3.80.0050.00111.34
4.3.70.0030.00311.34
4.3.60.0030.00511.34
4.3.50.0050.00211.34
4.3.40.0040.00311.34
4.3.30.0010.00511.34
4.3.20.0030.00411.34
4.3.10.0040.00311.34
4.3.00.0020.00411.34