By Brian Patterson & Amanda Perez
PHP was originally created to maintain his personal homepage, hence the name PHP. Development began in 1994 and was released on June 8, In 1997, two Israeli developers, Andi Gutmans and Zeev Suraski rewrote the parser which formed the base of PHP 3. The official launch of PHP 3 was in June Who Made it?
What is PHP? PHP is a general purpose server-side language designed for web development to produce dynamic web pages. PHP was originally an acronym for Personal Home Page but now stands for PHP: Hypertext Preprocessor. PHP is open source. PHP scripts are ran on the server. PHP supports many databases (MySQL, Sybase, ODBC, etc). PHP is free to download.
Rasmus Lerdorf began PHP when he created a set of Perl scripts he called “Personal Home Page Tools” to maintain his personal homepage. He first announced the release of PHP on the comp.infosystem. ring.cgi Usenet discussion group on June 8, Zeev Suraski and Andi Gutmans rewrote the parser in 1997 which formed the base for PHP 3 with the official launch coming in June They rewrote PHP’s core and produced the Zend Engine in 1999 and founded Zend Technologies.
PHP generally runs on a web server. PHP acts as a filter, primarily, taking input from a file stream and/or PHP instructions and outputting the data, most commonly being HTML.
PHP is considered to be one of the easiest languages to learn. Readability is quite easy as it is very similar to the language in which it was implemented in, C. All PHP begins with. What’s in between is the php code itself so tracking it down is quite simple. The syntax of PHP is very similar to other C based languages.
PHP was implemented in C so it takes much of its syntax from there. It is a weakly and dynamically typed language. It is easy to learn compared to many other languages and completely free.
PHP is an interpreted language making its build cycle super short. Its very portable with very little tweaking necessary between different operating systems. If the speed of a compiled program is needed, it can be compiled. For example, write what you need in C and use the C PHP interface. One of the most widely used languages on the internet today.
It’s FREE!! The cost to implement PHP is completely free. The PHP manual which is readily available at is regarded as one of the best language manuals, making training very cost effective. The services needed for PHP can also be had for free, such as Apache server and MySql.
Pros Quick and easy. Works well with databases, file systems, etc. Huge amount of free support. One of the best online manuals. Shallow learning curve. Extremely large body of built in functions. Regular expression support. Extensive database support. Cons Global configuration patterns can change semantics affecting the portability. Too easy to learn. No decent ide for php. Too many choices for selecting libraries and framework. Backwards compatibility issues.
<?php echo "Hi, I'm a PHP script!"; ?> <?php # Script numbers.php //set the variables. $quantity = 30; $price = ; $taxrate =.05; //calculate the total $total = $quantity * $price; $total = $total + ($total * $taxrate); $total = number_format ($total, 2); //Print the results. echo 'You are purchasing '. $quantity. ' widget(s) at a cost of $'. $price. ' each. With tax, the total comes to $'. $total. ' ; ?>
PHP and MySQL for dynamic web sites 2 nd Edition, Larry Ullman,