Re: RFC - Array slice syntactic sugar

From: Date: Fri, 20 Mar 2015 21:30:37 +0000
Subject: Re: RFC - Array slice syntactic sugar
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-85337@lists.php.net to get a copy of this message
Hi! > It would give different results, for a reason. There is currently no way > to get an array item by positional index, whilst preserving the keys. I imagine having such way may be useful. However, reusing array access syntax for that does not look like a good idea, since it would look like existing array syntax but work completely different. Why not use array_slice for it? -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#85337) next »