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
That is the primary purpose. For most datasets str_replace(' ', "\t",
var_export($obj, true)) gets what I want. But this is for exploration of
process. I don't expect it to be committed to the language on a permanent
basis. To be honest, it would be better as a php.ini setting -
export_indentati
If you're looking into doing something that are both useful and good for
learning C, my suggestion is to hack PHP in some way that makes something
possible (in PHP) that you couldn't simply accomplish by writing a simple
wrapper function or workaround. Making var_export use tabs instead of spaces
i