3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Duplication for completion... interface I1 {} interface I2 extends I1 { public function instanceOfSelf(self $object); public function instanceOfParent(parent $object); } class A implements I1 {} class B implements I2 { private function printBool(bool $b) { echo ($b ? 'true' : 'false') . "\n"; } public function instanceOfSelf(I2 $object) { $this->printBool($object instanceof I2); } public function instanceOfParent(I1 $object) { $this->printBool($object instanceof I1); } } $a = new A; $b = new B; $b->instanceOfSelf($b); // true $b->instanceOfParent($a); // true $b->instanceOfParent($b); // true

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.4.120.0140.00624.04
8.4.110.0160.00522.68
8.4.100.0060.01418.88
8.4.90.0110.00920.71
8.4.80.0050.00417.94
8.4.70.0100.00517.75
8.4.60.0130.00718.68
8.4.50.0140.00723.90
8.4.40.0130.00617.58
8.4.30.0030.01222.65
8.4.20.0070.01018.80
8.4.10.0030.00719.75
8.3.250.0090.00719.04
8.3.240.0100.00717.17
8.3.230.0110.00916.73
8.3.220.0050.00318.79
8.3.210.0110.00916.54
8.3.200.0030.00616.42
8.3.190.0090.00917.04
8.3.180.0110.00718.32
8.3.170.0090.00916.78
8.3.160.0120.00316.45
8.3.150.0090.00920.61
8.3.140.0060.00918.84
8.3.130.0050.00518.39
8.3.120.0090.00018.79
8.3.110.0080.00820.94
8.3.100.0110.00716.24
8.3.90.0130.00726.77
8.3.80.0060.00316.50
8.3.70.0090.00616.58
8.3.60.0160.00718.68
8.3.50.0070.01421.99
8.3.40.0150.00618.89
8.3.30.0150.00018.60
8.3.20.0080.00020.73
8.3.10.0000.00821.86
8.3.00.0080.00023.66
8.2.290.0140.00616.59
8.2.280.0040.00418.39
8.2.270.0190.00017.10
8.2.260.0040.00417.21
8.2.250.0030.00518.57
8.2.240.0090.00916.25
8.2.230.0070.00022.58
8.2.220.0060.00324.06
8.2.210.0130.00626.77
8.2.200.0060.00318.18
8.2.190.0140.00716.58
8.2.180.0120.00618.29
8.2.170.0140.00022.96
8.2.160.0140.00020.98
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0030.00621.05
8.2.110.0030.00621.08
8.2.100.0030.00917.78
8.2.90.0060.00317.48
8.2.80.0040.00418.48
8.2.70.0040.00417.80
8.2.60.0040.00417.91
8.2.50.0040.00418.10
8.2.40.0000.00719.29
8.2.30.0000.00719.04
8.2.20.0040.00417.96
8.2.10.0050.00318.33
8.2.00.0020.00518.21
8.1.330.0150.00222.12
8.1.320.0140.00716.24
8.1.310.0060.00320.13
8.1.300.0170.00316.25
8.1.290.0060.00330.84
8.1.280.0000.01525.92
8.1.270.0050.00322.19
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0070.00317.20
8.1.230.0050.00520.77
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0000.00817.22
8.1.190.0080.00017.22
8.1.180.0030.00518.10
8.1.170.0040.00418.50
8.1.160.0070.00019.00
8.1.150.0030.00518.67
8.1.140.0030.00518.12
8.1.130.0030.00619.58
8.1.120.0030.00517.32
8.1.110.0060.00317.35
8.1.100.0030.00517.33
8.1.90.0050.00217.28
8.1.80.0050.00317.30
8.1.70.0050.00417.30
8.1.60.0070.00117.41
8.1.50.0040.00417.43
8.1.40.0040.00417.41
8.1.30.0030.00417.43
8.1.20.0050.00317.43
8.1.10.0040.00417.32
8.1.00.0060.00317.34
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0070.00018.30
8.0.270.0030.00616.82
8.0.260.0020.00617.43
8.0.250.0030.00416.85
8.0.240.0030.00416.75
8.0.230.0020.00616.79
8.0.220.0000.00716.68
8.0.210.0020.00616.71
8.0.200.0000.00716.85
8.0.190.0030.00516.86
8.0.180.0040.00316.83
8.0.170.0040.00316.85
8.0.160.0020.00516.72
8.0.150.0020.00616.68
8.0.140.0030.00316.63
8.0.130.0030.00314.94
8.0.120.0040.00416.66
8.0.110.0030.00516.78
8.0.100.0050.00316.78
8.0.90.0050.00316.76
8.0.80.0030.00816.77
8.0.70.0030.00516.74
8.0.60.0050.00316.71
8.0.50.0040.00316.78
8.0.30.0060.00616.87
8.0.20.0070.00516.89
8.0.10.0030.00416.87
8.0.00.0090.00716.65
7.4.330.0060.00415.76
7.4.320.0050.00616.47
7.4.300.0070.00516.33
7.4.290.0120.00016.50
7.4.280.0060.00716.48
7.4.270.0080.00416.48
7.4.260.0070.00516.33
7.4.250.0070.00516.45
7.4.240.0060.00516.41
7.4.230.0090.00316.39
7.4.220.0100.00116.33
7.4.210.0080.00816.46
7.4.200.0080.00316.30
7.4.190.0140.00016.42
7.4.180.0080.00616.34
7.4.160.0110.00316.53
7.4.150.0110.00216.46
7.4.140.0100.00817.16
7.4.130.0050.01116.38
7.4.120.0110.00516.36
7.4.110.0110.00416.53
7.4.100.0070.00816.40
7.4.90.0130.00416.47
7.4.80.0100.00817.84
7.4.70.0100.00616.39
7.4.60.0110.00416.39
7.4.50.0100.00216.26
7.4.40.0110.00616.31
7.4.30.0110.00316.20
7.4.20.0100.00316.27
7.4.10.0130.00016.39
7.4.00.0040.01115.41
7.3.330.0050.00414.68
7.3.320.0050.00414.67
7.3.310.0060.00416.20
7.3.300.0070.00316.15
7.3.290.0070.00316.17
7.3.280.0100.00516.22
7.3.270.0070.00716.15
7.3.260.0120.00616.35
7.3.250.0080.00616.01
7.3.240.0110.00516.30
7.3.230.0130.00316.18
7.3.220.0140.00016.23
7.3.210.0100.00616.20
7.3.200.0120.00616.35
7.3.190.0070.01116.24
7.3.180.0120.00316.26
7.3.170.0130.00216.33
7.3.160.0100.00516.18
7.3.150.0110.00416.22
7.3.140.0110.00316.16
7.3.130.0080.00516.10
7.3.120.0090.00515.44
7.3.110.0100.00415.40
7.3.100.0100.00515.28
7.3.90.0070.00715.47
7.3.80.0090.00515.26
7.3.70.0050.01015.49
7.3.60.0050.00915.08
7.3.50.0060.00814.96
7.3.40.0070.00914.96
7.3.30.0050.00915.05
7.3.20.0090.00416.44
7.3.10.0090.00716.44
7.3.00.0100.00716.39
7.2.340.0070.00716.01
7.2.330.0130.00316.32
7.2.320.0090.00616.29
7.2.310.0080.00716.32
7.2.300.0100.00816.24
7.2.290.0120.00316.32
7.2.280.0140.00016.04
7.2.270.0140.00016.05
7.2.260.0120.00216.08
7.2.250.0110.00715.57
7.2.240.0080.00815.43
7.2.230.0050.00915.38
7.2.220.0110.00315.67
7.2.210.0120.00115.35
7.2.200.0120.00115.65
7.2.190.0100.00515.11
7.2.180.0070.00915.23
7.2.170.0050.00815.19
7.2.160.0120.00415.28
7.2.150.0160.00216.49
7.2.140.0110.00616.56
7.2.130.0130.00516.60
7.2.120.0100.00716.61
7.2.110.0060.00716.65
7.2.100.0070.00616.65
7.2.90.0060.00816.62
7.2.80.0100.00516.55
7.2.70.0070.01116.64
7.2.60.0180.00816.53
7.2.50.0100.00716.50
7.2.40.0070.00716.67
7.2.30.0090.00816.65
7.2.20.0120.00416.66
7.2.10.0070.01016.63
7.2.00.0070.01116.46
7.1.330.0100.00515.84
7.1.320.0080.00515.74
7.1.310.0090.00515.72
7.1.300.0090.00815.68
7.1.290.0050.00815.64
7.1.280.0090.00715.59
7.1.270.0080.00715.74
7.1.260.0050.00715.72
7.1.250.0080.00815.67
7.1.240.0100.00415.96
7.1.230.0090.00515.96
7.1.220.0110.00415.96
7.1.210.0090.00715.96
7.1.200.0080.00815.96
7.1.190.0110.00415.96
7.1.180.0280.00615.96
7.1.170.0100.00515.96
7.1.160.0050.01015.96
7.1.150.0150.00015.96
7.1.140.0110.00415.96
7.1.130.0150.00015.96
7.1.120.0090.00515.96
7.1.110.0110.00415.96
7.1.100.0120.00315.96
7.1.90.0090.00515.96
7.1.80.0050.00915.96
7.1.70.0100.00515.96
7.1.60.0150.00015.96
7.1.50.0120.00215.96
7.1.40.0090.00715.96
7.1.30.0120.00215.96
7.1.20.0120.00315.96
7.1.10.0090.00615.96
7.1.00.0140.00015.96

preferences:
26.84 ms | 403 KiB | 5 Q