1--TEST-- 2iterable type#004 - Parameter covariance 3--FILE-- 4<?php 5 6class Foo { 7 function testArray(array $array) {} 8 9 function testTraversable(Traversable $traversable) {} 10 11 function testScalar(int $int) {} 12} 13 14class Bar extends Foo { 15 function testArray(iterable $iterable) {} 16 17 function testTraversable(iterable $iterable) {} 18 19 function testScalar(iterable $iterable) {} 20} 21 22?> 23--EXPECTF-- 24Fatal error: Declaration of Bar::testScalar(iterable $iterable) must be compatible with Foo::testScalar(int $int) in %s on line %d 25