3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php final class Foo { private $foo; public function __construct(string $foo) { $this->foo = $foo; } public function getFoo(): string { return $this->foo; } } $foo = new Foo('bar'); var_dump($foo->getFoo()); $foo->__construct('baz'); var_dump($foo->getFoo());

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.40.0080.00614.58
7.3.30.0090.00714.60
7.3.20.0090.00616.26
7.3.10.0080.00916.17
7.3.00.0080.00816.22
7.2.170.0090.00814.87
7.2.160.0100.00714.80
7.2.150.0130.00816.46
7.2.140.0100.00816.53
7.2.130.0100.00716.55
7.2.120.0090.00816.50
7.2.110.0130.00616.53
7.2.100.0090.00616.49
7.2.90.0080.00816.52
7.2.80.0090.00816.53
7.2.70.0100.00716.58
7.2.60.0090.00716.58
7.2.50.0080.00716.50
7.2.40.0080.00816.58
7.2.30.0090.00816.57
7.2.20.0070.01016.61
7.2.10.0090.00716.58
7.2.00.0060.00916.52
7.1.280.0080.00615.42
7.1.270.0080.00815.39
7.1.260.0070.00815.43
7.1.250.0090.00815.38
7.1.240.0070.01015.38
7.1.230.0090.00815.55
7.1.220.0100.00915.39
7.1.210.0090.00915.42
7.1.200.0080.00815.39
7.1.190.0090.00815.41
7.1.180.0070.00715.35
7.1.170.0120.00715.46
7.1.160.0110.01015.57
7.1.150.0050.00715.52
7.1.140.0150.00215.57
7.1.130.0110.00515.46
7.1.120.0100.01015.45
7.1.110.0110.00815.61
7.1.100.0100.00515.59
7.1.90.0080.00715.45
7.1.80.0110.00715.38
7.1.70.0110.00515.53
7.1.60.0100.00915.31
7.1.50.0100.00715.37
7.1.40.0100.01015.62
7.1.30.0070.00915.53
7.1.20.0060.01015.49
7.1.10.0110.00915.46
7.1.00.0070.01415.34
7.0.330.0080.00815.08
7.0.320.0090.00915.12
7.0.310.0120.00515.00
7.0.300.0100.00715.05
7.0.290.0130.00414.98
7.0.280.0120.00315.17
7.0.270.0090.00415.13
7.0.260.0100.00815.02
7.0.250.0080.01215.18
7.0.240.0140.00415.25
7.0.230.0110.00715.20
7.0.220.0130.00615.13
7.0.210.0110.00814.96
7.0.200.0090.00915.21
7.0.190.0100.01115.16
7.0.180.0130.00915.17
7.0.170.0150.00715.21
7.0.160.0090.01414.99
7.0.150.0120.00815.18
7.0.140.0070.00915.19
7.0.130.0150.00615.13
7.0.120.0080.01315.09
7.0.110.0140.00815.37
7.0.100.0140.00515.18
7.0.90.0120.00915.27
7.0.80.0120.00815.18
7.0.70.0150.00915.25
7.0.60.0110.00715.19
7.0.50.0080.01015.11
7.0.40.0150.00615.20
7.0.30.0130.00515.23
7.0.20.0120.00815.02
7.0.10.0080.00815.29
7.0.00.0090.00915.13
hhvm-3.22.00.0950.16190.61
hhvm-3.21.30.0710.15488.63
hhvm-3.21.00.1070.14788.58
hhvm-3.20.20.0840.16489.00
hhvm-3.19.20.1260.16088.35
hhvm-3.18.50.0740.13087.01
hhvm-3.18.40.0910.13586.83
hhvm-3.17.30.1140.14986.03
hhvm-3.15.40.1120.16483.76
hhvm-3.13.20.1240.14695.17
hhvm-3.12.140.1200.15593.60
hhvm-3.11.10.1150.14185.96
hhvm-3.10.10.0940.12883.88
5.6.400.0070.01114.00
5.6.390.0100.00713.82
5.6.380.0060.00713.91
5.6.370.0090.00513.89
5.6.360.0070.00813.90
5.6.350.0100.00513.89
5.6.340.0100.00913.83
5.6.330.0060.01013.83
5.6.320.0160.00913.96
5.6.310.0140.00814.03
5.6.300.0120.01214.00
5.6.290.0080.01113.93
5.6.280.0100.01114.08
5.6.270.0130.00914.03
5.6.260.0160.00714.02
5.6.250.0130.01114.09
5.6.240.0160.01114.07
5.6.230.0100.00813.79
5.6.220.0090.01114.05
5.6.210.0090.01013.77
5.6.200.0120.00513.74
5.6.190.0100.00613.87
5.6.180.0050.01013.90
5.6.170.0140.00613.74
5.6.160.0110.01013.81
5.6.150.0100.01113.79
5.6.140.0100.00713.78
5.6.130.0030.01613.72
5.6.120.0050.01313.90
5.6.110.0040.01113.79
5.6.100.0120.00513.93
5.6.90.0090.00813.80
5.6.80.0080.01113.76
5.6.70.0100.00813.84
5.6.60.0110.00913.87
5.6.50.0090.01113.63
5.6.40.0120.00813.73
5.6.30.0130.00913.73
5.6.20.0150.00913.93
5.6.10.0140.00713.88
5.6.00.0070.00913.96
5.5.380.0140.00713.96
5.5.370.0170.00813.96
5.5.360.0110.01013.89
5.5.350.0200.00614.03
5.5.340.0080.00913.91
5.5.330.0130.00913.95
5.5.320.0150.00914.15
5.5.310.0070.01113.94
5.5.300.0080.01013.78
5.5.290.0140.00813.74
5.5.280.0110.00313.61
5.5.270.0130.00613.97
5.5.260.0120.00513.93
5.5.250.0100.00813.77
5.5.240.0150.00413.72
5.5.230.0100.01213.90
5.5.220.0090.01413.86
5.5.210.0120.00913.86
5.5.200.0090.01113.69
5.5.190.0110.01413.81
5.5.180.0060.01113.83
5.5.170.0050.01013.88
5.5.160.0080.00813.86
5.5.150.0110.00613.83
5.5.140.0100.00713.85
5.5.130.0100.01014.08
5.5.120.0130.00313.62
5.5.110.0100.00713.89
5.5.100.0120.01013.69
5.5.90.0140.00413.96
5.5.80.0120.00514.09
5.5.70.0070.01313.96
5.5.60.0080.01213.70
5.5.50.0090.00713.70
5.5.40.0100.00813.97
5.5.30.0160.00813.70
5.5.20.0090.00613.92
5.5.10.0100.00613.79
5.5.00.0120.00513.67
5.4.450.0080.00710.68
5.4.440.0060.00610.43
5.4.430.0100.00310.81
5.4.420.0070.00510.63
5.4.410.0070.00510.47
5.4.400.0090.00610.64
5.4.390.0090.00510.42
5.4.380.0080.00510.51
5.4.370.0040.00810.62
5.4.360.0080.00610.25
5.4.350.0090.00410.56
5.4.340.0060.00510.66
5.4.330.0090.00410.75
5.4.320.0060.00710.74
5.4.310.0080.00610.70
5.4.300.0080.00310.54
5.4.290.0120.00410.67
5.4.280.0090.00310.46
5.4.270.0100.00310.54
5.4.260.0130.00310.67
5.4.250.0110.00510.68
5.4.240.0090.00510.70
5.4.230.0100.00710.64
5.4.220.0090.00410.62
5.4.210.0080.00610.52
5.4.200.0070.00910.50
5.4.190.0050.00910.67
5.4.180.0080.00310.59
5.4.170.0070.00910.49
5.4.160.0040.00610.61
5.4.150.0100.00310.59
5.4.140.0100.00510.65
5.4.130.0030.01010.70
5.4.120.0080.00610.95
5.4.110.0110.00710.70
5.4.100.0050.00910.66
5.4.90.0110.00410.60
5.4.80.0080.00410.80
5.4.70.0070.00810.75
5.4.60.0090.00510.67
5.4.50.0080.00610.67
5.4.40.0120.00210.70
5.4.30.0090.00810.64
5.4.20.0060.00810.72
5.4.10.0080.00410.58
5.4.00.0070.00910.70
5.3.290.0100.00410.33
5.3.280.0080.00610.03
5.3.270.0100.00410.18
5.3.260.0080.00910.15
5.3.250.0110.00410.26
5.3.240.0040.00710.13
5.3.230.0020.01010.18
5.3.220.0110.00510.03
5.3.210.0120.00610.16
5.3.200.0080.00610.24
5.3.190.0090.00710.22
5.3.180.0080.00910.42
5.3.170.0110.00410.32
5.3.160.0080.00710.31
5.3.150.0130.00510.27
5.3.140.0110.00510.31
5.3.130.0080.00810.28
5.3.120.0120.00210.31
5.3.110.0080.00910.27
5.3.100.0110.00310.29
5.3.90.0080.00610.41
5.3.80.0090.00610.15
5.3.70.0090.00510.27
5.3.60.0100.00410.17
5.3.50.0100.00410.17
5.3.40.0020.01310.20
5.3.30.0070.00510.19
5.3.20.0070.00910.14
5.3.10.0100.00410.04
5.3.00.0100.00410.01
5.2.170.0040.0089.19
5.2.160.0050.0089.41
5.2.150.0070.0089.29
5.2.140.0080.0069.22
5.2.130.0080.0069.21
5.2.120.0090.0039.33
5.2.110.0110.0049.20
5.2.100.0100.0049.21
5.2.90.0060.0069.07
5.2.80.0070.0049.15
5.2.70.0080.0059.03
5.2.60.0060.0069.14
5.2.50.0080.0069.28
5.2.40.0080.0079.26
5.2.30.0070.0069.26
5.2.20.0050.0049.12
5.2.10.0050.0069.01
5.2.00.0110.0048.95
5.1.60.0120.0028.29
5.1.50.0080.0068.26
5.1.40.0070.0038.41
5.1.30.0090.0048.53
5.1.20.0120.0018.31
5.1.10.0060.0068.31
5.1.00.0050.0078.22
5.0.50.0070.0028.21
5.0.40.0080.0028.21
5.0.30.0060.0028.21
5.0.20.0010.0058.21
5.0.10.0050.0028.21
5.0.00.0070.0038.21
4.4.90.0070.0028.21
4.4.80.0040.0048.21
4.4.70.0000.0108.21
4.4.60.0010.0088.21
4.4.50.0050.0058.21
4.4.40.0060.0028.21
4.4.30.0050.0048.21
4.4.20.0080.0018.21
4.4.10.0020.0058.21
4.4.00.0050.0058.21
4.3.110.0040.0068.21
4.3.100.0000.0058.21
4.3.90.0050.0028.21
4.3.80.0030.0068.21
4.3.70.0040.0058.21
4.3.60.0060.0028.21
4.3.50.0040.0048.21
4.3.40.0060.0018.21
4.3.30.0040.0048.21
4.3.20.0050.0038.21
4.3.10.0020.0068.21
4.3.00.0040.0038.21