3v4l.org

run code in 300+ PHP versions simultaneously
<?php Interface ShapeInterface { getArea(); } Class ShapeManager { public function __construct(ShapeInterface $shape) { $this->shape = $shape; $this->getArea(); } public function getArea() { $this->shape->getArea(); } } Class Circle { public function getArea() { return 'circle area'; } } Class Sqaure { public function getArea() { return 'square area'; } } $shape = new ShapeManager(new Circle); $shape->getArea();

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.1.70.0000.01116.77
7.1.60.0160.01034.73
7.1.50.0230.00334.73
7.1.40.0210.00734.18
7.1.30.0100.01734.11
7.1.20.0170.01034.69
7.1.10.0030.00916.57
7.1.00.0050.00816.36
7.0.200.0000.01216.67
7.0.190.0000.01316.26
7.0.180.0030.01016.02
7.0.170.0000.01316.21
7.0.160.0130.00315.99
7.0.150.0030.01016.13
7.0.140.0030.01016.07
7.0.130.0030.01016.41
7.0.120.0080.00416.32
7.0.110.0080.00416.19
7.0.100.0000.01216.18
7.0.90.0030.00916.19
7.0.80.0060.00616.20
7.0.70.0060.01216.17
7.0.60.0060.00615.77
7.0.50.0040.00916.16
7.0.40.0060.00916.40
7.0.30.0030.01016.59
7.0.20.0000.01316.24
7.0.10.0030.01016.36
7.0.00.0030.01016.38

preferences:
140.64 ms | 1386 KiB | 7 Q