Re: [RFC] Scalar Type Hinting With Casts (re-opening)
| From: | Derick Rethans | Date: | Mon, 14 Jul 2014 14:38:25 +0000 |
| Subject: | Re: [RFC] Scalar Type Hinting With Casts (re-opening) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75465@lists.php.net to get a copy of this message | ||
On Sun, 13 Jul 2014, Andrea Faulds wrote:
> The RFC is here:
> https://wiki.php.net/rfc/scalar_type_hinting_with_cast
I am worried about this big casting conversion matrix. New rules should
not be invented, and the following should *always* be equivalent:
function foo(typehint $var)
vs:
function foo($var) {
$var = typehint $var;
In general, I am not in favour of casting typehints, as it would be a
different behaviour from the hard-check typehints that we already have
for classes and arrays.
regards,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine