3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface FabricAwareInterface { public function setFabric($fabric); protected function getFabric(); } trait FabricAware { private $_fabric; public function setFabric($f) { $this->_fabric = $f; } protected function getFabric() { return $this->_fabric; } } class ClassA implements FabricAwareInterface { use FabricAware; public function init() { echo 'OK'; } } $a = new ClassA(); $a->init();

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)
5.6.160.0070.03720.55
5.6.150.0100.05318.29
5.6.140.0130.07718.21
5.6.130.0070.08318.14
5.6.120.0170.07720.98
5.6.110.0070.07721.00
5.6.100.0170.06721.13
5.6.90.0230.06021.00
5.6.80.0100.03720.36
5.5.300.0100.06717.98
5.5.290.0030.04318.06
5.5.280.0000.07020.69
5.5.270.0030.06320.89
5.5.260.0030.08720.88
5.5.250.0070.04720.62
5.5.240.0030.03720.18

preferences:
144.41 ms | 1394 KiB | 7 Q