Re: Re: RE : [PHP-DEV] Return type hinting patch

From: Date: Wed, 30 Apr 2008 16:43:20 +0000
Subject: Re: Re: RE : [PHP-DEV] Return type hinting patch
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-37369@lists.php.net to get a copy of this message
You have added is_int, is_numeric, and === operator. I've been reading your posts and you should really stop confusing using that argument. Truth is, types are relevant. $foo = 1; $bar = '1'; if($foo === $bar) { echo "I am never echo'ed"; } Until you make $foo === $bar, you should really stop telling everyone how strict param/return types have no place in php. -Chris On Wed, Apr 30, 2008 at 9:36 AM, Stanislav Malyshev <stas@zend.com> wrote: > Hi! > > Right, return type hinting is useless in such cases, but it is > > interesting when we check whether a method is compatible with an > > implemented interface or an extended/abstract class. In this case, > > > > When exactly you check that? PHP has no static type checking, and in > runtime actual values, not function definitions, are checked. If you mean > checking by tools like IDE, phpdoc is more than enough for that. > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#37369) next »