Re: Re: Flexible type hinting

From: Date: Thu, 02 Jul 2009 21:09:43 +0000
Subject: Re: Re: Flexible type hinting
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-44672@lists.php.net to get a copy of this message
Ford, Mike wrote:
    function func(int $i)
for strict type checking, and
    function func((int)$i)
for coercion aka casting (although now I've seen it written down I'm not so sure! ;).
Just want to throw my 2 cents in. Big +1 for this syntax I think with the addition of this and __cast() for objects, PHP's OO will be very flexible and can build great Frameworks, ORM's, etc.

« previous php.internals (#44672) next »