#40919 [Opn]: Error in example code for str_pad
| From: | vrana@php.net | Date: | Mon, 26 Mar 2007 13:12:59 +0000 |
| Subject: | #40919 [Opn]: Error in example code for str_pad | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-34881@lists.php.net to get a copy of this message | ||
ID: 40919
Updated by: vrana@php.net
Reported By: emiel at alternet dot nl
Status: Open
-Bug Type: Documentation problem
+Bug Type: Website problem
Operating System: n/a
PHP Version: Irrelevant
New Comment:
XML source files are OK. Here is the patch for website presentation
layer:
Index: layout.inc
===================================================================
RCS file: /repository/phpweb/include/layout.inc,v
retrieving revision 1.261
diff -u -r1.261 layout.inc
--- layout.inc 19 Feb 2007 23:53:02 -0000 1.261
+++ layout.inc 26 Mar 2007 13:12:03 -0000
@@ -35,6 +35,7 @@
'<span style="color: ', // from PHP 5.0.0RC1
'</font>',
"\n ",
+ ' ',
' '
),
array(
@@ -44,6 +45,7 @@
'<span class="',
'</span>',
"\n ",
+ ' ',
' '
),
$highlighted
Previous Comments:
------------------------------------------------------------------------
[2007-03-26 11:39:03] emiel at alternet dot nl
Description:
------------
The comments in the example code for str_pad contains an error.
On the 3rd line of the code, the function returns a 10 character
string, however the comment for the code says it should return a 9
character string.
Reproduce code:
---------------
echo str_pad($input, 10);
Expected result:
----------------
// produces "Alien "
Actual result:
--------------
// produces "Alien "
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40919&edit=1