3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface AggregateRoot {} class Customer implements AggregateRoot {} interface AggregateRootFactory { public function create() : AggregateRoot; } class CustomerFactory implements AggregateRootFactory { public function create() : Customer // Customer is subtype of AggregateRoot, it should work { return new Customer(); } } $factory = new CustomerFactory(); $customer = $factory->create();

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.0090.00616.75
8.3.50.0070.01118.05
8.3.40.0100.00718.48
8.3.30.0070.00718.48
8.3.20.0070.00020.04
8.3.10.0050.00321.76
8.3.00.0040.00422.14
8.2.180.0090.00616.63
8.2.170.0090.00622.96
8.2.160.0070.00719.54
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00022.17
8.2.120.0000.00726.35
8.2.110.0070.00319.30
8.2.100.0040.00717.72
8.2.90.0040.00419.09
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0100.00017.93
8.2.50.0040.00418.10
8.2.40.0080.00022.32
8.2.30.0040.00419.31
8.2.20.0010.00717.59
8.2.10.0000.00718.11
8.2.00.0000.00817.68
8.1.280.0120.00625.92
8.1.270.0080.00023.84
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00419.13
8.1.230.0110.00017.52
8.1.220.0060.00317.75
8.1.210.0000.00818.77
8.1.200.0080.00317.23
8.1.190.0040.00417.41
8.1.180.0030.00518.10
8.1.170.0060.00318.57
8.1.160.0070.00022.05
8.1.150.0040.00418.81
8.1.140.0050.00319.62
8.1.130.0090.00317.76
8.1.120.0070.00017.47
8.1.110.0000.00817.36
8.1.100.0040.00417.41
8.1.90.0000.00717.48
8.1.80.0000.00717.51
8.1.70.0040.00417.49
8.1.60.0060.00317.56
8.1.50.0060.00317.57
8.1.40.0040.00417.57
8.1.30.0050.00217.58
8.1.20.0040.00417.48
8.1.10.0000.00817.53
8.1.00.0080.00017.42
8.0.300.0050.00318.77
8.0.290.0000.00816.75
8.0.280.0080.00018.50
8.0.270.0050.00217.27
8.0.260.0000.00616.70
8.0.250.0030.00316.98
8.0.240.0000.00617.00
8.0.230.0070.00016.94
8.0.220.0030.00316.88
8.0.210.0000.00716.84
8.0.200.0000.00816.91
8.0.190.0050.00316.92
8.0.180.0040.00416.77
8.0.170.0040.00416.89
8.0.160.0000.00816.79
8.0.150.0070.00016.74
8.0.140.0000.00716.89
8.0.130.0030.00613.29
8.0.120.0040.00416.88
8.0.110.0000.00716.82
8.0.100.0070.00016.93
8.0.90.0000.00716.80
8.0.80.0080.00816.86
8.0.70.0030.00516.76
8.0.60.0050.00216.75
8.0.50.0050.00216.94
8.0.30.0080.01017.16
8.0.20.0100.00817.40
8.0.10.0040.00417.00
8.0.00.0070.01016.77
7.4.330.0050.00015.08
7.4.320.0060.00016.60
7.4.300.0030.00316.36
7.4.290.0030.00316.53
7.4.280.0080.00016.54
7.4.270.0030.00316.49
7.4.260.0030.00316.42
7.4.250.0000.00816.54
7.4.240.0040.00416.62
7.4.230.0040.00416.30
7.4.220.0120.00616.54
7.4.210.0080.00816.45
7.4.200.0030.00316.49
7.4.160.0090.00616.51
7.4.150.0120.00817.40
7.4.140.0120.00617.86
7.4.130.0050.01216.63
7.4.120.0110.00616.52
7.4.110.0090.00816.48
7.4.100.0140.00316.42
7.4.90.0000.01816.54
7.4.80.0070.01519.39
7.4.70.0070.01016.57
7.4.60.0130.00316.39
7.4.50.0090.00916.46
7.4.40.0130.00316.29
7.4.30.0160.00016.62
7.4.00.0000.01315.14
7.3.330.0030.00313.18
7.3.320.0030.00313.20
7.3.310.0040.00416.24
7.3.300.0000.00716.11
7.3.290.0040.00416.11
7.3.280.0090.00816.25
7.3.270.0130.01017.40
7.3.260.0090.00916.36
7.3.250.0140.00616.24
7.3.240.0080.01316.25
7.3.230.0060.01116.39
7.3.210.0000.01616.52
7.3.200.0090.00616.36
7.3.190.0040.01216.50
7.3.180.0130.00316.47
7.3.170.0090.01216.39
7.3.160.0090.00916.38
7.3.10.0040.01116.45
7.3.00.0060.00616.50
7.2.330.0040.01516.47
7.2.320.0080.00816.20
7.2.310.0110.00616.59
7.2.300.0060.01116.43
7.2.290.0080.00816.55
7.2.130.0080.00616.55
7.2.120.0060.00916.89
7.2.110.0070.01016.89
7.2.100.0070.00716.67
7.2.90.0070.01016.81
7.2.80.0110.00316.90
7.2.70.0060.00916.86
7.2.60.0000.01416.74
7.2.50.0070.00716.87
7.2.40.0030.01016.90
7.2.30.0080.00816.54
7.2.20.0040.01116.73
7.2.10.0000.01716.96
7.2.00.0060.01016.78
7.1.250.0030.00615.60
7.0.100.0980.00613.20
7.0.90.1040.00313.11
7.0.80.0940.00313.43
7.0.70.0820.00312.96
7.0.60.1360.00313.26
7.0.50.1050.01013.20
7.0.40.1100.00613.23
7.0.30.1180.00713.25
7.0.20.1270.00613.39
7.0.10.1130.01013.18
7.0.00.1250.00613.52
5.6.250.0040.01014.00
5.6.240.0090.00413.84
5.6.230.0050.01013.83
5.6.220.0080.00513.75
5.6.210.0090.00613.92
5.6.200.0070.00713.69
5.6.190.0110.00314.08
5.6.180.0090.00613.98
5.6.170.0070.00713.89
5.6.160.0060.00913.64
5.6.150.0060.00613.83
5.6.140.0000.01613.80
5.6.130.0080.00513.83
5.6.120.0080.00813.93
5.6.110.0040.01214.03
5.6.100.0150.00013.88
5.6.90.0030.01214.02
5.6.80.0060.01013.82
5.6.70.0080.00813.72
5.6.60.0080.00713.69
5.6.50.0040.00913.74
5.6.40.0150.00713.78
5.6.30.0190.00414.05
5.6.20.0140.00514.09
5.6.10.0130.01014.14
5.6.00.0120.00913.83

preferences:
60.38 ms | 401 KiB | 5 Q