1--TEST--
2Compound assignment operator on static property holding ref
3--FILE--
4<?php declare(strict_types=1);
5
6class Test {
7    public static int $intProp = 123;
8    public static $prop;
9}
10
11Test::$prop =& Test::$intProp;
12try {
13    Test::$prop .= "foobar";
14} catch (TypeError $e) {
15    echo $e->getMessage(), "\n";
16}
17var_dump(Test::$prop, Test::$intProp);
18?>
19--EXPECT--
20Cannot assign string to reference held by property Test::$intProp of type int
21int(123)
22int(123)
23