--TEST-- Test assign to typed property taken by reference --FILE-- a = new A; $f($o->a->foo); $f($o->a->bar); ?> --EXPECTF-- int(1) int(2) Fatal error: Uncaught TypeError: Cannot assign string to reference held by property A::$bar of type int in %s:%d Stack trace: #0 %s(%d): {closure}(2) #1 {main} thrown in %s on line %d