mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix return values of preg_match() and preg_match_all()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@81982 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6a3d115965
commit
834eb7f209
2 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.preg-match-all">
|
||||
<refnamediv>
|
||||
|
@ -101,8 +101,8 @@ print $out[1][0].", ".$out[1][1]."\n";
|
|||
to be PREG_PATTERN_ORDER.
|
||||
</para>
|
||||
<para>
|
||||
Returns the number of full pattern matches, or &false; if
|
||||
no match is found or an error occurred.
|
||||
Returns the number of full pattern matches (which might be zero),
|
||||
or &false; if an error occurred.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/pcre.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.preg-match">
|
||||
<refnamediv>
|
||||
|
@ -25,9 +25,13 @@
|
|||
the first captured parenthesized subpattern, and so on.
|
||||
</para>
|
||||
<para>
|
||||
Returns &true; if a match for <parameter>pattern</parameter> was
|
||||
found in the subject string, or &false; if not match was found
|
||||
or an error occurred.
|
||||
<function>preg_match</function> returns the number of times
|
||||
<parameter>pattern</parameter> matches. That will be either 0 times
|
||||
(no match) or 1 time because <function>preg_match</function> will stop
|
||||
searching after the first match. <function>preg_match_all</function>
|
||||
on the contrary will continue until it reaches the end of
|
||||
<parameter>subject</parameter>.
|
||||
<function>preg_match</function> returns &false; if an error occured.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
|
|
Loading…
Reference in a new issue