<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.splfixedarray.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'splfixedarray.toarray.php',
    1 => 'SplFixedArray::toArray',
    2 => 'Returns a PHP array from the fixed array',
  ),
  'up' => 
  array (
    0 => 'class.splfixedarray.php',
    1 => 'SplFixedArray',
  ),
  'prev' => 
  array (
    0 => 'splfixedarray.setsize.php',
    1 => 'SplFixedArray::setSize',
  ),
  'next' => 
  array (
    0 => 'splfixedarray.unserialize.php',
    1 => 'SplFixedArray::__unserialize',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/splfixedarray/toarray.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="splfixedarray.toarray" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplFixedArray::toArray</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplFixedArray::toArray</span> &mdash; <span class="dc-title">Returns a PHP array from the fixed array</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splfixedarray.toarray-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplFixedArray::toArray</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Returns a PHP array from the fixed array.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splfixedarray.toarray-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splfixedarray.toarray-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a PHP <span class="type"><a href="language.types.array.php" class="type array">array</a></span>, similar to the fixed array.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-splfixedarray.toarray-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>SplFixedArray::toArray()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fa </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFixedArray</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$fa</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">] = </span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$fa</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">] = </span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$fa</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">toArray</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">array(3) {
  [0]=&gt;
  int(0)
  [1]=&gt;
  NULL
  [2]=&gt;
  int(2)
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


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