Live data from Hacker News

In many ways PHP is just now starting to come into its own

gist.github.com

21–30 of 133 posts

Re: In many ways PHP is just now starting to come into its own

#21
post #3

"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby." This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc). PHP is still the onl…

I opened the comments section to make a similar post. From the OP:

> The days when programmers opened up a blank file, named it index.php, and said, "time to start coding!" are over.

That is actually the only thing better about php than... well, pretty much any other option.

As for the rest of it... "lipstick on a pig"

Re: In many ways PHP is just now starting to come into its own

#22
I spent a couple of years with php recently. I was using Codeigniter as a framework. Php frameworks now compete with the rest and the language is as complete as most others. Setup couldn't be much easier and it's probably the most ubiquitous web language.

It does, however, have some bad behaviours of out the box that promote bad app development. I was startled at the default error handling when I had to start using it again recently. It was a fight to get it to display errors - and stop executing - whenever something was wrong in the code. This is madness. If your code is broken, it should notify you. I tried doing the same thing to existing well known php apps. They wouldn't even load. That, for me, is the core issue. You have an ecosystem devoloped by people who seemingly don't even care if there are bugs in their code.

Re: In many ways PHP is just now starting to come into its own

#23
I wish people would stop trying to defend PHP against "the haters" - firstly because no amount of reasoned argument is going to change the views of fundamentalists, and secondly because they are a minority group whose opinions are unlikely to inhibit the rise of the PHP ecosystem.

Re: In many ways PHP is just now starting to come into its own

#24

I'm as cutting edge in the PHP community as any is going to be (having used the latest betas & community-best-practices since 2004). I still have serious doubts about PHP, and always insist to new developers should learn a (ruby/python/... clojure/...) too. The main problem with PHP is the language itself. There is no paradigm it does well. If you're into class-ical OO, then the language's type system is a joke (esp.…

Java->queuing->Just put sleep.. why so so hard ? with the lack of co/contra-variance in type hinting Write proper code oop and comment->Most latest ide can see it. Now php much okay with namespace.. only what i really wanted now is partial class.. Other no need..

Re: In many ways PHP is just now starting to come into its own

#25
post #3

"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby." This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc). PHP is still the onl…

> PHP is still the only language that assumes HTML output by default.

For me, that's not a feature, it's an oddity that I have to work around. I guess it's a feature if you're using PHP as the HTML template language it was designed to be, but I suspect that's a minority use case these days.

Re: In many ways PHP is just now starting to come into its own

#26
post #3

"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby." This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc). PHP is still the onl…

I prefer rails specifically because the "hosting/running situation" for Rails is so FAR superior to that of PHP.

$ git push heroku master

...done.

Re: In many ways PHP is just now starting to come into its own

#27
post #25
post #3

"Jeff Atwood has stated publicly that one of his ulterior motives with the Discourse project is get people to stop using PHP and start using Ruby." This just won't ever happen. The people that wanted to drop PHP for something else (Ruby, etc) largely did so years ago. The hosting/running situation for PHP is just too basic and easy for people to get in to vs having to 'run a server' (Rails, etc). PHP is still the onl…

> PHP is still the only language that assumes HTML output by default. For me, that's not a feature, it's an oddity that I have to work around. I guess it's a feature if you're using PHP as the HTML template language it was designed to be, but I suspect that's a minority use case these days.

But that's what it was designed for..

Re: In many ways PHP is just now starting to come into its own

#28

Earlier quoted context omitted.

They are doing it, though. For example they have now deprecated the dreaded mysql_, pgsql_ interfaces (including mysql_now_escape_the_string_for_real() and the like ;) for accessing the database in favor of PDO. They will be removed in the future. Lots of projects still use those. Just 1 example of PHP dropping backwards compatibility. It's not quite so bad as you make it out to be.

Deprecation of those awful vendor specific DB extensions is a good start, no doubt. But those are library functions, rather than language features. Another thing to consider is that PHP developers have a track record of deprecating certain functionality, then a few releases later changing their minds and no longer deprecating it. Some examples of this include is_a, and var in property declarations. Given how it's sti…

Look at how slow Python 3 adoption has been. I don't think completely breaking backwards compatibility is a quick thing. The Python folks expected 5 years for Python 3 to become the default version because of the dramatic changes.

http://programmers.stackexchange.com/questions/63859/why-do-...

Re: In many ways PHP is just now starting to come into its own

#29

Earlier quoted context omitted.

They are doing it, though. For example they have now deprecated the dreaded mysql_, pgsql_ interfaces (including mysql_now_escape_the_string_for_real() and the like ;) for accessing the database in favor of PDO. They will be removed in the future. Lots of projects still use those. Just 1 example of PHP dropping backwards compatibility. It's not quite so bad as you make it out to be.

Deprecation of those awful vendor specific DB extensions is a good start, no doubt. But those are library functions, rather than language features. Another thing to consider is that PHP developers have a track record of deprecating certain functionality, then a few releases later changing their minds and no longer deprecating it. Some examples of this include is_a, and var in property declarations. Given how it's sti…

I agree about the need to really strip out the bad stuff, not just deprecating.

Wrt removal of language features: They seem to be in the process of cleaning up some there as well. For example in 5.4 they removed safe mode, register globals, magic quotes (and those were really awful). see: http://php.net/releases/5_4_0.php

I also agree that there is a lot of bad stuff still around.

Re: In many ways PHP is just now starting to come into its own

#30

I'm as cutting edge in the PHP community as any is going to be (having used the latest betas & community-best-practices since 2004). I still have serious doubts about PHP, and always insist to new developers should learn a (ruby/python/... clojure/...) too. The main problem with PHP is the language itself. There is no paradigm it does well. If you're into class-ical OO, then the language's type system is a joke (esp.…

Plus there is PHP's aesthetics. I can't help but see all PHP code visually unpleasing. Programming isn't just a technical task. It's also an art like writing novels. I'm not satisfied when the code I produce doesn't look pretty, independently from the algorithm. In the article here, the Ruby code looks much cleaner to me than the PHP version, even though it's technically the same. Aesthetics is the main reason why I switched from PHP (that I learned in class) to C# (that I learned on my own).
Post reply on HN