Live data from Hacker News

PHP 5.5.8 Released

php.net

41–50 of 66 posts

Re: PHP 5.5.8 Released

#41
post #32
post #13

PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago. Is there any good book or other resource which describes modern PHP with best practices, parts to avoid, etc?

>> PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. I believe that programmers ability to write poor code is quite language agnostic.

From my personal experience, I disagree. I have seen a greater percentage of poor codes in languages that a lower entry barrier than those that require more initial investment. Most poor coders I've met are lazy coders (in the wrong side of it).

Re: PHP 5.5.8 Released

#42
post #38

Ruby 2.1.0 is out.

Grayed out means down voted, right? But why?! First good comment on the thread: no bitching, no need to click the link to find ~20 fixes, here's the alternative, never look back. Period.

As someone who's professional life generally revolves around Ruby, and in the past has revolved around Python and PHP.. it's a stupid comment. PHP is a perfectly capable language of producing high quality products.. and that is what actually matters.

Re: PHP 5.5.8 Released

#43

Since anything PHP-related on HN is bound to spur the usual PHP hate, here's something that might confuse the haters: PHP is actually faster than Go in many cases (according to http://www.techempower.com/benchmarks/#section=data-r8&hw=i7... ).

I do not consider myself an hater (I have used both php and go). I would say the results on that page are consequence of php having more mature database drivers (written in C) than go, that is still in its infancy. If you look at for e.g. Plaintext it is more in line with what one would expect from a compiled language versus an interpreted one.

Re: PHP 5.5.8 Released

#44
post #32
post #13

PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago. Is there any good book or other resource which describes modern PHP with best practices, parts to avoid, etc?

>> PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. I believe that programmers ability to write poor code is quite language agnostic.

I'd agree that PHP really isn't that bad (at least, from the perspective of someone who started writing web apps using C, Perl, and Java). Some missing or clunky meta/higher level features feel limiting to me, but more or less it seems to be as successful as its other dynamic scripting siblings when it comes to tools devs have used to ship.

The big problem with PHP is that it grew to popularity as it grew into a turing-complete templating language, and the major paradigm for it was more or less the idea that documents are programs. That actually encouraged mixture of logic and presentation concerns.

There are some other warts possibly worth railing at, but that's really the main place it gets its probably deserved reputation for having more spaghetti code, even though pros working in have long since moved on from that paradigm.

FWIW, this is also its strength: it's a very short distance with a gentle curve from authoring documents to authoring dynamic documents. I don't think anything else matches it.

Of course, the curve from there to a larger application, that can be a different story, depending on what kind of guidance one has (and most likely, without guidance, ontology will recapitulate philology, as they say).

Re: PHP 5.5.8 Released

#45
post #13

PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago. Is there any good book or other resource which describes modern PHP with best practices, parts to avoid, etc?

If I were you, and I wanted to see how elegant and great PHP can be, I would just go check out and learn Laravel 4.

I recently moved from CodeIgniter 2.x over to Laravel, and it was like breathing fresh new air at the top of a mountain. Everything is cutting edge, organized, and fun to code again. Sounds like hyperbole, but for real it reinvigorated my programming efforts.

Check it out here: http://laravel.com/

Re: PHP 5.5.8 Released

#47
post #45
post #13

PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago. Is there any good book or other resource which describes modern PHP with best practices, parts to avoid, etc?

If I were you, and I wanted to see how elegant and great PHP can be, I would just go check out and learn Laravel 4. I recently moved from CodeIgniter 2.x over to Laravel, and it was like breathing fresh new air at the top of a mountain. Everything is cutting edge, organized, and fun to code again. Sounds like hyperbole, but for real it reinvigorated my programming efforts. Check it out here: http://laravel.com/

And if you're going the Laravel route (which I certainly recommend, I've used it a couple times here and there when PHP has been required), check out CodeBright by Dayle Rees (a Laravel core team member) on Leanpub (https://leanpub.com/codebright). It was the manual I needed to get going.

Re: PHP 5.5.8 Released

#48
post #13

PHP has a reputation as a language that makes dead easy to write very ugly sphagetti code. As far as I learned a lot has chaned since last time I was using PHP - something like 5 years ago. Is there any good book or other resource which describes modern PHP with best practices, parts to avoid, etc?

Learn how to use the Symfony Framework:

http://symfony.com/

That is modern PHP done right.

Re: PHP 5.5.8 Released

#49
post #9
post #3

How does this compare to the latest HHVM?

It looks like this is mostly bug fixes. So I imagine this will have little impact on HHVM

Also, I believe HHVM is looking for 5.4 parity, also I would imagine that some of these bug fixes would not need to be looked into since it's two entirely separate projects.

Re: PHP 5.5.8 Released

#50

Aaaaaaand cue 250+ comments complaining about PHP, mostly centered around issues that were much bigger in 2009 than they are in 2014...

If most critique centers around issues that have been solved, that doesn't imply that there aren't critique that hasn't been solved. I honestly can't think of a single good reason to PHP these days. Node.js is certainly better, so is Django. The only benefit of PHP is that you can create a small script quickly on a host that you don't control. Therefore PHP shouldn't be considered for anything serious.
Post reply on HN