1--TEST--
2Get property hook must respect property type
3--FILE--
4<?php
5
6class Test {
7    public int $prop1 {
8        get { return "foobar"; }
9    }
10    public int $prop2 {
11        get { return "42"; }
12    }
13}
14
15$test = new Test;
16try {
17    var_dump($test->prop1);
18} catch (Error $e) {
19    echo $e->getMessage(), "\n";
20}
21var_dump($test->prop2);
22
23?>
24--EXPECT--
25Test::$prop1::get(): Return value must be of type int, string returned
26int(42)
27