svn: /phpdoc/en/trunk/ language-snippets.ent reference/strings/functions/substr.xml

From: Date: Fri, 07 Aug 2015 12:49:48 +0000
Subject: svn: /phpdoc/en/trunk/ language-snippets.ent reference/strings/functions/substr.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13513@lists.php.net to get a copy of this message
cmb Fri, 07 Aug 2015 12:49:48 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337321 Log: updated substr() documentation for PHP 7 (see #69931) Bug: https://bugs.php.net/69931 (Not a bug) substr() behaviour change Changed paths: U phpdoc/en/trunk/language-snippets.ent U phpdoc/en/trunk/reference/strings/functions/substr.xml Modified: phpdoc/en/trunk/language-snippets.ent =================================================================== --- phpdoc/en/trunk/language-snippets.ent 2015-08-07 10:29:03 UTC (rev 337320) +++ phpdoc/en/trunk/language-snippets.ent 2015-08-07 12:49:48 UTC (rev 337321) @@ -292,6 +292,8 @@ <!ENTITY example.outputs '<para xmlns="http://docbook.org/ns/docbook">The above example will output:</para>'> +<!ENTITY example.outputs.5 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 5:</para>'> + <!ENTITY example.outputs.53 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 5.3:</para>'> <!ENTITY example.outputs.54 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 5.4:</para>'> @@ -300,6 +302,8 @@ <!ENTITY example.outputs.56 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 5.6:</para>'> +<!ENTITY example.outputs.7 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 7:</para>'> + <!ENTITY example.outputs.32bit '<para xmlns="http://docbook.org/ns/docbook">Output of the above example on 32 bit machines:</para>'> <!ENTITY example.outputs.64bit '<para xmlns="http://docbook.org/ns/docbook">Output of the above example on 64 bit machines:</para>'> Modified: phpdoc/en/trunk/reference/strings/functions/substr.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/substr.xml 2015-08-07 10:29:03 UTC (rev 337320) +++ phpdoc/en/trunk/reference/strings/functions/substr.xml 2015-08-07 12:49:48 UTC (rev 337321) @@ -50,7 +50,7 @@ from the end of <parameter>string</parameter>. </para> <para> - If <parameter>string</parameter> is less than or equal to + If <parameter>string</parameter> is less than <parameter>start</parameter> characters long, &false; will be returned. </para> <para> @@ -135,6 +135,14 @@ </thead> <tbody> <row> + <entry>7.0.0</entry> + <entry> + If <parameter>string</parameter> is equal to + <parameter>start</parameter> characters long, an empty string will be + returned. Prior to this version, &false; was returned in this case. + </entry> + </row> + <row> <entry>5.2.2 - 5.2.6</entry> <entry> If the <parameter>start</parameter> parameter indicates the position of @@ -194,13 +202,25 @@ ?> ]]> </programlisting> - &example.outputs; + &example.outputs.7; <screen> <![CDATA[ 1) 'pe' 2) '54' 3) 'gr' 4) '1' +5) '' +6) '' +7) '1200' +]]> + </screen> + &example.outputs.5; + <screen> +<![CDATA[ +1) 'pe' +2) '54' +3) 'gr' +4) '1' 5) false 6) false 7) '1200' @@ -218,7 +238,7 @@ <programlisting role="php"> <![CDATA[ <?php -var_dump(substr('a', 1)); // bool(false) +var_dump(substr('a', 2)); // bool(false) ?> ]]> </programlisting>

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