3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface FooInterface { public function foo(FooInterface $foo); } class Bar implements FooInterface { public function foo(FooInterface $foo): FooInterface { return new self(); } } $bar = new Bar(); $result = $bar->foo(new Bar()); var_dump($result);

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.70.0110.00718.20
8.3.60.0140.00716.50
8.3.50.0190.01021.99
8.3.40.0210.00018.64
8.3.30.0070.00718.55
8.3.20.0070.01020.20
8.3.10.0040.00423.61
8.3.00.0040.00417.38
8.2.180.0120.00918.41
8.2.170.0040.01122.96
8.2.160.0130.00720.19
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00917.47
8.2.110.0040.00420.52
8.2.100.0080.00417.91
8.2.90.0050.00317.88
8.2.80.0000.00918.77
8.2.70.0030.00617.63
8.2.60.0000.00817.63
8.2.50.0040.00418.05
8.2.40.0040.00419.97
8.2.30.0040.00420.53
8.2.20.0000.00817.54
8.2.10.0040.00417.92
8.2.00.0060.00318.06
8.1.280.0070.01025.92
8.1.270.0030.00523.89
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0070.00320.68
8.1.230.0040.00722.14
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00817.22
8.1.180.0090.00019.36
8.1.170.0060.00318.46
8.1.160.0040.00422.00
8.1.150.0070.00018.80
8.1.140.0000.00819.56
8.1.130.0000.00717.68
8.1.120.0040.00417.49
8.1.110.0020.00517.33
8.1.100.0060.00317.43
8.1.90.0070.00017.46
8.1.80.0040.00417.35
8.1.70.0000.00817.48
8.1.60.0000.00717.58
8.1.50.0080.00017.43
8.1.40.0030.00517.52
8.1.30.0060.00317.50
8.1.20.0040.00417.64
8.1.10.0000.00817.55
8.1.00.0030.00517.34
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.50
8.0.270.0030.00317.18
8.0.260.0030.00317.25
8.0.250.0040.00416.96
8.0.240.0080.00017.05
8.0.230.0000.01016.89
8.0.220.0030.00316.96
8.0.210.0000.00816.97
8.0.200.0000.00717.07
8.0.190.0040.00417.04
8.0.180.0000.00716.98
8.0.170.0060.00316.98
8.0.160.0000.00716.81
8.0.150.0070.00016.93
8.0.140.0000.00716.80
8.0.130.0070.00013.41
8.0.120.0040.00416.80
8.0.110.0000.00816.84
8.0.100.0050.00216.97
8.0.90.0030.00316.74
8.0.80.0110.00816.92
8.0.70.0040.00416.94
8.0.60.0000.00716.97
8.0.50.0040.00416.81
8.0.30.0090.00816.98
8.0.20.0100.00917.40
8.0.10.0000.00716.95
8.0.00.0070.01116.74
7.4.330.0000.00515.08
7.4.320.0030.00316.64
7.4.300.0030.00316.41
7.4.290.0000.00716.58
7.4.280.0030.00616.47
7.4.270.0000.00716.57
7.4.260.0000.00816.47
7.4.250.0040.00416.45
7.4.240.0030.00316.39
7.4.230.0000.00716.63
7.4.220.0090.00916.52
7.4.210.0110.00416.65
7.4.200.0030.00316.40
7.4.160.0090.00616.33
7.4.150.0080.00817.40
7.4.140.0100.01317.86
7.4.130.0180.00816.50
7.4.120.0090.00716.42
7.4.110.0140.00316.48
7.4.100.0040.01316.30
7.4.90.0100.00716.36
7.4.80.0110.00519.39
7.4.70.0230.00016.60
7.4.60.0120.00416.36
7.4.50.0040.00416.51
7.4.40.0110.00616.31
7.4.30.0130.00716.42
7.4.00.0070.01015.17
7.3.330.0030.00313.17
7.3.320.0000.00513.27
7.3.310.0030.00316.23
7.3.300.0000.00716.11
7.3.290.0070.00916.26
7.3.280.0060.01116.23
7.3.270.0100.00717.40
7.3.260.0090.00916.26
7.3.240.0100.01016.37
7.3.230.0100.00716.39
7.3.210.0110.00616.46
7.3.200.0000.01616.48
7.3.190.0140.00316.53
7.3.180.0060.01016.48
7.3.170.0030.01216.31
7.3.160.0150.00316.33
7.2.330.0070.01016.33
7.2.320.0060.01216.66
7.2.310.0070.01016.25
7.2.300.0150.00616.59
7.2.290.0030.01416.41
7.2.60.0070.01016.54
7.2.00.0000.01119.35
7.1.200.0080.00815.82
7.1.100.0090.00318.11
7.1.70.0000.01317.16
7.1.60.0070.01819.13
7.1.50.0070.01316.96
7.1.00.0030.07722.43
7.0.200.0000.00816.74
7.0.60.0170.06319.92
7.0.50.0070.06017.80
7.0.40.0000.06320.18
7.0.30.0300.03720.10
7.0.20.0370.07720.19
7.0.10.0270.09020.09
7.0.00.0130.06020.25
5.6.280.0070.05020.99
5.6.210.0100.04320.52
5.6.200.0000.07718.20
5.6.190.0130.07320.46
5.6.180.0100.07020.39
5.6.170.0270.07720.62
5.6.160.0130.06720.39
5.6.150.0100.07718.29
5.6.140.0070.04318.29
5.6.130.0070.08318.30
5.6.120.0030.04321.00
5.6.110.0030.04321.13
5.6.100.0030.09321.09
5.6.90.0130.06321.13
5.6.80.0030.07020.51
5.6.70.3370.03320.52
5.5.350.0000.08720.37
5.5.340.0030.04018.07
5.5.330.0100.08320.30
5.5.320.0030.08720.20
5.5.310.0400.07020.36
5.5.300.0130.07717.98
5.5.290.0030.08318.08
5.5.280.0100.08320.77
5.5.270.0100.05020.97
5.5.260.0130.07720.88
5.5.250.0100.06020.61
5.5.240.0000.07720.27
5.4.450.0530.05319.33
5.4.440.0570.06019.59
5.4.430.0700.04719.47
5.4.420.0630.05319.59
5.4.410.0430.06019.21
5.4.400.0570.05319.30
5.4.390.0570.04318.98
5.4.380.0530.05019.17
5.4.370.0500.05719.13
5.4.360.0400.06319.16
5.4.350.0570.04719.26
5.4.340.0530.05719.38
5.4.320.0530.05319.15
5.4.310.0670.04719.23
5.4.300.0700.06319.37
5.4.290.0700.04718.84
5.4.280.0600.05319.08
5.4.270.0630.04719.29
5.4.260.0700.04319.01
5.4.250.0600.05319.12
5.4.240.0600.04018.98
5.4.230.0630.05319.37
5.4.220.0670.05019.37
5.4.210.0600.05319.14
5.4.200.0570.06019.21
5.4.190.0500.04719.14
5.4.180.0670.04718.86
5.4.170.0630.05019.29
5.4.160.0630.05319.13
5.4.150.0630.05019.26
5.4.140.0630.04716.34
5.4.130.0470.04716.55
5.4.120.0600.05016.72
5.4.110.0470.05316.35
5.4.100.0630.05016.66
5.4.90.0500.04716.30
5.4.80.0600.05016.29
5.4.70.0670.04316.45
5.4.60.0600.05016.57
5.4.50.0570.04316.42
5.4.40.0600.03716.63
5.4.30.0600.04016.24
5.4.20.0470.07316.62
5.4.10.0570.05016.54
5.4.00.0530.05715.89

preferences:
46.86 ms | 401 KiB | 5 Q