News for hackers. Stuff that matters.
Re:25 Years of PHP [video] by nkozyra on Sunday September 08, 2019 @03:01PM (#20912631)
A lot of these things came about because they allowed people to bypass harder aspects of programming for the web. This was great for ease of entry but introduced tons of problems.
Re:25 Years of PHP [video] by Vanderson on Sunday September 08, 2019 @03:36PM (#20912857)
I think it's a little unfair to not refer to his responses to these allegations in the video.

He never intended PHP to last longer than 6 months. He kept waiting for someone to make something better so he could shut it down... it just didn't happen. Also, he admits he's not a great programmer.

As a counter point doesn't every language "introduce problems" of some kind?

Re:25 Years of PHP [video] by ptx on Monday September 09, 2019 @07:08PM (#20923501)
The video was interesting and he comes across as a very reasonable and pragmatic guy who had good reasons for designing it the way he did. But those reasons and that design resulted in a not very excellent language - as the parent post (and Rasmus himself!) said. Convenient but problematic, intended to be replaced by something better.

That said, the improvements in version 7 look impressive. I still prefer a language that's not quite as ugly though.

Re:25 Years of PHP [video] by nkozyra on Sunday September 08, 2019 @07:02PM (#20913933)
Again, I don't think this is his fault in this regard. I also think he's humble about his capabilities and I'm sure this long project matured his chops across the board.

But a lot of the choices were short sighted, and a devotion to backwards compatibility has limited the ability to clean up.

PHP is now a super fast, relatively mature web programming language that carries a lot of its baggage.

Re:25 Years of PHP [video] by Vanderson on Monday September 09, 2019 @09:25AM (#20917889)
I'd really recommend you watch the video to understand how long term development of a hugely popular system isn't as easy as it may seem. Especially if the environment is as dynamic as the internet.

He addresses your issues about "short sighted" choices and backwards compatibility.

Re:25 Years of PHP [video] by nkozyra on Monday September 09, 2019 @03:48PM (#20921705)
I had watched it and comments like yours are generally frowned upon here.

> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."

Re:25 Years of PHP [video] by Vanderson on Monday September 09, 2019 @04:18PM (#20921983)
Sorry, I forgot about that rule. I really wasn't being critical of you not watching it. (There is no tone in writing to convey that extra meaning.)

I was trying to suggest it as a helpful way to understand Rasmus' perspective and a very complex history of development that has real logic to the choices he made that so many people have been critical of over the years. And that I think if someone heard him out would realize they would likely have made the same choices he did if they were in the same situation.

I just felt there wasn't a need for me to quote the video, but I suppose that was a little lazy of me.

Re:25 Years of PHP [video] by simion314 on Sunday September 08, 2019 @03:40PM (#20912883)
I was not on the internet at that time, were there better alternatives?
Re:25 Years of PHP [video] by thaumaturgy on Sunday September 08, 2019 @03:57PM (#20913002)
I was a maturing young programmer back then. The leading alternative was Perl, which was still pretty lively but had a lot of the same complaints at the time that it does now (readability). Perl's what I was primarily using; it took me a bit to adopt PHP, but once I did, I never looked back.

Some folks were also compiling C and gluing it together with a CGI module, and a lot of others in the Microsoft world were using Frontpage and its brethren. But, the Microsoft stack only ran on Windows servers, and Windows web servers had a reputation (deserved, imo) for kinda sucking.

PHP's killer feature was mod_php. It was dead simple to integrate into any shared hosting environment, and so pretty much every shared host did. mod_php magically knew how to spit out html when reading html, and execute php when encountering php tags, so that gave us the html-mixed-with-php pattern that was wonderful at the time but considered bad practice now.

But also scope has changed a lot. At the time, people were mostly looking for hit counters, contact forms, and "guestbook" forms. For all those things, PHP excelled, so it gobbled up the market fast.

Re:25 Years of PHP [video] by dwd on Sunday September 08, 2019 @08:16PM (#20914218)
Remember Matt's Script Archive? That was all Perl and covered a lot of the hit counter, contact/guestbook and forum software pre-PHP.

My first website back in `96 also had some compiled C via cgi. No database. I've said this before but using compiled Go with the web brought back memories of those good old days.

I spent about 4 years doing classic ASP before .Net arrived and had a hand in building a lot of big sites some of which still exist (and still use ASP): Most corporate jobs seemed to use the Microsoft stack then (or Java), where PHP was the what you did on the side because it didn't require server licensing.

Re:25 Years of PHP [video] by cutler on Sunday September 08, 2019 @10:52PM (#20914842)
It's often overlooked that many of the cheap hosting companies who provided the environment for PHP's phenomenal growth only offered PHP as a CGI. You often had to pay a lot more if you wanted mod_php because it was harder to secure and required more resources. PHP/CGI was the way to max out the number of users on a server even it was slower.
Re:25 Years of PHP [video] by kalleboo on Monday September 09, 2019 @05:58AM (#20916708)
> PHP's killer feature was mod_php. It was dead simple to integrate into any shared hosting environment, and so pretty much every shared host did

Also safe_mode and open_basedir, which promised shared hosting providers that their users wouldn't hack the server and each other

Re:25 Years of PHP [video] by pixelbath on Monday September 09, 2019 @04:30PM (#20922132)
The big alternatives were: Perl if you had the technical chops and a host who'd basically let you have root access to the hosting machine (C/C++ worked this way too through CGI), ColdFusion which isn't really an alternative, ASP using VBScript which was wordy, complicated, slow, and gave almost no help to the developer (Provider error '80004005': Unspecified error) when a bug appeared unless it was during object initialization.

Once you could get Apache with mod_php set up, PHP felt like something you could use to actually get stuff done.

Re:25 Years of PHP [video] by edoceo on Sunday September 08, 2019 @03:47PM (#20912933)
MS-ASP or CGI. 20 years ago PHP was like "amazing", compared to what else was around. Maybe ColdFusion
Re:25 Years of PHP [video] by antod on Sunday September 08, 2019 @08:41PM (#20914305)
Yup, those were the two web "stacks" I had tried before PHP - around 1999 or so. At the time PHP did feel amazing compared to Classic ASP in VBScript (shudder), and I never really felt comfortable with Perl.

There were other things like Zope and Roxen/Pike around back then, but I never used them. Ah and OpenACS/AOLServer which was TCL from memory.

Re:25 Years of PHP [video] by toyg on Sunday September 08, 2019 @05:14PM (#20913456)
ColdFusion was terribly expensive, like all the other stuff like WebObjects or Netscape. The Microsoft stuff was expensive AND insecure. CGI (i.e. Perl) was cheap but annoying to learn, setup, and maintain. Java was sluggish and unusable in shared-host environments (i.e. expensive, again).

PHP hit an optimum equilibrium between usability, features, and price. This only changed when virtualization changed the hosting game. Arguably PHP is still very close in terms of usability - deployment is fundamentally trivial - it's just lagging elsewhere.

Re:25 Years of PHP [video] by nkozyra on Sunday September 08, 2019 @07:05PM (#20913944)
Perl was the most comparable but CGI was limiting and I don't recall a lot of strong, simple frameworks. Also, it was Perl.

I was primarily a Perl programmer at the time, responsible for writing CGI apps that were slow and unreadable to anyone I worked with who didn't know Perl.

I think vbasic was around but that required IIS and was an unmitigated disaster in every way. I sadly had to work in that a lot too.

I never messed with coldfusion but it seemed to get the job done for people who did.

Re:25 Years of PHP [video] by cutler on Sunday September 08, 2019 @11:03PM (#20914893)
Most Perl web development was done with Lincoln Stein's CGI.pm in the late 90s. HTML::Mason was Perl's answer to PHP but it relied on mod_perl which most hosting companies were not prepared to let you have on the cheap. You could do CGI.pm procedural style or OO style with $obj->method() calls similar to PHP. "MySQL and Perl for the Web" by Dubois was a pretty good web primer at the time based on CGI.pm. This and "Programming Perl" got me started after I became intrigued by regular expressions which led to a deep interest in Perl. It's easy to forget that Perl was VERY cool back in the early 2000s. Reading "Programming Perl" for me was like reading great literature. Larry Wall the linguist really comes through strongly in the book.