--TEST-- Bug #24658 (combo of typehint / reference causes crash) --FILE-- --EXPECTF-- object(foo)#%d (0) { } object(foo)#%d (0) { } object(foo)#%d (0) { } object(foo)#%d (0) { } ===no_typehint=== object(foo)#%d (0) { } int(1) int(2) ===no_typehint_ref=== object(foo)#%d (0) { } int(1) int(2) ===typehint=== object(foo)#%d (0) { } Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, int given in %s:%d Stack trace: #0 [internal function]: typehint(1, 1) #1 %s(%d): array_walk(Array, 'typehint') #2 {main} thrown in %s on line %d