Re: Type hinting

From: Date: Sat, 22 May 2010 16:30:15 +0000
Subject: Re: Type hinting
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-48393@lists.php.net to get a copy of this message
On 22 May 2010 17:04, Zeev Suraski <zeev@zend.com> wrote: > As one of the key people who designed PHP's type system I consider strict > type checks completely alien to and counterintuitive in PHP and am therefore > pushing to implement 'weak' typing instead, in a way that's consistent and > familiar to users. I would normally refrain from posting on the dev list but as a "user" I feel the need to make sure that my position isn't misrepresented, so here it is. As you wrote, you worked on PHP's _type system_ which is dynamic, really cool, juggles strings with ints and what not. However, the topic here is the _type hinting system_. As far as I know, there's no "weak" type hinting; if a method signature hints for an array and is given an integer, it throws a catchable fatal error. Therefore, as a user, what I am familiar to is a strict _type hinting system_. Anything else would feel inconsistent to me. Thanks for reading. JD

« previous php.internals (#48393) next »