# More understandable explanation of how named subpattern work

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@299033 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Pierrick Charron 2010-05-05 20:57:06 +00:00
parent a652e25848
commit 503c562c51

View file

@ -1279,10 +1279,10 @@
</para>
<para>
It is possible to name the subpattern with
<literal>(?P&lt;name&gt;pattern)</literal> since PHP 4.3.3. Array with
matches will contain the match indexed by the string alongside the match
indexed by a number, then.
As of PHP 4.3.3, it is possible to name a subpattern using the syntax
<literal>(?P&lt;name&gt;pattern)</literal>. This subpattern will then
be indexed in the matches array by its normal numeric position and
also by name.
</para>
</section>