Re: SUMMARY: Array syntax

From: Date: Sat, 12 Jan 2008 01:02:05 +0000
Subject: Re: SUMMARY: Array syntax
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-34759@lists.php.net to get a copy of this message
On Jan 12, 2008 1:54 AM, Jeff Griffiths <jeffg@activestate.com> wrote: > > if (1) { > > $a = [ > > [ > > ['a' => 1, 3], > > ($b = 3), > > ] > > ]; > > } else { > > $a = [ > > [ > > ['b' => 1, 3] > > ] > > ]; > > } > > I agree, that's a bit nasty. =) Like a string full of variables, arrays and objects can be unreadable :) But I can't stop thinking about code like: [ [-1.0, 0.0, +1.0], [-2.0, 0.0 , +2.0], [-1.0, 0.0, +1.0]] and I will use this new syntax only with such cases like this one :) (variables in string are nice, when used with moderation/caution) -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#34759) next »