<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'pcre.constants.php',
    1 => 'Predefined Constants',
    2 => 'Predefined Constants',
  ),
  'up' => 
  array (
    0 => 'book.pcre.php',
    1 => 'PCRE',
  ),
  'prev' => 
  array (
    0 => 'pcre.configuration.php',
    1 => 'Runtime Configuration',
  ),
  'next' => 
  array (
    0 => 'pcre.examples.php',
    1 => 'Examples',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    '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">Predefined Constants</h1>

 <p class="simpara">
The constants below are defined by this extension, and
will only be available when the extension has either
been compiled into PHP or dynamically loaded at runtime.
</p>
 <table class="doctable table">
  <caption><strong>PREG constants</strong></caption>
  
   <thead>
    <tr>
     <th>Constants</th>
     <th>Description</th>
     <th>As of</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>
      Orders results so that <var class="varname">$matches[0]</var> is an array of full pattern
      matches, <var class="varname">$matches[1]</var> is an array of strings matched by the first
      parenthesized subpattern, and so on. This flag is only used with
      <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>
      Orders results so that <var class="varname">$matches[0]</var> is an array of first set of
      matches, <var class="varname">$matches[1]</var> is an array of second set of matches, and so
      on. This flag is only used with <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>
      If this flag is set, for every occurring match the appendant byte
      offset will also be returned. Note that this changes the return
      values in an array where every element is an array consisting of the
      matched string at offset 0 and its string offset within subject at
      offset 1.
     </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>
      This flag tells <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span> to return only non-empty
      pieces.
     </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>
      This flag tells <span class="function"><a href="function.preg-split.php" class="function">preg_split()</a></span> to capture
      parenthesized expression in the delimiter pattern as well.
     </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>
      See the description of <strong><code><a href="pcre.constants.php#constant.preg-offset-capture">PREG_OFFSET_CAPTURE</a></code></strong>.
      This flag is only used for <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>
      This flag tells <span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span> and
      <span class="function"><a href="function.preg-match-all.php" class="function">preg_match_all()</a></span> to include unmatched subpatterns in
      <var class="varname">$matches</var> as <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> values. Without this flag, unmatched
      subpatterns are reported as empty strings, as if they were empty matches.
      Setting this flag allows to distinguish between these two cases.
     </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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if there were no
      errors.
     </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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if there was an
      internal PCRE error.
     </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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if <a href="pcre.configuration.php#ini.pcre.backtrack-limit" class="link">backtrack limit</a> was exhausted.
     </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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if <a href="pcre.configuration.php#ini.pcre.recursion-limit" class="link">recursion limit</a> was exhausted.
     </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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if the last error was
      caused by malformed UTF-8 data (only when running a regex in <a href="reference.pcre.pattern.modifiers.php" class="link">UTF-8 mode</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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if the offset didn&#039;t
      correspond to the begin of a valid UTF-8 code point (only when running
      a regex in <a href="reference.pcre.pattern.modifiers.php" class="link">UTF-8
      mode</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>
      Returned by <span class="function"><a href="function.preg-last-error.php" class="function">preg_last_error()</a></span> if the last PCRE function
      failed due to limited JIT stack space.
     </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>
      PCRE version and release date (e.g. &quot;<code class="literal">7.0 18-Dec-2006</code>&quot;).
     </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>
      PCRE major version number.
     </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>
      PCRE minor version number.
     </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>
      Indicates whether PCRE JIT support is available.
     </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>
      Return the elements that do not match a given pattern.
     </td>
     <td class="empty">&nbsp;</td>
    </tr>

   </tbody>
  
 </table>

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