<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.pcre.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'pcre.constants.php',
    1 => 'Constantes pr&eacute;-d&eacute;finies',
    2 => 'Constantes pr&eacute;-d&eacute;finies',
  ),
  'up' => 
  array (
    0 => 'book.pcre.php',
    1 => 'PCRE',
  ),
  'prev' => 
  array (
    0 => 'pcre.configuration.php',
    1 => 'Configuration &agrave; l\'ex&eacute;cution',
  ),
  'next' => 
  array (
    0 => 'pcre.examples.php',
    1 => 'Exemples',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/pcre/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="pcre.constants" class="appendix">
 <h1 class="title">Constantes pré-définies</h1>

 <p class="simpara">Ces constantes sont définies par cette
extension, et ne sont disponibles que si cette extension a été compilée avec
PHP, ou bien chargée au moment de l&#039;exécution.</p>
 <table class="doctable table">
  <caption><strong>Constantes PREG</strong></caption>
  
   <thead>
    <tr>
     <th>Constantes</th>
     <th>Description</th>
     <th>À partir de</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr id="constant.preg-pattern-order">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-pattern-order">PREG_PATTERN_ORDER</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Ordonne les résultats de façon à ce que <var class="varname">$matches[0]</var> contienne les
      résultats qui correspondent au masque entier, <var class="varname">$matches[1]</var> ceux
      qui correspondent à la première parenthèse capturante et ainsi de suite. Cette
      constante est utilisée avec <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-set-order">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-set-order">PREG_SET_ORDER</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Les résultats sont classés de telle
      façon que <var class="varname">$matches[0]</var> contient la première
      série de résultat, <var class="varname">$matches[1]</var> la
      deuxième, etc.
      Cette constante est utilisée avec <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-offset-capture">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-offset-capture">PREG_OFFSET_CAPTURE</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      <p class="para">
       Si cette option est activée, pour chaque correspondance trouvée,
       l’offset de l&#039;octet correspondant sera également retourné.
       Il est à noter que cela modifie les valeurs de retour : chaque élément du tableau
       devient un tableau contenant la chaîne correspondante à l’offset 0
       et son offset dans la chaîne analysée à l’offset 1.
      </p>
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-split-no-empty">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-split-no-empty">PREG_SPLIT_NO_EMPTY</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Si cette option est activée, seules les sous-chaînes non vides
      seront retournées par <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-split-delim-capture">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-split-delim-capture">PREG_SPLIT_DELIM_CAPTURE</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Ce drapeau demande à <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span> de capturer
      également les expressions entre parenthèses du masque délimiteur.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-split-offset-capture">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-split-offset-capture">PREG_SPLIT_OFFSET_CAPTURE</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Voir la description de <strong><code><a href="pcre.constants.php#constant.preg-offset-capture">PREG_OFFSET_CAPTURE</a></code></strong>.
      Ce drapeau est uniquement utilisé avec <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span>.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-unmatched-as-null">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-unmatched-as-null">PREG_UNMATCHED_AS_NULL</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Cette constante demande à <span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span> et
      <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span>
      d&#039;inclure les sous-masques sans correspondance dans <var class="varname">$matches</var> avec une valeur à <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
      Sans cette constante, les sous-masques sans correspondance sont retournés avec une chaîne vide, comme si la correspondance était vide.
      Définir cette constante permet de distinguer ces deux cas.
     </td>
     <td>7.2.0</td>
    </tr>

    <tr id="constant.preg-no-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-no-error">PREG_NO_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> 
      s&#039;il n&#039;y a pas d&#039;erreur.
     </td>
     <td>5.2.0</td>
    </tr>

    <tr id="constant.preg-internal-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-internal-error">PREG_INTERNAL_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> 
      s&#039;il y a une erreur interne PCRE.
     </td>
     <td>5.2.0</td>
    </tr>

    <tr id="constant.preg-backtrack-limit-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-backtrack-limit-error">PREG_BACKTRACK_LIMIT_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> si
      <a href="pcre.configuration.php#ini.pcre.backtrack-limit" class="link">backtrack limit</a>
      a été atteint.
     </td>
     <td>5.2.0</td>
    </tr>

    <tr id="constant.preg-recursion-limit-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-recursion-limit-error">PREG_RECURSION_LIMIT_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> si
      <a href="pcre.configuration.php#ini.pcre.recursion-limit" class="link">la limite de récurrence</a>
      a été atteinte.
     </td>
     <td>5.2.0</td>
    </tr>

    <tr id="constant.preg-bad-utf8-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-bad-utf8-error">PREG_BAD_UTF8_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> 
      si la dernière erreur est due à une malformation des données
      UTF-8 (uniquement lors de l&#039;exécution d&#039;une expression en 
      <a href="reference.pcre.pattern.modifiers.php" class="link">mode UTF-8</a>).
     </td>
     <td>5.2.0</td>
    </tr>

    <tr id="constant.preg-bad-utf8-offset-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-bad-utf8-offset-error">PREG_BAD_UTF8_OFFSET_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par la fonction <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> si l&#039;offset
      ne correspond pas au début d&#039;un point valide UTF-8 (uniquement lorsque l&#039;on
      exécute une expression en <a href="reference.pcre.pattern.modifiers.php" class="link">mode
      UTF-8</a>).
     </td>
     <td>5.3.0</td>
    </tr>

    <tr id="constant.preg-jit-stacklimit-error">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-jit-stacklimit-error">PREG_JIT_STACKLIMIT_ERROR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourné par <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> si la dernière fonction 
      PCRE a échoué en raison de la limite de la pile JIT.
     </td>
     <td>7.0.0</td>
    </tr>

    <tr id="constant.pcre-version">
     <td>
      <strong><code><a href="pcre.constants.php#constant.pcre-version">PCRE_VERSION</a></code></strong>
      (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
     </td>
     <td>
      Version PCRE ainsi que la date de publication 
      (c.-à-d. <code class="literal">&quot;7.0 18-Dec-2006&quot;</code>).
     </td>
     <td>5.2.4</td>
    </tr>

    <tr id="constant.pcre-version-major">
     <td>
      <strong><code><a href="pcre.constants.php#constant.pcre-version-major">PCRE_VERSION_MAJOR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Numéro de version majeure de PCRE.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.pcre-version-minor">
     <td>
      <strong><code><a href="pcre.constants.php#constant.pcre-version-minor">PCRE_VERSION_MINOR</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Numéro de version mineure de PCRE.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.pcre-jit-support">
     <td>
      <strong><code><a href="pcre.constants.php#constant.pcre-jit-support">PCRE_JIT_SUPPORT</a></code></strong>
      (<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>)
     </td>
     <td>
      Indique si le support JIT de PCRE est disponible.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr id="constant.preg-grep-invert">
     <td>
      <strong><code><a href="pcre.constants.php#constant.preg-grep-invert">PREG_GREP_INVERT</a></code></strong>
      (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
     </td>
     <td>
      Retourne les éléments qui ne correspondent pas à un modèle donné.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

   </tbody>
  
 </table>

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