Live data from Hacker News

I Like PHP

beust.com

31–40 of 269 posts

Re: I Like PHP

#31
post #4

From the comments: "PHP is great for its purpose. Quick scripts that generate web content. It’s even OK for small applications. But just like C, PHP is lousy for the medium to large. Any software project with a duration in months or greater that is entirely in PHP is going to be painful." Like Facebook? Or Wordpress? Or Digg? PHP aint perfect, but it's demonstrably suitable for medium to large projects.

There is little indication that Facebook isn't painful to deal with compared to a functionally identical version of Facebook built in another language/platform. Because someone did it and is profiting from it does not mean they could not have done it better.

I thought FB's troubles were with mysql not PHP. Turns out mysql has some limiting factors.

Re: I Like PHP

#32
post #4

From the comments: "PHP is great for its purpose. Quick scripts that generate web content. It’s even OK for small applications. But just like C, PHP is lousy for the medium to large. Any software project with a duration in months or greater that is entirely in PHP is going to be painful." Like Facebook? Or Wordpress? Or Digg? PHP aint perfect, but it's demonstrably suitable for medium to large projects.

There is little indication that Facebook isn't painful to deal with compared to a functionally identical version of Facebook built in another language/platform. Because someone did it and is profiting from it does not mean they could not have done it better.

You can build a Tinker-Toy computer that plays Tic-Tac-Toe, but just because you can doesn't mean you should.

http://www.computerhistory.org/collections/accession/1026307...

Re: I Like PHP

#33
post #4

From the comments: "PHP is great for its purpose. Quick scripts that generate web content. It’s even OK for small applications. But just like C, PHP is lousy for the medium to large. Any software project with a duration in months or greater that is entirely in PHP is going to be painful." Like Facebook? Or Wordpress? Or Digg? PHP aint perfect, but it's demonstrably suitable for medium to large projects.

There is little indication that Facebook isn't painful to deal with compared to a functionally identical version of Facebook built in another language/platform. Because someone did it and is profiting from it does not mean they could not have done it better.

Considering Facebook uses Haskell to automate changes to their PHP codebase, I'd imagine PHP isn't doing them any favors.

Re: I Like PHP

#34

Earlier quoted context omitted.

It's a feature of PHP because PHP isn't a compiled language. C, Java, anything .NET... They all require an added step in the middle.

in .net you can run your site off source files, and the server will compile as needed

It's slower, right? I remember some years ago it would take like 5 seconds on this kind of big web app to show me the newer version of the file I just changed.

Re: I Like PHP

#35
post #2

You say if you make one assumption about C, you have to say the same about PHP. Well, PHP is academic, C is not. C is fast, PHP is not. I would only have agreed with your post if it were PHP and C++. C++ is academic and it's not slow but it is slower. You also say that you either like both PHP and C, or you like neither. Well what about Lua, Python... or any other embed-able language? Most Python programmers would sa…

PHP is academic?! What definition of academic could you possibly be using?! The blasted thing doesn't even respect basic things like transitivity in its most commonly used equality operator, its author says that he hated programming and didn't know how to write a parser when he first implemented it. And the thing as far as I know doesn't have a specified grammar. It just disregards as much of the body of knowledge of computing as it can while still actually running on a computer.

If anything, C has a much more academic pedigree, being born in an industrial research lab and having /gasp/ an specification.

Re: I Like PHP

#36

From the comments: "PHP is great for its purpose. Quick scripts that generate web content. It’s even OK for small applications. But just like C, PHP is lousy for the medium to large. Any software project with a duration in months or greater that is entirely in PHP is going to be painful." Like Facebook? Or Wordpress? Or Digg? PHP aint perfect, but it's demonstrably suitable for medium to large projects.

It's a damning indictment of Java, ASP.NET, Ruby and all other environments that almost all of the apps that "any idiot can install on a web server" are written in PHP.

Where's the "Wordpress" of any other programming language?

Re: I Like PHP

#37

There's a regular stream of "defending PHP" posts but they all seem to miss the point. No one bashes PHP because it can't do these things, or that it isn't easy. People bash PHP because there are objectively better languages and platforms out there and objectively bad decisions made by those guiding the PHP language. If you want to defend PHP in any meaningful way then you can't just list things that can be done easi…

> If you want to defend PHP in any meaningful way then you can't just list things that can be done easily in almost every semi-modern web ecosystem

Did you ever read Python's documentation? Or Ruby's? Or Java's?

Show me one popular web programming language which has a full page, up to date, with examples and user comments and version incompatibility info, per function.

Of course, it's just one point and I otherwise agree with your comment, but it's one hell of an advantage.

Re: I Like PHP

#38
post #18
post #9

Earlier quoted context omitted.

I think it's probably easier to create unmanageable spaghetti with PHP. It's not that you can't build a large project in PHP, it's that it's easier to foul up. By far the part of PHP that shines for small projects and causes havoc in large is the way includes work. It's possible to be disciplined about this, but it's not common. I remember many times searching in vain for some function or another that was included so…

You can't blame PHP because the developers using it write messy code. I'll have the same problem in Java. I'll need to find out where I implemented some logic, and have to start digging through classes and following my own breadcrumbs until I find it sometimes. Just because I commented my code poorly, or put logic in the wrong place isn't the fault of Java, it's my own, and the languages, Java and PHP, in my opinion,…

It happens with any language. But at least in Java you're limited (as far as I know) to looking through what you've explicitly imported. If you include a file in PHP, you have access to everything that that file included in itself, and everything that those files included, and so forth.

Re: I Like PHP

#39
Is PHP that much worse where it's worth it to jump onto the ruby ship?

I'm just starting to code one of my current projects, but in PHP. Should I consider ruby instead?

Re: I Like PHP

#40
post #4

From the comments: "PHP is great for its purpose. Quick scripts that generate web content. It’s even OK for small applications. But just like C, PHP is lousy for the medium to large. Any software project with a duration in months or greater that is entirely in PHP is going to be painful." Like Facebook? Or Wordpress? Or Digg? PHP aint perfect, but it's demonstrably suitable for medium to large projects.

There is little indication that Facebook isn't painful to deal with compared to a functionally identical version of Facebook built in another language/platform. Because someone did it and is profiting from it does not mean they could not have done it better.

I thought most of Facebook's php is written in a subset of PHP that can HipHop can compile for them. I doubt their PHP is all that similar to eg. Wordpress's PHP.
Post reply on HN