public static function fillToSize(&$array, $size, $fill)
    {
        $cnt = \count($array);
        if ($cnt >= $size) {
            return;
        }
        $array = array_merge($array, array_fill($cnt + 1, $size - $cnt, $fill));
    }
public static function fillToSize(&$array, $size, $fill)
    {
        $cnt = \count($array);
        if ($cnt >= $size) {
            return;
        }
        $array = array_merge($array, array_fill($cnt + 1, $size - $cnt, $fill));
    }
public static function fillToSize ( & $ array , $ size , $ fill ) { $ cnt = \ count ( $ array ) ; if ( $ cnt >= $ size ) { return ; } $ array = array_merge ( $ array , array_fill ( $ cnt + 1 , $ size - $ cnt , $ fill ) ) ; }
Extend array to desired size by filling it with fill data

@param array $array Array to fill
@param int $size Desired size
@param mixed $fill Fill data
Extend array to desired size by filling it with fill data