Re: Array syntax []

From: Date: Fri, 11 Jan 2008 11:12:25 +0000
Subject: Re: Array syntax []
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-34693@lists.php.net to get a copy of this message
Johannes Schlüter writes:
The last line is exactly why I won't like such a syntax. Just consider the a bit worse call like foo([1, $a[2]]); I might even construct worse examples,
is this a good-readable code? foo (array('a'=2,'b'=>array('x'=>5,'c'=>array(1,4,2)),'n'=>$bar[4])); what difference in? foo(['a'=2,'b'=>['x'=>5,'c'=>[1,4,2]],'n'=>$bar[4]]); I think - it will be good readable in large projects too. Please look to code of ExtJS JavaScript Library - this syntax native in javascript and it very usable (excuse me for my English)

« previous php.internals (#34693) next »