Re: Type hinting

From: Date: Mon, 24 May 2010 17:15:57 +0000
Subject: Re: Type hinting
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-48436@lists.php.net to get a copy of this message
Hi!
In case we remove 'Array->scalar' and others everywhere, #3 would be the same as #2. I'm for that.
AFAIK parse_parameters already rejects Array->scalar, so if we can tweak it so that it would make sense for all cases, even better. As for implicit/explicit casts, I'm not sure - it might make sense for explicit cast to behave a bit differently, but maybe that's not worth it. So if we can find a set of rules that work for all cases, such as: implicit casts ($a+$b, "$a", etc.), explicit casts ((int)$a), internal function and user-space functions - it'd be excellent, I'd be all for it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#48436) next »