When should you use PHP?
Should you learn PHP? Probably so, if:
- You're responsible for a Website
- Others in your organization like using PHP
- You want something "lighter" and easier to learn than Perl or Python
- You favor free software
- You need access to data locked in databases
- You want to exploit Java
- You already use PHP in one way, and have been wondering what else it can do for you
Humble beginnings
Rasmus Lerdorf wrote a rudimentary version of the PHP scripting language in late 1994 as an aid to managing his personal homepage. (Originally the name PHP stood for Personal Home Page Tools; it eventually became a recursive abbreviation for PHP: Hypertext Preprocessor). Several languages -- Perl, Python, and even exotica like Scheme and Icon -- can do what PHP does: compute HTML pages on the server side of a Web application. PHP is unique, though, in that it is specifically designed to simplify that one task. You might reasonably expect, then, that PHP does it best. That certainly seems to be the belief of the few hundred thousand developers worldwide who are now enjoying the fourth major PHP release.
Take a moment to understand clearly what server-side computation means for a Web application. A minimal Webpage might have source that looks like this:
<HTML>
<HEAD>
<TITLE>
Home page for John Smith
</TITLE>
</HEAD>
<BODY>
This is John Smith's first home page.
</BODY>
</HTML>
Suppose now, that John wants to replace
This is John Smith's first homepage.
with
This is John Smith's first homepage.
John has completed XXXX Webpages.
One way to accomplish this would be for John to simply edit in "one" or "two" or n in place of XXXX. This works well enough for text that changes infrequently.
If John's a busy fellow, though, he'll likely want to "automate" his page -- that is, have the computer itself figure out parts of its content. At that point, his page will become dynamic.
If dozens of languages can generate dynamic Webpages, how do you choose among them? My first criterion is the social one: if your friends and colleagues are comfortable with PHP, then you should try it. While languages differ profoundly in a technical sense, most of them have roughly the same capabilities for introductory and intermediate-level Web work. Let computing specialists argue the details of syntactic theory; if you just want to get work done, use the same language that those around you use.
Often, that language is PHP. PHP is probably available for the Web server you use. It's easy for beginners to pick up. It has a helpful community of
Essential JavaFX
Get started building rich Web apps quickly with an introduction to the power of JavaFX key features -- scene node graphs, nodes as components, the coordinate system, layout options, colors and gradients, custom classes with inheritance, animation, binding, and event handlers.Enter now!
The Nomadic Developer
Consulting can be hugely rewarding, but it's easy to fail if you are unprepared. To succeed, you need a mentor who knows the lay of the land. Aaron Erickson is your mentor, and this is your guidebook. Enter now!












