Live data from Hacker News

PHP needs a vision

news.php.net

121–130 of 182 posts

Re: PHP needs a vision

#121

Earlier quoted context omitted.

Or facebook. http://blog.facebook.com/blog.php?post=2356432130

Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles down to C++. 1: http://en.wikipedia.org/wiki/HipHop_for_PHP

Actually, facebook is moving to a JIT model and getting better performance out of it than the crosscompiled code.

http://arstechnica.com/business/2011/12/facebook-looks-to-fi...

Re: PHP needs a vision

#122
post #107

Earlier quoted context omitted.

Are the sort of people writing straight PHP the sort of people who would be using rails? Try a PHP framework like Laravel and then compare that to Rails.

I took a look at that, it appears that you unzip the framework and then start modifying it directly. After you "upload it to your webserver". Deployment? Source Control? No, not in PHP, you just modify shit right on the webserver. I'm sure this process makes upgrading painless, just unzip the framework and... wait... all your changes just got overwritten. This kind of crap is exactly why everyone with a clue laughs a…

Nothing stops you from using source control with PHP. Nothing stops you from working locally and then pushing changes up to the server. You make no sense.

Re: PHP needs a vision

#123
PHP has never been about the "language" as far as I see (hell, it was a templating system "evolved into a language"!), but about the platform (language + libraries + server + tools and what this meant for deployment and scaling).

PHP (the LAMP "web development platform" that happens to include the PHP language) got so popular because:

1. ease of deployment

2. ease of scaling

3! KISS by keeping the layers of abstraction few and thin (at first it was just a thin "templating" layer to reach the functions in C libs)

Only (3) has anything to do with the language itself, and is the only one the could translate to a language "vision". If PHP were to remain true to itself and its advantages that made it what it is today, their vision can only be to keep the layer of abstractions few and thin and this can only mean 2 and 3 from the OPs rant: procedural, functional and multi-paradigm enough to support OO (I know, people don't write functional code in PHP but I think they should - it really helps with KISS once you go over the "procedural brain rot").

P.S. As a developer I hate PHP (viscerally, passionately, religiously and in all other ways imaginable)! As a manager I absolutely love the "fail cheap, fail fast" philosophy and PHP is one of the few languages that enables this "flow".

Re: PHP needs a vision

#124
post #98

Earlier quoted context omitted.

have you ever even tried Symfony? i think a lot of the debate is about how people are starting to get fed up with the Java/c#-like direction PHP is heading. symfony is not like rails, no where close to it. not sure exactly where they started taking the wrong turn but it's really going the opposite direction from other languages like node/python/ruby where simplicity is at it's core.

You nailed it. Symfony == Poor man's Java. Which is ironic because even Java has started to move to move to something more sensible with frameworks like Grails or Play.

You may want to take a look at Silex, which is based on Symfony2 components.

http://silex.sensiolabs.org/

Re: PHP needs a vision

#127
Whenever this issue pops up I always imagine Fabien Potencier (while he's no dictator, he has a very clear path) taking over the php source and change it according to his vision. Then I imagine going back to the first php script I ever wrote and how if I would have been able to create it with the changes. I can honestly say I can imagine it would have been a lot harder to do and there is a big chance that I would have given up because I can imagine him going into full OO mode. Don't think I don't like Fabien, for me personally his php version would probably be a lot better, but also a lot harder for new users.

This is one of the best things of php: it's easy enough for new developers and you can grow into the OO aspects of it. While I must admit I would also like a big cleanup to make the function names and arguments more uniform, I don't hope they change anything that makes it harder to begin with php or limit the possibilities to grow.

Re: PHP needs a vision

#128
post #107

Earlier quoted context omitted.

Are the sort of people writing straight PHP the sort of people who would be using rails? Try a PHP framework like Laravel and then compare that to Rails.

I took a look at that, it appears that you unzip the framework and then start modifying it directly. After you "upload it to your webserver". Deployment? Source Control? No, not in PHP, you just modify shit right on the webserver. I'm sure this process makes upgrading painless, just unzip the framework and... wait... all your changes just got overwritten. This kind of crap is exactly why everyone with a clue laughs a…

Wow, you're the type of developer who would leave an absolute mess in his wake.

Everything you said I rail against daily. Stop bringing your bad habits into PHP, we have enough of them already.

Re: PHP needs a vision

#129

PHP is for webdev. That's it. Go outside the bounds of that and it loses its magic. On its own it's great for spitting out a webpage. It's a scripting and templating language in one, which is kind of cool. That said, outside of that to make PHP work on bigger projects you end up with a lot of structure and ceremony that make PHP suck, not quite as much as Java, but it's not amazing. Thiings like testing and testabili…

I'm curious: how is testing/testability in PHP different to make it less fun than other languages?

It's not. PHPUnit and dependency injection make it dead easy to mock objects and make testing stupid easy.

Re: PHP needs a vision

#130

PHP is for webdev. That's it. Go outside the bounds of that and it loses its magic. On its own it's great for spitting out a webpage. It's a scripting and templating language in one, which is kind of cool. That said, outside of that to make PHP work on bigger projects you end up with a lot of structure and ceremony that make PHP suck, not quite as much as Java, but it's not amazing. Thiings like testing and testabili…

I can't agree with that. Personally I happen to use PHP not for web development, but almost exclusively for system administration and monitoring (I'm not a web developer). It's very comfortable using PHP in these areas, as:

- PHP and many of the PHP extensions are packaged for about every major OS and architecture

- a lot of functionality is already shipped with the interpreter (so no additional stuff necessary)

- it's very easy to deploy We've tried a number of options, especially in the monitoring area, but PHP eventually seemed to be the most suitable for the job.

Post reply on HN