|
PHP 4 was officially released on May 22, 2002, and today its installed base has surpassed 15 million domains. In the late 1998, Zeev and Andi looked back at their work in PHP 3 and felt they could have written the scripting language even better and they started yet another rewrite. While PHP 3 still continuously parsed the scripts while executing them, PHP 4 came with a new paradigm of compile first, execute later. The compilation step does not compile PHP scripts into machine code; it instead compiles them into byte code, which is then executed by the Zend Engine (Zend stands for Zeev & Andi), the new heart of PHP 4. Because of this new way of executing scripts, the performance of PHP 4 was much better than that of PHP 3, with only a small amount of backward compatibility breakage 4. Among other improvements was an improved extension API for better run-time performance, a web server abstraction layer allowing PHP 4 to run on most popular web servers, and lots more. |
| |
| Introduction |
| PHP is a language that was designed to be easily embedded into HTML pages. Most PHP pages have PHP code and HTML intermixed. When a Web server reads a PHP page... |
| Variables |
| Variables in PHP are denoted by the "$". To assign the value "Hello World" to the variable $str, you simply call it in your code:... |
| Strings |
| String variables are used to store and manipulate a piece of text.<?php... |
| Operators |
| Operators are used to manipulate or perform operations on variables and values. There are many operators used in PHP, we have separated them into the follow... |
| If Else Statement |
| One of the most common PHP language constructs that you will encounter is the if…then statement. The if…then statement allows you to evaluate an ... |
| Loops |
| Loops are used to repeat statement or block of statement more than one time. The idea of a loop is to do something over and over again until the task has be... |
| Functions |
| In addition to PHP's built-in functions, you can create your own functions. Remember that if you want to use variables that exist outside of the function, then... |
| Forms |
| Forms are the most fundamental method of interaction for your users. Users must use a form to enter information into a site. Think about it, every bulletin boa... |
| Sessions |
| You cannot track variables across a user session unless you start the session on each page on which you want to use or alter those variables. Starting a sessio... |
| Cookies |
| A cookie is a small bit of information stored on a viewer's computer by his or her web browser by request from a web page. The information is constantly pas... |
| Files |
| PHP is a very useful language for working with files. Although it may not be as robust as other languages, such as PERL, when it comes to parsing files, PHP st... |
| E-mail |
| mail() function is used to send emails from inside a script in php. The Syntax of mail() function is as under.... |
| Error Handling |
| Error handling is the process of changing the control flow of a program in response to error conditions. Error conditions can be caused by a variety of fact... |
| File Upload |
| You must first build an HTML form that lets users select a file to upload. ... |
| PHP Databases |
| A database is a collection of data that is stored independently of the manner in which you collect it or may wish to retrieve it. It is organized for ... |
| Connecting to a MySQL Database |
| In order to pull information from a MySQL database to your php pages, you need to connect to the database first. ... |
| MySQL Data Types |
| Numeric Data Types:... |
| Inserting Data Into a Table |
| The INSERT INTO SQL statement impregnates our table with data. Here is a general form of INSERT.INSERT I... |
| Select Statement |
| The select query is used to retrieve records from a database. ... |
| Where Clause |
| In Select Query we use WHERE clause to select only data that matches a specified criteria. ... |
| Order By |
| We use Order By Keyword to sort the records in a recordset. The general syntax is as under. Synt... |
| Update Statement |
| Update statement is used to modify the data in a database table. The general syntax is as under. ... |
| Delete From Statement |
| DELETE FROM statement is used to delete rows from a database table. The general syntax is as under.... |
|
|