<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.xhprof.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.xhprof-enable.php',
    1 => 'xhprof_enable',
    2 => 'Inicia perfil xhprof',
  ),
  'up' => 
  array (
    0 => 'ref.xhprof.php',
    1 => 'Xhprof Funciones',
  ),
  'prev' => 
  array (
    0 => 'function.xhprof-disable.php',
    1 => 'xhprof_disable',
  ),
  'next' => 
  array (
    0 => 'function.xhprof-sample-disable.php',
    1 => 'xhprof_sample_disable',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/xhprof/functions/xhprof-enable.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.xhprof-enable" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xhprof_enable</h1>
  <p class="verinfo">(PECL xhprof &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">xhprof_enable</span> &mdash; <span class="dc-title">Inicia perfil xhprof</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.xhprof-enable-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>xhprof_enable</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Inicia perfiles xhprof.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.xhprof-enable-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Flags opcionales para añadir información adicional a la creación de perfiles. Véase las
       <a href="xhprof.constants.php" class="link">constantes XHprof</a> Para obtener más información
       acerca de estos flags, p. ej., <strong><code><a href="xhprof.constants.php#constant.xhprof-flags-memory">XHPROF_FLAGS_MEMORY</a></code></strong>
       para permitir perfiles de memoria.
      </p>
     </dd>
    
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       Un <span class="type"><a href="language.types.array.php" class="type array">array</a></span> de opciones opcionales, es decir, la opción
       &#039;ignored_functions&#039; para pasar en las funciones que se ignoraron
       durante el perfilado.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.xhprof-enable-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.xhprof-enable-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>PECL xhprof 0.9.2</td>
      <td>
       El parámetro opcional <code class="parameter">options</code> fué agregado.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>



 <div class="refsect1 examples" id="refsect1-function.xhprof-enable-examples">
  <h3 class="title">Ejemplos</h3>
  <div class="example" id="example-1">
   <p><strong>Ejemplo #1 Ejemplos de <span class="function"><strong>xhprof_enable()</strong></span></strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// 1. tiempo transcurrido + memoria + perfiles CPU; e ignorar las funciones integradas (internas)<br /></span><span style="color: #0000BB">xhprof_enable</span><span style="color: #007700">(</span><span style="color: #0000BB">XHPROF_FLAGS_NO_BUILTINS </span><span style="color: #007700">| </span><span style="color: #0000BB">XHPROF_FLAGS_CPU </span><span style="color: #007700">| </span><span style="color: #0000BB">XHPROF_FLAGS_MEMORY</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// 2. perfil tiempo transcurrido; ignorando call_user_func* durante el perfilado<br /></span><span style="color: #0000BB">xhprof_enable</span><span style="color: #007700">(<br />    </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />    array(</span><span style="color: #DD0000">'ignored_functions' </span><span style="color: #007700">=&gt;  array(</span><span style="color: #DD0000">'call_user_func'</span><span style="color: #007700">,<br />                                        </span><span style="color: #DD0000">'call_user_func_array'</span><span style="color: #007700">)));<br /><br /></span><span style="color: #FF8000">// 3. tiempo transcurrido + perfil de memoria; ignorando call_user_func* durante el perfilado<br /></span><span style="color: #0000BB">xhprof_enable</span><span style="color: #007700">(<br />    </span><span style="color: #0000BB">XHPROF_FLAGS_MEMORY</span><span style="color: #007700">,<br />    array(</span><span style="color: #DD0000">'ignored_functions' </span><span style="color: #007700">=&gt;  array(</span><span style="color: #DD0000">'call_user_func'</span><span style="color: #007700">,<br />                                        </span><span style="color: #DD0000">'call_user_func_array'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.xhprof-enable-seealso">
  <h3 class="title">Ver también</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.xhprof-disable.php" class="function" rel="rdfs-seeAlso">xhprof_disable()</a> - Detiene el perfilado xhprof</span></li>
   <li><span class="function"><a href="function.xhprof-sample-enable.php" class="function" rel="rdfs-seeAlso">xhprof_sample_enable()</a> - Iniciar el analisis de XHProf en modo de muestreo</span></li>
   <li><span class="function"><a href="function.memory-get-usage.php" class="function" rel="rdfs-seeAlso">memory_get_usage()</a> - Indica la cantidad de memoria utilizada por PHP</span></li>
   <li><span class="function"><a href="function.getrusage.php" class="function" rel="rdfs-seeAlso">getrusage()</a> - Devuelve el nivel de utilizaci&oacute;n de los recursos</span></li>
  </ul>
 </div>

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