Hello all,

The array() syntax to me screams function call, something that, in my
mind, did not intuitively mean assign an array to a plain ole
variable.

If I can:

$var1 = 5;

why would I need a special function call "array()" to create and
assign an array?

An array is just like any other variable right?

// Seems more natural to me.
$array1 = ['a' => 1, 'b' => 2];

// than a function call...
$array2 = array("a" => 1, "b" => 2);

That was one of the little things that I remember being wierd about
PHP when I first started coding in it.


Cheers,
Antonio



On Jan 10, 2008 8:20 PM, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
> And my stance hasn't changed either:
>
> http://marc.info/?l=php-internals&m=117060700805108&w=2
>
>
> Andi Gutmans wrote:
> > 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
> >
> >
> >
> >
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Antonio Touriño
Brilliance Tech - Consultoría sobre Estrategia Web
Cel: +507.66716999

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to