Re: Deprecation ideas for PHP 8
| From: | Claude Pache | Date: | Wed, 23 Jan 2019 08:19:20 +0000 |
| Subject: | Re: Deprecation ideas for PHP 8 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103790@lists.php.net to get a copy of this message | ||
> - settype
AFAICS, there is no easy replacement for settype(). If the second argument is a string literal, you
can use type coercion + assignment at the price of duplicating the occurrence of the first argument.
If the second argument is not known at compile time, you have to resort to a switch statement or
something similar.
> - deprecate array function creation (array())
Here, I was really wondering why you didn’t mention function-like destructuring as well (list()).
(Not that I think it is a good idea.)
—Claude