3v4l.org

run code in 200+ PHP versions simultaneously
<?php interface IService { public function interfaceFunction(); } final class ServiceWithOtherFunction implements IService { public function interfaceFunction() { echo "ServiceWithOtherFunction interfaceFunction\n"; } public function otherFunction() { echo "ServiceWithOtherFunction otherFunction\n"; } } final class Controller { private $service; public function __construct(IService $service) { $this->service = $service; } public function indexAction() { $this->service->interfaceFunction(); $this->service->otherFunction(); } } $controllerWithOtherFunction = new Controller(new ServiceWithOtherFunction); $controllerWithOtherFunction->indexAction(); final class ServiceWithoutOtherFunction implements IService { public function interfaceFunction() { echo "ServiceWithoutOtherFunction interfaceFunction\n"; } } $controllerWithoutOtherFunction = new Controller(new ServiceWithoutOtherFunction); $controllerWithoutOtherFunction->indexAction();

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.4.00.0060.00815.11
7.2.60.0100.00317.00
7.1.200.0070.01015.48
7.1.70.0080.00416.95
7.1.60.0070.00917.14
7.1.50.0100.00316.98
7.1.40.0030.01216.59
7.1.30.0020.01216.64
7.1.20.0070.00716.57
7.1.10.0050.00716.51
7.1.00.0000.00916.61
7.0.200.0000.01116.88
7.0.190.0040.00416.64
7.0.180.0070.00416.25
7.0.170.0000.01216.48
7.0.160.0000.01116.16
7.0.150.0060.00616.40
7.0.140.0050.00516.26
7.0.130.0030.00516.67
7.0.120.0000.00716.64
7.0.110.0000.00816.31
7.0.100.0080.00016.63
7.0.90.0190.00616.57
7.0.80.0180.00716.44
7.0.70.0170.00316.35
7.0.60.0220.00316.11
7.0.50.0220.00016.45
7.0.40.0040.00714.59
7.0.30.0050.00314.59
7.0.20.0000.00714.59
7.0.10.0030.00614.59
7.0.00.0000.01014.59
5.6.300.0140.04520.66
5.6.290.0070.04020.88
5.6.280.0030.04520.84
5.6.270.0330.03320.99
5.6.260.0030.04520.98
5.6.250.0070.04120.96
5.6.240.0060.04420.84
5.6.230.0070.04120.88
5.6.220.0140.03820.91
5.6.210.0100.05120.62
5.6.200.0060.04521.05
5.6.190.0030.04720.95
5.6.180.0030.04720.79
5.6.170.0030.04620.84
5.6.160.0170.04020.90
5.6.150.0130.04021.06
5.6.140.0100.04420.85
5.6.130.0150.04320.88
5.6.120.0040.04720.79
5.6.110.0090.04721.01
5.6.100.0100.04420.82
5.6.90.0100.04320.93
5.6.80.0100.03720.26
5.6.70.0030.04420.13
5.6.60.0030.04620.34
5.6.50.0100.04120.20
5.6.40.0070.03920.37
5.6.30.0000.04820.23
5.6.20.0100.04820.23
5.6.10.0040.04620.35
5.6.00.0100.04220.27