3v4l.org

run code in 200+ PHP versions simultaneously
<?php interface Employee {} class SteelFactoryEmployee implements Employee {} class CarsFactoryEmployee implements Employee {} interface Factory { public function hire(Employee $employee): bool; } class SteelFactory implements Factory { public function hire(Employee $employee): bool { if (! $employee instanceof SteelFactoryEmployee) { throw new InvalidArgumentException('Employee should be ' . SteelFactoryEmployee::class); } return true; } } class CarsFactory implements Factory { public function hire(Employee $employee): bool { if (! $employee instanceof CarsFactoryEmployee) { throw new InvalidArgumentException('Employee should be ' . CarsFactoryEmployee::class); } return true; } } class EmploymentDepartment { public function hireNewEmployee(Factory $factory, Employee $employee): void { $factory->hire($employee); } } $someNewEmployee = new SteelFactoryEmployee(); $someFactory = new SteelFactory(); $employmentDepartment = new EmploymentDepartment(); $employmentDepartment->hireNewEmployee($someFactory, $someNewEmployee);
based on Gq0vC

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.0090.00614.60
7.4.0rc60.0080.00914.81
7.4.0rc50.0080.00914.72
7.4.0rc40.0100.00714.83
7.4.0rc30.0090.00814.80
7.4.0rc20.0080.00814.73
7.4.0rc10.0090.00914.94
7.4.0beta40.0080.00814.85
7.4.0beta20.0080.00814.87
7.4.0beta10.0080.00814.71
7.4.0alpha30.0100.00614.89
7.4.0alpha20.0070.01014.97
7.4.0alpha10.0070.00914.96
7.3.120.0070.00814.75
7.3.110.0090.00814.67
7.3.100.0100.00714.77
7.3.90.0080.00914.62
7.3.80.0090.00914.66
7.3.70.0070.01014.66
7.3.60.0080.00714.74
7.3.50.0090.00714.67
7.3.40.0080.00914.51
7.3.30.0090.00714.66
7.3.20.0090.00815.00
7.3.10.0090.00814.96
7.3.00.0110.00714.92
7.2.250.0090.00814.89
7.2.240.0110.00715.00
7.2.230.0110.00615.03
7.2.220.0080.01014.85
7.2.210.0100.00714.96
7.2.200.0070.01014.86
7.2.190.0090.00714.79
7.2.180.0080.00914.88
7.2.170.0100.00814.90
7.1.330.0140.01014.05
7.1.320.0090.00514.03
7.1.310.0090.00814.08
7.1.300.0080.00814.08
7.1.290.0060.00914.10
7.1.280.0090.00914.18
7.1.270.0110.00413.98
7.1.260.0100.00614.05