Re: [RFC] Var_export tabbing
| From: | Johannes Schlüter | Date: | Mon, 24 Jan 2011 19:54:17 +0000 |
| Subject: | Re: [RFC] Var_export tabbing | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51351@lists.php.net to get a copy of this message | ||
Hi,
On Mon, 2011-01-24 at 13:26 -0500, Michael Morris wrote:
> Anyway, var_export takes 2 arguments - the expression to be converted and
> whether to return or echo it. I'd like to add a third, whether to use
> spaces (default) or tabs for indentation
While I'm not sure that's really needed:
Why not a string parameter - then one could choose between 2 or 4 spaces
and tabs.
As var_Export is using smart_str this should be quite simple change to
do :-)
> For backwards compatibility null would mean uses spaces, and use 2 per
> indentation. If set to true a tab character would be used.
For BC the the key point is if it is omitted, since not passing a
parameter is different from passing NULL (or any other value)
johannes