3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $foo; protected $closures = [ 'foo' => function() { echo $this->foo; } ]; public function __construct($foo) { $this->foo = $foo; } public function method() { return $this->closures['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.00.0100.08020.05
5.6.160.0030.04020.46
5.6.150.0030.06018.16
5.6.140.0070.05718.14
5.6.130.0130.03718.21
5.6.120.0100.08020.96
5.6.110.0030.09020.88
5.6.100.0070.07020.88
5.6.90.0070.08021.00
5.6.80.0130.04020.37
5.5.300.0030.03717.95
5.5.290.0070.08318.03
5.5.280.0170.07320.82
5.5.270.0100.06720.79
5.5.260.0030.09020.67
5.5.250.0070.08320.55
5.5.240.0130.07720.12

preferences:
140.6 ms | 1394 KiB | 7 Q