3v4l.org

run code in 300+ PHP versions simultaneously
<?php class example{ protected $foo = 'foo'; public function getFoo() { return function() { return $this->foo; } } } $foo = (new example())->getFoo(); echo $foo();

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).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.20.0300.08020.10
7.0.10.0030.07720.30
7.0.00.0070.09020.16
5.6.170.0330.07320.58
5.6.160.0100.05320.48
5.6.150.0000.05018.27
5.6.140.0070.06718.19
5.6.130.0230.04018.25
5.6.120.0030.04321.13
5.6.110.0070.04021.02
5.6.100.0270.05021.00
5.6.90.0170.05020.99
5.6.80.0070.06320.52
5.5.310.0300.05020.27
5.5.300.0100.07718.05
5.5.290.0070.08318.09
5.5.280.0100.05320.66
5.5.270.0070.08320.96
5.5.260.0170.06320.84
5.5.250.0100.06720.78
5.5.240.0230.07720.16

preferences:
172.13 ms | 1394 KiB | 7 Q