Re: Re: Short syntax for array literals [...]

From: Date: Wed, 28 May 2008 09:58:28 +0000
Subject: Re: Re: Short syntax for array literals [...]
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-37958@lists.php.net to get a copy of this message
Hello again, renderSomething(array('exclude' => array('a', 'b', 'c'), 'include' => array('d', 'e', 'f'))); vs: renderSomething(['exclude' => ['a', 'b', 'c'], 'include' => ['d', 'e', 'f']]); Your version is more readable but try this one: renderSomething( array( 'exclude' => array('a', 'b', 'c'), 'include' => array('d', 'e', 'f') ) ); Or even break array('a','b','c') and array('d', 'e', 'f') in more lines. This will become far more readable, with proper names and values. This is the real life case for me. Regards, Dimitar

« previous php.internals (#37958) next »