Re: Proposal: short_var_export($value, bool $return=false, int $flags=0)
| From: | Pierre R. | Date: | Tue, 19 Jan 2021 17:11:01 +0000 |
| Subject: | Re: Proposal: short_var_export($value, bool $return=false, int $flags=0) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112931@lists.php.net to get a copy of this message | ||
Le 19/01/2021 à 16:12, tyson andre a écrit :
It seems inconsistent and prone to bugs when refactoring (e.g. converting to string and not using the result) to have two functions named var_export where one prints by default and the other doesn't, but otherwise . Changing to a different name entirely would solve that, such as var_repr(), var_representation(), serialize_[value_]as_php_snippet(), etc.Hello, I think that decoupling it from var_export() and naming it differently is fine. var_repr() is not a bad name, a bit cryptic, but for those who do Python, it's familiar. Regards, -- Pierre