<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.yaml.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.yaml-parse-file.php',
    1 => 'yaml_parse_file',
    2 => 'Parse a YAML stream from a file',
  ),
  'up' => 
  array (
    0 => 'ref.yaml.php',
    1 => 'Yaml Функції',
  ),
  'prev' => 
  array (
    0 => 'function.yaml-parse.php',
    1 => 'yaml_parse',
  ),
  'next' => 
  array (
    0 => 'function.yaml-parse-url.php',
    1 => 'yaml_parse_url',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yaml/functions/yaml-parse-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.yaml-parse-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaml_parse_file</h1>
  <p class="verinfo">(PECL yaml &gt;= 0.4.0)</p><p class="refpurpose"><span class="refname">yaml_parse_file</span> &mdash; <span class="dc-title">Parse a YAML stream from a file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.yaml-parse-file-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaml_parse_file</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$pos</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter reference">&$ndocs</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$callbacks</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span><br>): <span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   Convert all or part of a YAML document stream read from a file to a PHP variable.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.yaml-parse-file-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Path to the file.
      </p>
     </dd>
    
    
     <dt><code class="parameter">pos</code></dt>
     <dd>
      <p class="para">
       Document to extract from stream (<code class="literal">-1</code> for all
       documents, <code class="literal">0</code> for first document, ...).
      </p>
     </dd>
    
    
     <dt><code class="parameter">ndocs</code></dt>
     <dd>
      <p class="para">
       If <code class="parameter">ndocs</code> is provided, then it is filled with the
       number of documents found in stream.
      </p>
     </dd>
    
    
     <dt><code class="parameter">callbacks</code></dt>
     <dd>
      <p class="para">
       Content handlers for YAML nodes. Associative <span class="type"><a href="language.types.array.php" class="type array">array</a></span> of YAML
       tag =&gt; <span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> mappings. See
       <a href="yaml.callbacks.parse.php" class="link">parse callbacks</a> for more
       details.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.yaml-parse-file-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the value encoded in <code class="parameter">filename</code> in appropriate
   PHP type або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки. If <code class="parameter">pos</code> is <code class="literal">-1</code> an
   <span class="type"><a href="language.types.array.php" class="type array">array</a></span> will be returned with one entry for each document found
   in the stream.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.yaml-parse-file-notes">
  <h3 class="title">Примітки</h3>
  <div class="warning"><strong class="warning">Увага</strong>
   <p class="para">
    Processing untrusted user input with <span class="function"><strong>yaml_parse_file()</strong></span>
    is dangerous if the use of <span class="function"><a href="function.unserialize.php" class="function">unserialize()</a></span> is enabled for
    nodes using the <code class="literal">!php/object</code> tag. This behavior can be
    disabled by using the <code class="literal">yaml.decode_php</code> ini setting.
   </p>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.yaml-parse-file-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.yaml-parse.php" class="function" rel="rdfs-seeAlso">yaml_parse()</a> - Parse a YAML stream</span></li>
    <li><span class="function"><a href="function.yaml-parse-url.php" class="function" rel="rdfs-seeAlso">yaml_parse_url()</a> - Parse a Yaml stream from a URL</span></li>
    <li><span class="function"><a href="function.yaml-emit.php" class="function" rel="rdfs-seeAlso">yaml_emit()</a> - Returns the YAML representation of a value</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>