svn: /phpdoc/en/trunk/reference/strings/functions/ substr-compare.xml

From: Date: Tue, 08 Dec 2009 09:29:30 +0000
Subject: svn: /phpdoc/en/trunk/reference/strings/functions/ substr-compare.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5625@lists.php.net to get a copy of this message
rquadling Tue, 08 Dec 2009 09:29:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=291868 Log: Corrected initializer for length. Expanded return values. Bug#50402 Bug: http://bugs.php.net/50402 (Open) substr_compare emits no warning if length is equal to length of main_str Changed paths: U phpdoc/en/trunk/reference/strings/functions/substr-compare.xml Modified: phpdoc/en/trunk/reference/strings/functions/substr-compare.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/substr-compare.xml 2009-12-08 08:34:53 UTC (rev 291867) +++ phpdoc/en/trunk/reference/strings/functions/substr-compare.xml 2009-12-08 09:29:30 UTC (rev 291868) @@ -13,7 +13,7 @@ <methodparam><type>string</type><parameter>main_str</parameter></methodparam> <methodparam><type>string</type><parameter>str</parameter></methodparam> <methodparam><type>int</type><parameter>offset</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>0</initializer></methodparam> + <methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>strlen($main_str)</initializer></methodparam> <methodparam choice="opt"><type>bool</type><parameter>case_insensitivity</parameter><initializer>false</initializer></methodparam> </methodsynopsis> <para> @@ -31,6 +31,7 @@ <term><parameter>main_str</parameter></term> <listitem> <para> + The main string being compared. </para> </listitem> </varlistentry> @@ -38,6 +39,7 @@ <term><parameter>str</parameter></term> <listitem> <para> + The secondary string being compared. </para> </listitem> </varlistentry> @@ -77,9 +79,10 @@ Returns &lt; 0 if <parameter>main_str</parameter> from position <parameter>offset</parameter> is less than <parameter>str</parameter>, &gt; 0 if it is greater than <parameter>str</parameter>, and 0 if they are equal. - If <parameter>length</parameter> is equal or greater than length of - <parameter>main_str</parameter> and <parameter>length</parameter> is set, - <function>substr_compare</function> prints warning and returns &false;. + If <parameter>offset</parameter> is equal to or greater than the length of + <parameter>main_str</parameter> or <parameter>length</parameter> is set and + is less than 1, <function>substr_compare</function> prints a warning and returns + &false;. </para> </refsect1>

« previous php.doc.cvs (#5625) next »