Live data from Hacker News

I Like PHP

beust.com

11–20 of 269 posts

Re: I Like PHP

#11
post #8

"There is nothing more exciting than modifying a file, hitting Refresh on your browser and seeing the result right away" I think this feature is definitely useful, but you can virtually do the same thing in other languages with templating engines.

Exactly. This is not a feature of PHP, but simply CGI.

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.

Re: I Like PHP

#12
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…

Yes of course it's slow. It's interpreted and for 80% of sites out there that's fine. For the other 20% you compile the php down to C/C++

Re: I Like PHP

#13

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.

Is developing for Facebook not painful?

I imagine most of us do not work at Facebook and have no idea how hard working on their code base is.

There's not necessarily any connection between developing external Facebook applications and working on Facebook code itself.

Re: I Like PHP

#15
> PHP is exactly like C. Either you like both or you don’t like either, there is no claim you can make about PHP that can’t be made about C as well, and vice versa

* C is fast and has tight resource control

* C is portable

* C has a transitive (==) operator

...

Re: I Like PHP

#16
post #8

Earlier quoted context omitted.

Exactly. This is not a feature of PHP, but simply CGI.

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

Re: I Like PHP

#17
One of the reasons I like PHP is that it still lets you get to a lower level of coding. Many of the newer languages and frameworks that have become popular in the past couple of years abstract things such as database connectivity away (Django is a good example of this) and it makes it difficult to optimize queries effectively without hacking onto the framework.

Re: I Like PHP

#18
post #9

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.

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, are easy and fun to work with for the most part.

Re: I Like PHP

#19
post #8

Earlier quoted context omitted.

Exactly. This is not a feature of PHP, but simply CGI.

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.

You haven't done much asp.net development I take it?

Re: I Like PHP

#20
post #9

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.

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…

Today not many people create large apps without a solid framework at the bottom, be it Zend, symfony, Rails, Django or whatever. Wordpress is pretty awful but the codebase is also pretty old, rewriting everything would be loads of work and make many plugins unusable.
Post reply on HN