News for hackers. Stuff that matters.
Re:PHP needs to die. What will replace it? by gkoberger on Monday September 27, 2010 @03:44PM (#1733058)
PHP can die when there's another language that's as dead simple to run as PHP. A new programmer can open up a text file with a php extension on (pretty much) any web server, type "<? echo "Hello World"; ?>", and it works.
Re:PHP needs to die. What will replace it? by jameskilton on Monday September 27, 2010 @03:51PM (#1733079)
You are mixing your requirements really badly here: a language that's "dead simple to run" vs a language that works stupidly simple with the web.

Ruby is very easy to run: puts "Hello World"

As is perl: print "Hello World";

Php? <?php echo "Hello World"; ?> (wtf is all that crap, says the new programmer)

The point the OP is trying to make is the "stupid simple with the web" side of the equation. Of course the PHP side isn't as simple as "the language runs on the web". PHP runs on Apache because of the tons of work put into mod_php to integrated it and make it work as easy as possible.

You can't "just run" php on nginx, lighty, etc. Then you need to setup FastCGI instances, and now you're no different from Rails land with mongrels or thins.

Re:PHP needs to die. What will replace it? by api on Monday September 27, 2010 @03:59PM (#1733121)
He is referring to an under-appreciated virtue of good software: installability.

apt-get install php5

Usually you don't even need that.

Re:PHP needs to die. What will replace it? by chc on Monday September 27, 2010 @07:41PM (#1733976)
I don't understand how this is distinct from PHP's competition. Python is "apt-get install python" — two extra characters are not going to break even the greenest noob's back.
Re:PHP needs to die. What will replace it? by jrockway on Tuesday September 28, 2010 @04:11PM (#1737084)
And if this is the argument, Perl is in Debian's default install anyway. Hell, the APT system is partially written in Perl...
Re:PHP needs to die. What will replace it? by jrockway on Tuesday September 28, 2010 @04:11PM (#1737082)
What? PHP is not in the default install of, say, Debian. But Perl is.
Re:PHP needs to die. What will replace it? by zaidf on Monday September 27, 2010 @03:56PM (#1733104)
Ruby is very easy to run: puts "Hello World"

You are confusing Ruby for Ruby on Rails.

Ruby is easy to run. Ruby on Rails, not as much(relatively).

Re:PHP needs to die. What will replace it? by chc on Monday September 27, 2010 @07:43PM (#1733984)
Since he never said anything about Ruby on Rails and he was talking about languages rather than web app frameworks, I'm pretty sure he meant Ruby.
Re:PHP needs to die. What will replace it? by BerislavLopac on Wednesday September 29, 2010 @06:23PM (#1741379)
Actually, PHP is not a programming language. It's a templating language gone bazooka.
Re:PHP needs to die. What will replace it? by zaidf on Wednesday September 29, 2010 @01:50PM (#1740326)
Comparing use of Ruby to PHP is like comparing C++ to PHP. It makes little sense. We don't write web pages in C++ or Ruby. We do in PHP and RoR.
Re:PHP needs to die. What will replace it? by jrockway on Tuesday September 28, 2010 @04:10PM (#1737080)
Actually, perl is "say 'Hello, world.'". Shorter and more readable.
Re:PHP needs to die. What will replace it? by Pewpewarrows on Monday September 27, 2010 @04:47PM (#1733344)
I don't see a reason for PHP to "die" (using that term very loose, considering that people think PHP killed Perl, while Perl is still very alive and well).

When people just want something nice and simple, PHP works beautifully. There's nothing wrong with the parts of the language that people who don't know programming are using to glue pieces of their website together. It's really only once you start using it for more than that when you start hating the terrible design choices and language constructs.

Leave PHP as the ubiquitous solution for simple glue, it does it quite well. When people want to do web development beyond the glue they can turn to any other number of great languages/frameworks.

Re:PHP needs to die. What will replace it? by xtho on Monday September 27, 2010 @04:48PM (#1733348)
> "<? echo "Hello World"; ?>"

That's actually a good example for why it should die (embedding code in html).

Re:PHP needs to die. What will replace it? by phamilton on Monday September 27, 2010 @06:25PM (#1733745)
And what exactly is a .html.erb file? The erb stands for embedded Ruby if I'm not mistaken.
Re:PHP needs to die. What will replace it? by xtho on Tuesday September 28, 2010 @01:04AM (#1734635)
It's okay to use it for templates only (and the same is true for php if you use a sane framework). If you use erb files to quickly hack together a dynamic web-page I'd be wary though.
Re:PHP needs to die. What will replace it? by jcapote on Monday September 27, 2010 @03:55PM (#1733095)
Here you go, works on heroku. http://github.com/capotej/joke
Re:PHP needs to die. What will replace it? by makmanalp on Monday September 27, 2010 @04:04PM (#1733148)
Ironically, that requires 2 extra steps, your script and heroku.
Re:PHP needs to die. What will replace it? by jcapote on Monday September 27, 2010 @04:51PM (#1733359)
As opposed to what? Getting a shared host and uploading? Same two steps.
Re:PHP needs to die. What will replace it? by tjpick on Monday September 27, 2010 @04:24PM (#1733238)
any language with cgi.