sander          Sun May 12 12:13:12 2002 EDT

  Modified files:              
    /phpdoc/en/reference/pcre/functions preg-match-all.xml 
                                        preg-match.xml 
  Log:
  Fix return values of preg_match() and preg_match_all()
  
  
Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml
diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.2 
phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.3
--- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.2   Wed Apr 17 02:42:48 
2002
+++ phpdoc/en/reference/pcre/functions/preg-match-all.xml       Sun May 12 12:13:12 
+2002
@@ -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 @@
      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>
Index: phpdoc/en/reference/pcre/functions/preg-match.xml
diff -u phpdoc/en/reference/pcre/functions/preg-match.xml:1.2 
phpdoc/en/reference/pcre/functions/preg-match.xml:1.3
--- phpdoc/en/reference/pcre/functions/preg-match.xml:1.2       Wed Apr 17 02:42:48 
2002
+++ phpdoc/en/reference/pcre/functions/preg-match.xml   Sun May 12 12:13:12 2002
@@ -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>


Reply via email to