Re: new extension: strict

From: Date: Tue, 18 Nov 2014 06:09:27 +0000
Subject: Re: new extension: strict
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-12415@lists.php.net to get a copy of this message
On Mon, 2014-11-17 at 21:42 -0800, Stanislav Malyshev wrote: > Hi! > > > This extension introduces support for strict scalar parameter type > > hints from 5.4 up to 7, if support is introduced in 7, I shall remove it > > from the extension, thereby providing a good approximation of > > compatibility. > > I think this is a nice idea. If it catches on widely, we can bring it > into core, if it finds limited appeal, it still would be there for those > that need it. Thanks, Joe, for doing it! > > > The only real limitation of the extension is that you cannot use > > default values in declarations, because the parser doesn't understand > > Class $name = 1, for example. > > Does = null work? If it does, then it can be a viable workaround. Yes, a > bit of boilerplate code would be required, but better than nothing. Morning Stas, I didn't overload RECV_INIT, = null would work, but integer $int = null is yucky. I'll have a think about that ... I think if it catches on we should implement the feature in core for 7 (removing limitation), if this happens the extension becomes a good approximation of compatibility for 5. Cheers Joe

« previous php.pecl.dev (#12415) next »