Re: Array syntax []

From: Date: Fri, 11 Jan 2008 09:40:28 +0000
Subject: Re: Array syntax []
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-34689@lists.php.net to get a copy of this message
I use PHP since version 5.0 release I'd like use this syntax $a = [ 2,6,9 ]; $b = ['a'=>1 , 'v'=>'string']; foo(['bar'=>2, 'test'=null]); Andi Gutmans пишет:
Andi 2003: http://www.mail-archive.com/internals@lists.php.net/msg03896.html Andi's brain evolves 2007: http://marc.info/?l=php-internals&m=117057393530217&w=2 And today I'm still +1. I really think by looking at some of the examples I worked through with my original posting in February and some of the recent comments the majority of people find [] more readable. It's cleaner, shorter and comes natural to most people. It's not about saving 5 characters as I type quickly, I really feel it's more readable and natural. We're kind of odd as a language in that sense i.e. array(...) I think almost everyone here agreed it'd benefit them and maybe the ones who don't would go through the same process I went through once they get used to it J Andi


« previous php.internals (#34689) next »