Earlier quoted context omitted.
Just because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a seco…
>People can and do misuse things all the bloody time, and the more you enable them to do that This is an excuse for educating people, not an excuse for kneecapping the majority due to an ignorant minority. This is the kind of thinking that plagues the GNOME3 devs and gets ridiculed so often around here. The user is an idiot so let's remove features. I don't see many people harshing on Rails for the inclusion of WEBri…
The new PHP
171–180 of 203 posts
Re: The new PHP
#172I'm a Drupal dev by trade, and I consider any day that I don't have to get into the guts of Drupal and write PHP a good day. Recently, however, I had to get in there. This was a few days after I upgraded my local environment from 5.3 to 5.5. I've been writing Ruby for fun for a while now, and I love how I almost never have to look API related questions up, at least in comparison to PHP API questions. So I just wrote…
Re: The new PHP
#173Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…
Frameworks are not as important as they once were with the widespread use of composer and componentized architecture
Re: The new PHP
#174The new libs'n'tools are nice; good to see them showcased. But the bottom line for any developer should be to avoid it --like Perl-- for any from-scratch code. This is a legacy language now.
Re: The new PHP
#175Earlier quoted context omitted.
> PHP's "closures" require you to write down the free variables in an enclosed function and tell PHP that they exist Can you give an example? I googled "closure conversion" but didn't understand.
In order to use variables from the scope that the anonymous function came from, you have to explicitly import them into the anonymous function with the use[1] block: public function getTotal($tax) { $total = 0.00; $callback = function ($quantity, $product) use ($tax, &$total) { $pricePerItem = constant(__CLASS__ . "::PRICE_" . strtoupper($product)); $total += ($pricePerItem * $quantity) * ($tax + 1.0); }; array_walk(…
Re: The new PHP
#176Regarding Zend Engine, does anyone have a link for just how much 'less'?
Re: The new PHP
#177Earlier quoted context omitted.
The very first programming book I bought was "PHP6 and MySQL5" by Larry Ullman. I bought that one specifically because I had another job (career, really) and I knew it was going to take a while before I really got into programming and I didn't want to buy a book that was going to be out of date in 2 years. That book is now 6 years old, out of date, and PHP6 is still not released. Maybe 6 is just an unlucky number wit…
Literally bought the same book by Larry Ulman.
Re: The new PHP
#178I'm a Drupal dev by trade, and I consider any day that I don't have to get into the guts of Drupal and write PHP a good day. Recently, however, I had to get in there. This was a few days after I upgraded my local environment from 5.3 to 5.5. I've been writing Ruby for fun for a while now, and I love how I almost never have to look API related questions up, at least in comparison to PHP API questions. So I just wrote…
I did the same job for 6 months. I really like PHP nowadays, but Christ Drupal core is a mess (or was, that was v6).
Re: The new PHP
#179Earlier quoted context omitted.
> This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off. You're incorrectly characterizing the argument: it's actually like saying Home Depot shouldn't sell power tools without safety guards, fuses, emergency shutoffs, SawStop, etc. PHP has a number of misfeatures which make it extremely easy for all but the most vigilan…
Here's all you really need to know with PHP, ask a PHP developer how to test for equality. Maybe how you test for equality shouldn't depend on an ini file... just sayin... Perhaps testing for equality doesn't need a 3 page answer... in most languages it's a pretty straightforward answer... primitive types use == and objects use either isEquals or operator overloading.
Re: The new PHP
#180I often wonder why a PHP killer hasn't yet been created. I don't mean a Ruby or another vastly different language. I mean a language similar in approach to PHP, but with the gotcha's removed, some order and consistency introduced into the API, and a few changes to the defaults. Open source, free, and on all major OS's.