Live data from Hacker News

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

gist.github.com

31–40 of 133 posts

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

#31
post #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 i…

Hm, might be your framework of choice then ? Symfony2 for example shows complete Stack Traces of Exceptions and has a very detailed debug panel

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

#33
post #2

While it's certainly true that PHP is better than it was 7 years ago, that is primarily in the ecosystem and not the language. The language remains as bad as it was 7 years ago, and they seem to be woefully unwilling to actually fix it.

Not so fast. PHP evolved a lot as a language, maybe it will never be enough to fix its ancestry, but namespaces, closures, generators, ~~typed~~ expressions (you can finally slice a function call returning an array without unnecessary variables) and some literals. It's still not 1958-worthy to me, but they do evolve.

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

#34
I'd say one of PHP's biggest flaws is that it's just too easy to get started. One might argue that's not a flaw, but it is - it allows junior developers to dig right into the code without knowing the basics of how web works, in turn producing extreme technical debt and waste years on bad practices.

I've been there too, and I must say I agree with Jeff on this matter - if I was forced to use Ruby instead of PHP when starting my career, I'd be a better developer today. But I'm catching up :)

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

#36
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.

you know you can do the same with php, right? $ git push fortrabbit master ...done

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

#37
post #10

Ive been working with the Symfony PHP Framework since 2007 and to me it has transformed PHP completely. Many people left PHP when Rails came along and never looked at it again, and the biggest misconception is that many of those still look at PHP like it was in 2005/2006. But alot has happened! Symfony2, my framework of choice, has a very mature and solid architecture and offers anything you could imagine from other…

symfony2 is a beautiful framework.

I have been using symfony1 since january 1st, 2008 and then migrated across to 2 for other projects.

symfony2 is a solid framework for php, and very quick to get started and maintain. With composer it is even easier, and git repositories are pretty small as well.

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

#38
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.

Not really. That only works with one host, whereas PHP works with just about any 5 dollar/month host in the world.

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

#39
I'm just wondering, why should it take 15 years to get operators [] and -> to work with any subexpression (and to my knowledge it's still not 100% there)? Shouldn't it be implied and kind of automatic in a programming language?

Or why should it take 15 years to adopt [...] as an array constructor in a language where arrays are one of the central data structures?

Here is opinion No. 823,664,783 about PHP from a long time PHP developer: it sucks (for me) because somehow I don't have a sense that the language itself is in good hands. I'm not sure if, say, they introduce a new basic operator in expressions and that it will not take another 15 years until it makes full programming sense.

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

#40

Earlier quoted context omitted.

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-...

Not every Python user uses Django, you know.

I've worked on a number of software systems at several different organizations that have very effectively used Python 3 for years now. I think that Python 3 has been adopted perfectly fine by many other people and organizations, too.

We're just not overly vocal about using it, because it has worked for us with so little pain and so little effort in many cases. It really wasn't much different going from 2.7 to 3.0 or 3.1 than it was going from 2.6 to 2.7, for example.

Post reply on HN