Bug #52360 [Opn->Bgs]: Strval documentation is unclear on whether it works on objects
| From: | rquadling@php.net | Date: | Fri, 16 Jul 2010 12:16:05 +0000 |
| Subject: | Bug #52360 [Opn->Bgs]: Strval documentation is unclear on whether it works on objects | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4699@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52360&edit=1
ID: 52360
Updated by: rquadling@php.net
Reported by: sjoerd-php at linuxonly dot nl
Summary: Strval documentation is unclear on whether it works on
objects
-Status: Open
+Status: Bogus
Type: Bug
Package: Documentation problem
PHP Version: Irrelevant
New Comment:
Please explain what else needs to be said in the Parameters section
regarding the $var parameter which currently reads:
"The variable that is being converted to a string.
var may be any scalar type. You cannot use strval() on arrays or
objects."
Clearly, new StrValTest which returns an object of class StrValTest, is
an object and can't be used by strval().
Previous Comments:
------------------------------------------------------------------------
[2010-07-16 14:01:36] sjoerd-php at linuxonly dot nl
Description:
------------
Strval documentation is unclear on whether it works on objects.
Parameter documentation for val:
var may be any scalar type. You cannot use strval() on arrays or
objects.
Example #1:
echo strval(new StrValTest);
Does not compute.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52360&edit=1