News for hackers. Stuff that matters.
Re:Short array syntax finally in PHP 5.4 by Tharkun on Sunday July 24, 2011 @03:08PM (#2800078)
Still strikes me as a useless bit of syntactic sugar. Is it really that much work to write array('foo' => 'bar')? As far as I can tell, writing ['foo' => 'bar'] isn't that much shorter in the first place.

sigh Can the PHP devs focus on the real problems now? cough Unicode anyone? Ridiculously inconsistent naming of string and array functions? The woefully incomplete and useless STL? The lack of OO in arrays and strings?

Re:Short array syntax finally in PHP 5.4 by DanHulton on Sunday July 24, 2011 @08:22PM (#2800771)
This has been requested by the community for a while now. Synatctic sugar? Definitely. But it's also more.

An actual patch has been submitted for this before, and rejected by the PHP high muck-a-mucks, even though the community desperately wanted it, and the work was already done.

The fact that they finally gave in and included it means not only do we get a nice bit of sugar to sweeten up our programs, but also that maybe the community CAN steer the devs towards issues they care about.

Time will tell.

Re:Short array syntax finally in PHP 5.4 by mmuro on Sunday July 24, 2011 @03:28PM (#2800138)
Agreed. I don't see how this solves a real problem other than just another way to write the code, which, I guess, is the whole point of this update.
Re:Short array syntax finally in PHP 5.4 by ars on Monday July 25, 2011 @03:52AM (#2801756)
> cough Unicode anyone?

Why are you coughing about unicode? It works just fine as long as you use utf-8, and there is little reason not to.

Re:Short array syntax finally in PHP 5.4 by jrockway on Monday July 25, 2011 @05:44AM (#2801959)
What he meant to say was, "I wish PHP has a 'string' type instead of octet buffers".
Re:Short array syntax finally in PHP 5.4 by ars on Monday July 25, 2011 @06:04AM (#2802010)
Why?
Re:Short array syntax finally in PHP 5.4 by MostAwesomeDude on Sunday July 24, 2011 @03:19PM (#2800108)
Hey, I've been complaining about PHP's lack of Unicode support forever. Every time I do, though, an apologist comes out of the woodwork to tell me about the mb_*() functions. Apparently the PHP community is quite comfortable not caring about non-ASCII characters.
Re:Short array syntax finally in PHP 5.4 by nosnih on Monday July 25, 2011 @11:43AM (#2803039)
http://www.slideshare.net/andreizm/the-good-the-bad-and-the-...

Andrei Zmievski has been giving this presentation on what happened to Unicode in PHP. A huge amount of work went into making it happen but it eventually could not continue due to several reasons, including design decisions, lack of contributors & interest in the project.

Re:Short array syntax finally in PHP 5.4 by cheald on Sunday July 24, 2011 @04:05PM (#2800206)
I brought down a production site by innocently changing some string ops to mb_* string ops. It turns out that they're so slow as to be useless.
Re:Short array syntax finally in PHP 5.4 by ars on Monday July 25, 2011 @03:51AM (#2801755)
I use unicode all the time, and I have not had any trouble. All the php functions are binary safe. If you use utf-8 you won't have any touble.

Do you have actual real issues, or do you just like to complain about things you heard other people say?