Re: [PHP-DEV] __repr() magic method (was Re: Proposal: short_var_export($value, bool $return=false, int $flags=0))

2021-01-20 Thread Ben Ramsey
> On Jan 20, 2021, at 10:28, Marco Pivetta wrote: > > On Wed, Jan 20, 2021 at 5:27 PM Ben Ramsey wrote: >> Taking this to a new thread so I don’t derail the `short_var_export()` >> thread. >> >> Dik, I like this addition, but I think the name “repr” might be confusing to >> PHP developers

Re: [PHP-DEV] __repr() magic method (was Re: Proposal: short_var_export($value, bool $return=false, int $flags=0))

2021-01-20 Thread Marco Pivetta
On Wed, Jan 20, 2021 at 5:27 PM Ben Ramsey wrote: > Taking this to a new thread so I don’t derail the `short_var_export()` > thread. > > Dik, I like this addition, but I think the name “repr” might be confusing > to PHP developers who aren’t familiar with Python idioms. PHP function > names and

[PHP-DEV] __repr() magic method (was Re: Proposal: short_var_export($value, bool $return=false, int $flags=0))

2021-01-20 Thread Ben Ramsey
> On Jan 20, 2021, at 09:43, Dik Takken wrote: > > On 19-01-2021 16:12, tyson andre wrote: >> 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