3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { private $bar = 'baz'; } $reader = function & ($object, $property) { $value = & Closure::bind(function & () use ($property) { return $this->$property; }, $object, $object)->__invoke(); return $value; }; $foo = new Foo(); $bar = & $reader($foo, 'bar'); $bar .= 'tab'; var_dump($foo);
based on nCMor

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.2.00.0060.00619.17
7.1.100.0040.00818.11
7.1.70.0060.00917.19
7.1.60.1580.00715.03
7.1.50.0170.00717.03
7.1.00.0030.09022.48
7.0.200.0040.01216.67
7.0.140.0030.03022.00
7.0.60.0170.05319.94
7.0.50.0130.06717.88
7.0.40.0130.03720.23
7.0.30.0270.03320.17
7.0.20.0200.04320.24
7.0.10.0300.07720.15
7.0.00.0030.08720.23
5.6.280.0070.07020.82
5.6.210.0200.04720.51
5.6.200.0030.05018.18
5.6.190.0030.09320.49
5.6.180.0370.05020.46
5.6.170.0470.07320.66
5.6.160.0100.04320.39
5.6.150.0130.04018.23
5.6.140.0130.04318.15
5.6.130.0030.08318.27
5.6.120.0100.08021.05
5.6.110.0070.07021.00
5.6.100.0070.07321.12
5.6.90.0100.08721.11
5.6.80.0100.06320.34
5.6.70.0300.08020.41
5.5.350.0270.05020.30
5.5.340.0100.07717.95
5.5.330.0100.04720.40
5.5.320.0230.05320.37
5.5.310.0330.07020.34
5.5.300.0170.05018.08
5.5.290.0070.07717.95
5.5.280.0130.07320.97
5.5.270.0070.06020.96
5.5.260.0100.08020.88
5.5.250.0100.08320.72
5.5.240.0070.07720.24
5.4.450.0270.06719.63
5.4.440.0670.05319.16
5.4.430.0870.06719.55
5.4.420.0700.06319.39
5.4.410.0100.05718.95
5.4.400.0400.05718.84
5.4.390.0430.05718.51
5.4.380.0300.06018.78
5.4.370.0270.05718.74
5.4.360.0300.07018.70
5.4.350.0470.06718.76
5.4.340.0730.06718.84
5.4.320.0900.07018.74
5.4.310.1270.07018.82
5.4.300.0200.07318.76
5.4.290.1070.06718.78
5.4.280.0370.06018.63
5.4.270.2230.06318.50
5.4.260.0400.07018.78
5.4.250.0370.05718.84
5.4.240.0400.05018.74
5.4.230.0270.05718.73
5.4.220.0500.06018.71
5.4.210.0300.06018.75
5.4.200.0470.04716.53
5.4.190.0400.06018.73
5.4.180.0200.05318.77
5.4.170.0300.05318.59
5.4.160.0370.05718.76
5.4.150.0270.05318.79
5.4.140.0230.05716.23
5.4.130.0270.07016.35
5.4.120.6130.05016.24
5.4.110.0570.06016.21
5.4.100.3100.05016.46
5.4.90.0470.04716.25
5.4.80.0300.05716.28
5.4.70.0430.05016.14
5.4.60.0370.05716.44
5.4.50.0300.06316.14
5.4.40.0270.05316.20
5.4.30.0800.04716.27
5.4.20.2870.05316.41
5.4.10.0430.04716.29
5.4.00.2600.05015.87
5.3.290.0370.05314.73
5.3.280.0400.05014.73
5.3.270.0100.06714.66
5.3.260.0270.06014.61
5.3.250.0700.04714.59
5.3.240.0370.05314.64
5.3.230.0370.05714.77
5.3.220.0330.05714.66
5.3.210.0330.05714.61
5.3.200.0300.05714.70
5.3.190.0300.06314.70
5.3.180.0500.05014.56
5.3.170.0370.05714.60
5.3.160.0430.06314.80
5.3.150.0330.05014.71
5.3.140.0270.05714.67
5.3.130.0330.06014.55
5.3.120.0400.06014.60
5.3.110.0470.06014.65
5.3.100.0370.07314.22
5.3.90.0430.06014.04
5.3.80.0300.05014.00
5.3.70.0370.05714.09
5.3.60.0370.06314.13
5.3.50.0170.07014.06
5.3.40.0200.05313.95
5.3.30.0200.05313.95
5.3.20.0400.05013.83
5.3.10.0530.05313.75
5.3.00.0570.05013.78
5.2.170.3800.03711.24
5.2.160.1800.05311.19
5.2.150.0300.05011.17
5.2.140.1970.04711.11
5.2.130.0270.04711.14
5.2.120.0200.06011.21
5.2.110.0430.04711.22
5.2.100.0100.04711.12
5.2.90.1970.05011.32
5.2.80.0300.04311.21
5.2.70.0300.04011.13
5.2.60.1900.04011.09
5.2.50.1870.05311.05
5.2.40.0700.04011.02
5.2.30.0270.04711.04
5.2.20.0230.04711.05
5.2.10.0230.05310.96
5.2.00.0230.05310.91
5.1.60.0200.04710.18
5.1.50.0430.04010.20
5.1.40.0200.03310.02
5.1.30.0230.03310.55
5.1.20.4700.04310.45
5.1.10.0200.03710.11
5.1.00.0330.03310.05
5.0.50.0130.0308.68
5.0.40.0070.0338.52
5.0.30.2800.0638.25
5.0.20.0170.0278.23
5.0.10.0100.0338.17
5.0.00.0070.0478.23
4.4.90.0170.0205.91
4.4.80.0070.0275.98
4.4.70.0130.0205.91
4.4.60.0070.0205.88
4.4.50.0070.0236.01
4.4.40.0100.0305.88
4.4.30.0070.0235.99
4.4.20.0070.0205.95
4.4.10.0130.0205.94
4.4.00.0130.0305.92
4.3.110.0100.0205.82
4.3.100.0100.0235.80
4.3.90.0030.0275.80
4.3.80.0030.0375.79
4.3.70.0070.0235.87
4.3.60.0100.0235.89
4.3.50.0130.0175.91
4.3.40.0070.0375.88
4.3.30.0030.0234.57
4.3.20.0030.0234.57
4.3.10.0070.0274.47
4.3.00.0200.0136.87