Re: Array Symbol Suggestion

From: Date: Wed, 12 Jan 2011 20:37:52 +0000
Subject: Re: Array Symbol Suggestion
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310712@lists.php.net to get a copy of this message
On Wed, Jan 12, 2011 at 14:45, <sono-io@fannullone.us> wrote: > I'd like to make a suggestion for a change, or possibly an addition, to the PHP language. > > I'm learning PHP and have been very excited with what it can do in relation to HTML.  But > when I got to the part about arrays, I was disappointed to see that they are designated with a $ the > same as other variables.  I was learning Perl before I switched, and it uses the @ sign to > designate an array.  That makes it a lot simpler to see at a glance what is an array and what > isn't - at least for beginners like me. > > Has there been any talk of adopting the @ sign for arrays in PHP?  Or is that symbol used for > something else that I haven't read about yet? The @ is an error control operator, used to buffer the output and store it in a variable - $php_errormsg. There's no way that would be changed to become an array designator (though that doesn't mean your idea itself is a bad one). > What is the proper channel for making suggestions like this? Usually on the Internals mailing list (internals@lists.php.net) or as a Feature Request in the bug tracker (http://bugs.php.net/). -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/

« previous php.general (#310712) next »