--TEST-- Generics extension: basic type erasure on function parameter --DESCRIPTION-- Tests that array is correctly erased to array before parsing, allowing the function to be called without parse errors. --SKIPIF-- --FILE-- name = $name; } } function something(array $widgets): void { foreach ($widgets as $widget) { echo $widget->name . "\n"; } } $widgets = [new Widget('foo'), new Widget('bar')]; something($widgets); ?> --EXPECT-- foo bar