Re: Introducing "Array Of" RFC

From: Date: Tue, 21 Jan 2014 05:37:43 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-71376@lists.php.net to get a copy of this message
Hi Phil, On Thu, Jan 16, 2014 at 2:17 AM, Philip Sturgeon <pjsturgeon@gmail.com>wrote: > Hey, > > This is my first RFC so give me a little leeway if I get things wrong. > > https://wiki.php.net/rfc/arrayof > > The implementation has been written by Joe Watkins, and I will be > handling the RFC process for him. > > It is aimed at PHP 5.6, and so far the release managers seem to be ok > with the idea of this potentially being merged after the alpha > release, so this should not be considered an issue. > > Everything is open for discussion, especially the current error > messages. They are not perfect, so let us know if you have better > ideas. > First of all, congrats on getting your first RFC out; despite the issues brought up so far, the idea itself is certainly interesting :) I was curious about whether it would be possible to perform this type check outside of the function context as well? For example: if ($array instanceof Foo[]) { ... } From what I could tell, this is not part of the RFC. As an aside, for the fun of it, I thought of this arcane casting syntax: $arr = (int[])$arr; > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Tjerk

« previous php.internals (#71376) next »