Req #73811 [Opn]: Add var_dump-like function to return output as string
| From: | requinix@php.net | Date: | Sun, 25 Dec 2016 14:28:56 +0000 |
| Subject: | Req #73811 [Opn]: Add var_dump-like function to return output as string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206200@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73811&edit=1
ID: 73811
Updated by: requinix@php.net
Reported by: pjvleeuwen at gmail dot com
-Summary: allow var_dump to return output as string
+Summary: Add var_dump-like function to return output as
string
Status: Open
Type: Feature/Change Request
-Package: SPL related
+Package: Variables related
Operating System: n/a
PHP Version: 7.1.0
Block user comment: N
Private report: N
New Comment:
Adding $return would not work: how would var_dump() know that you aren't trying to dump a
bool(true) but passing a special argument?
This would have to be a new function, eg. var_dump_r or var_rdump.
Previous Comments:
------------------------------------------------------------------------
[2016-12-25 14:09:48] pjvleeuwen at gmail dot com
Description:
------------
Please allow var_dump to return the output as a string instead of printing. Basically adding the
same $return parameter and behavior as for var_export and print_r. Adding this parameter would be
fully backwards compatible.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73811&edit=1