3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); // so only PHP 7 will show up class FooBar { private $x; public function __construct() { var_dump($this); echo "Let's remove a property!", PHP_EOL; unset($this->x); var_dump($this); echo "Let's add a property!", PHP_EOL; $this->x = 2; var_dump($this); echo "Where did the private come from?", PHP_EOL; } } $foobar = new Foobar;
based on MeWv3

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.10.0160.00316.81
7.3.00.0040.01116.52
7.2.130.0090.00616.93
7.2.120.0040.01116.93
7.2.110.0030.00916.82
7.2.100.0120.00617.02
7.2.90.0000.00916.92
7.2.80.0060.00316.97
7.2.70.0000.00916.86
7.2.60.0060.00416.89
7.2.50.0000.01617.07
7.2.40.0100.00317.13
7.2.30.0070.00716.82
7.2.20.0160.00316.73
7.2.10.0060.00616.96
7.2.00.0130.00518.04
7.1.250.0090.00615.79
7.1.200.0030.00615.52
7.1.100.0040.00818.12
7.1.70.0030.01216.93
7.1.60.0100.01619.36
7.1.50.0060.01216.99
7.1.00.0030.07722.33
7.0.200.0030.00616.52
7.0.60.0170.08319.88
7.0.50.0100.06017.83
7.0.40.0070.05020.15
7.0.30.0400.06720.07
7.0.20.0330.08020.10
7.0.10.0030.04320.23
7.0.00.0100.05320.09
5.6.280.0000.07320.91
5.6.210.0030.04320.70
5.6.200.0070.08018.16
5.6.190.0130.07320.57
5.6.180.0630.06320.48
5.6.170.0230.05020.71
5.6.160.0100.03720.46
5.6.150.0130.07718.23
5.6.140.0100.07718.23
5.6.130.0070.05318.29
5.6.120.0100.08721.01
5.6.110.0070.04321.11
5.6.100.0100.04721.11
5.6.90.0070.08321.00
5.6.80.0100.03320.52
5.5.350.0230.07320.30
5.5.340.0070.04017.98
5.5.330.0100.03720.35
5.5.320.0200.07320.33
5.5.310.0300.08320.35
5.5.300.0100.03317.95
5.5.290.0070.04717.92
5.5.280.0130.08020.90
5.5.270.0130.07720.89
5.5.260.0200.07020.77
5.5.250.0170.04720.68
5.5.240.0230.06020.27
5.4.450.0170.05719.45
5.4.440.0170.05719.60
5.4.430.0230.04719.43
5.4.420.0170.05319.45
5.4.410.0270.04319.34
5.4.400.0370.03319.13
5.4.390.0230.05319.16
5.4.380.0270.04319.05
5.4.370.0200.05019.15
5.4.360.0100.05719.01
5.4.350.0200.05019.16
5.4.340.0270.04719.16
5.4.320.0130.06019.15
5.4.310.0130.05719.26
5.4.300.0100.05719.29
5.4.290.0230.05019.27
5.4.280.0270.04019.25
5.4.270.0300.04319.02
5.4.260.0300.04319.25
5.4.250.0270.04319.20
5.4.240.0270.04318.86
5.4.230.0200.05019.00
5.4.220.0270.04718.86
5.4.210.0230.04319.14
5.4.200.0200.04719.36
5.4.190.0200.05019.13
5.4.180.0170.04719.25
5.4.170.0300.04319.31
5.4.160.0170.05019.26
5.4.150.0170.04719.26
5.4.140.0200.07016.61
5.4.130.0200.05716.61
5.4.120.0230.05316.78
5.4.110.0170.05016.52
5.4.100.0100.05716.68
5.4.90.0170.05016.67
5.3.290.0170.07014.66
5.3.280.0200.05014.61
5.3.270.0230.05314.62
5.3.260.0200.05314.62
5.3.250.0130.05014.62
5.3.240.0270.07014.84
5.3.230.0100.06014.57
5.3.220.0130.05714.48
5.3.210.0100.06014.78
5.3.200.0100.05714.73
5.3.190.0130.05314.47