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(SteelFactoryEmployee $employee): bool { return true; } } class CarsFactory implements Factory { public function hire(CarsFactoryEmployee $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);
based on RtM7Z

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.0080.00714.65
7.4.0rc60.0080.00714.86
7.4.0rc50.0100.00614.66
7.4.0rc40.0070.00814.79
7.4.0rc30.0100.00514.78
7.4.0rc20.0050.00814.59
7.4.0rc10.0100.00514.79
7.4.0beta40.0080.00614.75
7.4.0beta20.0070.00814.74
7.4.0beta10.0080.00714.71
7.4.0alpha30.0090.00714.76
7.4.0alpha20.0070.00814.89
7.4.0alpha10.0080.00814.82
7.3.120.0080.00714.68
7.3.110.0070.00814.68
7.3.100.0060.00914.64
7.3.90.0060.00814.56
7.3.80.0060.00814.69
7.3.70.0070.00914.56
7.3.60.0080.00714.59
7.3.50.0070.00914.62
7.3.40.0070.00914.56
7.3.30.0090.00614.65
7.3.20.0090.00614.68
7.3.10.0090.00714.62
7.3.00.0080.00714.64
7.2.250.0070.00714.73
7.2.240.0090.00714.89
7.2.230.0080.00714.74
7.2.220.0040.01114.83
7.2.210.0080.00614.85
7.2.200.0070.00814.73
7.2.190.0080.00814.71
7.2.180.0050.01114.75
7.2.170.0090.00614.83
7.2.160.0030.01715.04
7.2.150.0120.00914.93
7.2.140.0030.01315.11
7.2.130.0090.00614.90
7.2.120.0060.00914.81
7.2.110.0120.00314.56
7.2.100.0080.00814.80
7.2.90.0140.00414.59
7.2.80.0120.00314.95
7.2.70.0290.00714.54
7.2.60.0090.00914.80
7.2.50.0130.00514.71
7.2.40.0080.00614.76
7.2.30.0060.01614.74
7.2.20.0140.00314.57
7.2.10.0080.00814.73
7.2.00.0160.00614.85
7.1.330.0070.00813.76
7.1.320.0270.00613.69
7.1.310.0120.00713.74
7.1.300.0090.00613.68
7.1.290.0070.00713.71
7.1.280.0070.00813.78
7.1.270.0080.00613.65
7.1.260.0110.00513.78
7.1.250.0040.00913.52
7.1.240.0160.00313.84
7.1.230.0200.00013.84
7.1.220.0040.01213.79
7.1.210.0140.00313.64
7.1.200.0100.00713.61
7.1.190.0050.01513.53
7.1.180.0190.00313.75
7.1.170.0050.01113.57
7.1.160.0000.01713.47
7.1.150.0190.00413.29
7.1.140.0160.00013.47
7.1.130.0130.00313.37
7.1.120.0150.00713.96
7.1.110.0180.00313.90
7.1.100.0150.00713.93
7.1.90.0130.00913.97
7.1.80.0000.02213.90
7.1.70.0130.00513.84
7.1.60.0140.00513.87
7.1.50.0160.01213.97
7.1.40.0130.00713.68
7.1.30.0170.00313.79
7.1.20.0150.00813.92
7.1.10.0050.01713.99
7.1.00.0220.00413.96
7.0.330.0080.01013.18
7.0.320.0050.01013.09
7.0.310.0120.00413.19
7.0.300.0130.00412.85
7.0.290.0050.01513.16
7.0.280.0030.01413.12
7.0.270.0220.00313.12
7.0.260.0090.00913.32
7.0.250.0120.01013.59
7.0.240.0120.00713.30
7.0.230.0090.00913.39
7.0.220.0060.01213.21
7.0.210.0120.00613.60
7.0.200.0210.01113.41
7.0.190.0150.00713.52
7.0.180.0170.00613.37
7.0.170.0150.00313.51
7.0.160.0140.00713.49
7.0.150.0160.01113.52
7.0.140.0030.01713.30
7.0.130.0170.00313.45
7.0.120.0190.01013.51
7.0.110.0110.01613.41
7.0.100.0110.01113.32
7.0.90.0080.01613.56
7.0.80.0040.02013.34
7.0.70.0110.00813.52
7.0.60.0190.00013.25
7.0.50.0110.00713.28
7.0.40.0150.00613.52
7.0.30.0060.01113.63
7.0.20.0100.00713.45
7.0.10.0150.00513.56
7.0.00.0070.01313.52
5.6.400.0030.01213.93
5.6.390.0070.01113.85
5.6.380.0060.01113.68
5.6.370.0150.00713.79
5.6.360.0120.00513.87
5.6.350.0040.01313.77
5.6.340.0110.00813.89
5.6.330.0070.02014.28
5.6.320.0110.00414.13
5.6.310.0110.00714.09
5.6.300.0090.01214.27
5.6.290.0150.00914.27
5.6.280.0200.00314.11
5.6.270.0210.00813.97
5.6.260.0060.01314.13
5.6.250.0100.01313.95
5.6.240.0150.00614.01
5.6.230.0080.01514.26
5.6.220.0080.01113.88
5.6.210.0180.00414.17
5.6.200.0100.00813.99
5.6.190.0140.00513.96
5.6.180.0110.00614.00
5.6.170.0100.01413.98
5.6.160.0210.00314.18
5.6.150.0150.00313.93
5.6.140.0160.00914.02
5.6.130.0130.00613.68
5.6.120.0110.00913.89
5.6.110.0070.01113.77
5.6.100.0050.01013.96
5.6.90.0150.01214.08
5.6.80.0110.01513.84
5.6.70.0040.01113.96
5.6.60.0130.00613.82
5.6.50.0160.00814.13
5.6.40.0160.00813.95
5.6.30.0050.01213.75
5.6.20.0140.00613.96
5.6.10.0130.00613.80
5.6.00.0140.00714.18
5.5.380.0100.01014.04
5.5.370.0200.00414.08
5.5.360.0120.00913.63
5.5.350.0140.00414.00
5.5.340.0080.01214.05
5.5.330.0190.00314.32
5.5.320.0120.01014.29
5.5.310.0120.01013.80
5.5.300.0120.00614.01
5.5.290.0140.00813.84
5.5.280.0120.00413.92
5.5.270.0090.01314.11
5.5.260.0140.00814.02
5.5.250.0160.00913.75
5.5.240.0150.00513.71
5.5.230.0120.00613.97
5.5.220.0110.00713.57
5.5.210.0140.00714.04
5.5.200.0040.01313.93
5.5.190.0170.00713.79
5.5.180.0160.00813.81
5.5.170.0210.00013.95
5.5.160.0110.00713.91
5.5.150.0140.01013.85
5.5.140.0190.00014.03
5.5.130.0180.00313.84
5.5.120.0140.00713.79
5.5.110.0060.01313.99
5.5.100.0120.00614.12
5.5.90.0100.01014.01
5.5.80.0180.00814.16
5.5.70.0140.00913.98
5.5.60.0140.00713.76
5.5.50.0090.01214.07
5.5.40.0130.01713.54
5.5.30.0090.01313.68
5.5.20.0180.00314.07
5.5.10.0090.00813.93
5.5.00.0080.01413.78
5.4.450.0040.01110.96
5.4.440.0040.00810.64
5.4.430.0100.00310.88
5.4.420.0130.00310.99
5.4.410.0060.01210.70
5.4.400.0090.00610.95
5.4.390.0100.00310.93
5.4.380.0110.00410.96
5.4.370.0100.00710.51
5.4.360.0060.00910.63
5.4.350.0100.01010.90
5.4.340.0060.00910.50
5.4.330.0140.00610.63
5.4.320.0120.00310.71
5.4.310.0100.00710.73
5.4.300.0100.00410.73
5.4.290.0170.00310.69
5.4.280.0130.00710.43
5.4.270.0100.00410.81
5.4.260.0180.00010.48
5.4.250.0140.00711.00
5.4.240.0110.00410.94
5.4.230.0110.00710.44
5.4.220.0100.00510.74
5.4.210.0090.00910.60
5.4.200.0170.00010.80
5.4.190.0160.00010.64
5.4.180.0090.00610.73
5.4.170.0030.01410.61
5.4.160.0070.00711.02
5.4.150.0110.00310.68
5.4.140.0050.00810.64
5.4.130.0080.00710.69
5.4.120.0060.00910.71
5.4.110.0090.00410.45
5.4.100.0110.00410.88
5.4.90.0130.00610.83
5.4.80.0190.00010.72
5.4.70.0120.00310.67
5.4.60.0100.00710.44
5.4.50.0120.00310.53
5.4.40.0080.01110.52
5.4.30.0070.00710.68
5.4.20.0150.00410.87
5.4.10.0110.00310.70
5.4.00.0050.01010.66
5.3.290.0120.00310.39
5.3.280.0090.00610.39
5.3.270.0080.00810.39
5.3.260.0140.00010.39
5.3.250.0110.00310.39
5.3.240.0080.00410.39
5.3.230.0080.00610.39
5.3.220.0090.00310.39
5.3.210.0100.00510.39
5.3.200.0130.00310.39
5.3.190.0180.00610.39
5.3.180.0100.00310.46
5.3.170.0090.00610.39
5.3.160.0080.00810.43
5.3.150.0100.00410.45
5.3.140.0090.00510.39
5.3.130.0100.00610.39
5.3.120.0070.00710.39
5.3.110.0170.00010.39
5.3.100.0100.00710.39
5.3.90.0150.00010.39
5.3.80.0070.00710.39
5.3.70.0080.00610.39
5.3.60.0070.00810.41
5.3.50.0110.00310.39
5.3.40.0070.00710.39
5.3.30.0070.00710.39
5.3.20.0050.00910.39
5.3.10.0120.00310.39
5.3.00.0060.00910.39
5.2.170.0080.00310.39
5.2.160.0070.00410.39
5.2.150.0050.00510.39
5.2.140.0060.00610.39
5.2.130.0110.00010.39
5.2.120.0000.01010.39
5.2.110.0070.00710.39
5.2.100.0100.00510.39
5.2.90.0080.00610.39
5.2.80.0140.00210.39
5.2.70.0000.01210.39
5.2.60.0120.00010.39
5.2.50.0070.00810.39
5.2.40.0080.00810.39
5.2.30.0060.01110.39
5.2.20.0090.00610.39
5.2.10.0090.00610.39
5.2.00.0110.00410.39
5.1.60.0030.01010.39
5.1.50.0000.01210.39
5.1.40.0110.00010.39
5.1.30.0070.00310.39
5.1.20.0120.00010.39
5.1.10.0070.00410.39
5.1.00.0080.00310.39
5.0.50.0080.00210.39
5.0.40.0080.00310.39
5.0.30.0040.00510.39
5.0.20.0040.00410.39
5.0.10.0030.00510.39
5.0.00.0050.00410.39
4.4.90.0040.00410.39
4.4.80.0060.00510.39
4.4.70.0050.00510.39
4.4.60.0040.00410.39
4.4.50.0090.00010.39
4.4.40.0070.00010.39
4.4.30.0000.00710.39
4.4.20.0000.00810.39
4.4.10.0080.00010.39
4.4.00.0060.00310.39
4.3.110.0020.00510.39
4.3.100.0000.00910.39
4.3.90.0030.00310.39
4.3.80.0090.00010.39
4.3.70.0030.00410.39
4.3.60.0060.00210.39
4.3.50.0060.00310.39
4.3.40.0030.00310.39
4.3.30.0050.00310.39
4.3.20.0040.00410.39
4.3.10.0030.00610.39
4.3.00.0040.00410.39