Live data from Hacker News

The Lesser Known Contributors Who Are Trying To Make PHP Good Again

danielnill.com

51–53 of 53 posts

Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again

#51

Earlier quoted context omitted.

The strong selling point of PHP for a long time was cheap hosting. Combine that with a fast learning curve and you're set. Nowadays, it's not so clear cut price wise, but PHP took a strong advance in term of user base - look at the number of libraries, projects, and jobs (!) available in PHP, vs python or ruby.

good selling points, but those things never made it a good language, it was just convenient.

PHP followed a very uncommon path. Features were added as needed, in an incremental fashion. Nice syntax is never a huge problem, though that's probably most people complaint. That said, it isn't worse than its "contenders" in terms of feature set. You get a decent object system, lambdas (note that they'd been there for a long time, but it's more convenient now), a wide range of bindings. It's not pretty, but it does the job in many cases.

But, anyway, if you're really looking for a good language (something efficient, where you don't have to spend hours to spot a stupid bug), skip the dynamic ones altogether, and go for as much static analysis you can get.

Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again

#52
post #9

Everyone probably knows this, but PHP's Smarty template engine ( http://www.smarty.net ) is really awesome. I've yet to see a better one in any language - it has things like Unix-like pipe chaining of filters, user defined functions, and intelligent caching built in. I reduced the number of lines in one codebase I worked on by 70% through use of Smarty.

Nobody mentioned twig yet, so I will: http://twig.sensiolabs.org And seriously, check Symfony 2 out.

I think that twig got its root in the django templating engine (which is python based), because of the resemblance. It's very good indeed. I'm not sure if the original had support for filters though.

Re: The Lesser Known Contributors Who Are Trying To Make PHP Good Again

#53
post #10

While I've bashed PHP as much next guy, these are the facts: -Take away PHP and the internet would break. The vast majority of websites are either written in PHP or have a PHP back end. -The LAMP/LNMP stack is by far one of the most deployed web server configuration. -PHP is extremely well documented and it's been around so long that it's easy to find solutions on the web. PHP is the Model T of web languages: people…

> PHP is the Model T of web languages: people love to laugh at it because it's old and ugly but it nearly single-handedly revolutionized the landscape. I for one applaud any efforts to revive and improve this language.

I agree with the first part. But when the rest of the world has moved on to '56 Chevy Bel-Airs, does anyone really want a "revived and improved" Model T?

Post reply on HN