Virtual Interview: Rasmus Lerdorf - The Interview (contd.)
(Page 2 of 2 )
Q: I read an interesting debate when someone asked whether they should use Perl or PHP to develop interactive/dynamic Web content. Would you have any thoughts about the strengths of Perl vs. PHP? A: Perl is a general-purpose scripting language, whereas, as I said, PHP is a scripting language targeted at the Web problem. As such, there are a number of things built into PHP for accomplishing common Web tasks, where in Perl you need to either roll your own or go trolling through [Comprehensive Perl Archive Network] to find someone else's implementation.
I personally use a combination of PHP and Perl for many of my projects: Perl mostly for back-end tasks, while I have PHP doing all the front-end work. Of course, you could do the front end in Perl, but it would be a bit more work.
Q: Can you estimate how many sites are using PHP? A: Php.net/usage.php has some numbers. Basically, over 20% of the domains that answer on port 80 indicate that they have PHP installed. Whether or not they actually use PHP is difficult to determine.
Obviously, most of the open-source related sites out there use PHP. I know it is also used to some extent at MCI/Worldcom, Honda, Lycos and Amazon. Basically just count when you browse around. One in every five clicks is likely to be a PHP-powered site.
Q: I know PHP was an outgrowth of some code you wrote for your own home page. What were those original scripts designed to do? A: It started out as a library of C code I had put together from countless CGI programs I had written in C. I got tired of rewriting the same code over and over again, and also wanted to separate my business logic from my HTML layout.
So I wrote a very simple tag parser that would parse through an HTML file looking for special markup tags and replace those special tags with the result of my business logic code written in C. I put together a number of general-purpose tools useful on home pages that made use of this framework.
These tools implemented a simple guest book, did hit analysis, tracked number of visitors and a couple of other things. They were intended to be examples of how to use this framework I had built that made it easy to add business logic written in C to a Web server and make calls into this business logic from within an HTML page.
Q: What, if anything, does PHP stand for? A: The initial release back in 1995 was called the Personal Home Page Tools. Over the years, PHP has outgrown the notion of being a set of tools for home pages, so it was felt that we needed a better name. After much debate and a vote, the rather lame "PHP: Hypertext Preprocessor" name was picked. We tend to just say PHP, though, the same way very few people expand out the Perl acronym.
Q: Did you have any intention for those scripts to turn into an open-source project? If not, how did it happen? A: No, I had no intention of creating a huge open-source project or even a scripting language. I wrote the initial tools because I felt I needed something like them and I couldn't find anything out there that approached the Web problem the way I wanted to approach it.
People ran across my home page and other sites I had worked on and asked how I had done various things. Having learned to program from looking at other people's code, it never even entered my mind that I shouldn't let people download and use mine.
Q: What does that feel like, to create something that becomes an international Web standard language, when you see your creation on thousands of Web sites all over the world? A: That part of it has worn off long ago. What I like is when I get out in front of user groups in various countries and meet the real people face to face, where PHP has made a difference to them personally. This is especially true in some of the poorer countries of the world, where not just PHP but all open-source technologies have enabled them to participate in the global community on par with the rest of the world.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |