1--TEST-- 2Test typed properties allow fetch reference 3--FILE-- 4<?php 5class Foo { 6 public int $bar = 1; 7} 8 9$cb = function(int &$bar) { 10 var_dump($bar); 11}; 12 13$foo = new Foo(); 14$cb($foo->bar); 15?> 16--EXPECT-- 17int(1) 18