1--TEST--
2Test assign of invalid string to typed static int property
3--FILE--
4<?php
5
6function &nonNumericStringRef() {
7    static $a = "x";
8    return $a;
9}
10
11class Foo {
12    public static int $i;
13}
14
15try {
16    Foo::$i = &nonNumericStringRef();
17} catch (TypeError $e) { print $e->getMessage()."\n"; }
18try {
19    var_dump(Foo::$i);
20} catch (Error $e) { print $e->getMessage()."\n"; }
21var_dump(nonNumericStringRef());
22
23?>
24--EXPECT--
25Cannot assign string to property Foo::$i of type int
26Typed static property Foo::$i must not be accessed before initialization
27string(1) "x"
28