Re: [PATCH] Delegate type hint/checks to alternative locations (Re: [PHP-DEV] back to 5.4 alpha)

From: Date: Mon, 01 Nov 2010 23:16:56 +0000
Subject: Re: [PATCH] Delegate type hint/checks to alternative locations (Re: [PHP-DEV] back to 5.4 alpha)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-50071@lists.php.net to get a copy of this message
Hi, 2010/10/19 Derick Rethans <derick@php.net> > Hi! > > On Sun, 5 Sep 2010, Derick Rethans wrote: > > > I've spend some more time on this, and have attached a new patch that: > > > > - Removes the strict type verification, changing it back into typehints > > only. > > - Keeps the current syntax so that typehints create structures in the > > function entries. > > - Keeps the reflection API for the syntax, so that you can query the > > typehints. > > - Changed the API so that the verification function can also modify the > > variables. > > I've just committed that patch, the implements the 3 first elements from > this list. I've also updated my little extension to behave in the same > way as it did with the previous patch: > There is a BC in the changes, I don't know if it is expected for the next version, at least it is very strange. <?php class int { } function f(int $a) { } f(new int); // no error f('foo'); // no error f(null); // no error ?> -- Regards, Felipe Pena

« previous php.internals (#50071) next »