3v4l.org

run code in 300+ 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 { return true; } } class CarsFactory implements Factory { public function hire(Employee $employee): bool { 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);

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)
8.3.60.0160.00018.30
8.3.50.0000.01518.35
8.3.40.0070.00718.71
8.3.30.0140.00018.57
8.3.20.0070.00720.69
8.3.10.0040.00420.30
8.3.00.0080.00020.82
8.2.180.0150.00316.63
8.2.170.0090.00622.96
8.2.160.0080.00522.09
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0060.00321.00
8.2.100.0040.00817.91
8.2.90.0030.00619.58
8.2.80.0000.00820.39
8.2.70.0080.00017.80
8.2.60.0080.00018.22
8.2.50.0040.00418.10
8.2.40.0000.00719.33
8.2.30.0020.00519.23
8.2.20.0050.00317.97
8.2.10.0030.00520.65
8.2.00.0000.00719.12
8.1.280.0110.00425.92
8.1.270.0040.00420.77
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.11
8.1.230.0090.00322.74
8.1.220.0000.00817.74
8.1.210.0090.00318.89
8.1.200.0050.00517.35
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0060.00318.50
8.1.160.0090.00018.97
8.1.150.0000.00718.83
8.1.140.0070.00018.84
8.1.130.0050.00320.04
8.1.120.0000.00717.47
8.1.110.0040.00417.36
8.1.100.0000.00717.43
8.1.90.0000.00717.34
8.1.80.0040.00417.45
8.1.70.0050.00317.34
8.1.60.0030.00517.42
8.1.50.0030.00617.53
8.1.40.0050.00317.54
8.1.30.0000.00817.67
8.1.20.0050.00317.71
8.1.10.0030.00617.41
8.1.00.0040.00417.41
8.0.300.0000.00822.03
8.0.290.0060.00316.88
8.0.280.0080.00018.36
8.0.270.0030.00316.79
8.0.260.0000.00720.05
8.0.250.0080.00016.91
8.0.240.0070.00016.96
8.0.230.0030.00317.01
8.0.220.0040.00416.98
8.0.210.0000.00716.96
8.0.200.0030.00316.99
8.0.190.0070.00017.05
8.0.180.0050.00317.02
8.0.170.0080.00016.86
8.0.160.0070.00017.02
8.0.150.0050.00216.97
8.0.140.0000.00816.96
8.0.130.0000.00513.39
8.0.120.0050.00216.94
8.0.110.0030.00516.78
8.0.100.0050.00316.79
8.0.90.0080.00016.95
8.0.80.0080.01016.95
8.0.70.0040.00416.90
8.0.60.0040.00416.92
8.0.50.0060.00316.84
8.0.30.0040.01317.11
8.0.20.0090.00916.94
8.0.10.0040.00416.99
8.0.00.0110.00816.93
7.4.330.0050.00015.55
7.4.320.0030.00316.52
7.4.300.0000.00616.62
7.4.290.0040.00416.62
7.4.280.0040.00416.61
7.4.270.0060.00316.43
7.4.260.0000.00513.27
7.4.250.0030.00516.55
7.4.240.0020.00616.51
7.4.230.0040.00416.59
7.4.220.0020.00516.63
7.4.210.0050.01116.52
7.4.200.0050.00316.34
7.4.130.0090.00916.50
7.4.120.0080.01616.39
7.4.110.0040.01216.39
7.4.100.0120.01316.52
7.4.90.0130.00616.52
7.4.80.0060.01219.39
7.4.70.0070.01016.56
7.4.60.0060.00916.59
7.4.50.0070.01016.25
7.4.40.0190.00316.49
7.4.00.0070.00815.07
7.3.330.0000.00916.08
7.3.320.0000.00513.27
7.3.310.0040.00416.28
7.3.300.0000.00616.21
7.3.290.0070.00916.27
7.3.280.0060.00916.21
7.3.260.0070.01016.21
7.3.230.0130.00316.34
7.3.210.0130.00316.18
7.3.200.0060.01216.39
7.3.190.0000.01716.19
7.3.180.0090.01216.31
7.3.170.0100.01016.22
7.3.160.0060.01216.30
7.3.120.0130.00314.41
7.3.110.0030.01014.70
7.3.100.0050.00814.33
7.3.90.0130.00514.47
7.3.80.0080.00614.75
7.3.70.0200.00014.64
7.3.60.0110.00414.66
7.3.50.0070.00714.56
7.3.40.0110.00414.52
7.3.30.0090.00614.61
7.3.20.0040.01114.36
7.3.10.0070.00714.56
7.3.00.0000.01514.41
7.2.330.0070.01116.65
7.2.320.0080.00816.81
7.2.310.0070.01016.44
7.2.300.0060.01316.61
7.2.290.0060.01016.71
7.2.250.0140.00314.98
7.2.240.0070.00714.70
7.2.230.0060.01015.05
7.2.220.0000.02015.02
7.2.210.0100.00315.13
7.2.200.0070.00715.08
7.2.190.0080.00814.86
7.2.180.0110.00314.98
7.2.170.0000.01314.61
7.1.330.0000.01313.97
7.1.320.0120.00613.85
7.1.310.0220.01913.82
7.1.300.0090.00513.97
7.1.290.0000.01413.91
7.1.280.0030.00913.90
7.1.270.0030.01114.08
7.1.260.0070.00713.94

preferences:
56.08 ms | 400 KiB | 5 Q