xref: /PHP-8.1/Zend/tests/prototype_range.phpt (revision 6bd46d2f)
1--TEST--
2Range information from a prototype method should not be used
3--FILE--
4<?php
5
6class Test
7{
8    public function getInt(): int { return 0; }
9
10    public function getInt2() {
11        return $this->getInt();
12    }
13}
14
15class Test2 extends Test {
16    public function getInt(): int { return 1; }
17}
18
19$test2 = new Test2;
20var_dump($test2->getInt2());
21
22?>
23--EXPECT--
24int(1)
25