Re: substr/array_slice in []

From: Date: Mon, 08 Oct 2007 05:37:53 +0000
Subject: Re: substr/array_slice in []
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-32696@lists.php.net to get a copy of this message
On 08.10.2007 03:44, Rasmus Lerdorf wrote: >> $result = $pdo->fetchAll(PDO::FETCH_ASSOC); >> $result = array_combine(result[]['my_id'], $result); >> >> If I prepared a patch that made this possible, would it be considered >> for inclusion? Is there any issues I've overlooked or other >> objections? > > Yes, I object on the basis that I have no idea what that syntax should > do by looking at it. The auto-incrementing [] array syntax has always > been a write-only construct. Auto-incrementing on a read doesn't make > any sense which means you are overloading that syntax to mean something > completely different. This syntax makes no sense in write context to me either. -1 -- Wbr, Antony Dovgal

« previous php.internals (#32696) next »