Main Different between PHP3 and PHP4
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, the new heart of PHP 4.
- PHP 4.1.0, introduced superglobals such as $_GET and $_POST. Superglobals can be accessed from within functions without having to use the global keyword. This feature was added in order to allow the register_globals INI option to be turned off.
- PHP 4.2.0 With the new superglobals in place, on April 22, 2002, it was released with the register_globals turned off by default.
- PHP 4.3.0, the last significant PHP 4 version, was released on December 27, 2002. This version introduced the Command Line Interface (CLI), a revamped file and network I/O layer (called streams), and a bundled GD library.
What’s register_golbals – why it’s bad
register_globals is a feature in PHP which automatically converts input variables like “?foo=bar” in http://php.net/?foo=bar to a PHP variable called $foo. Because many people do not check input variables properly, many applications had security holes, which made it quite easy to circumvent security and authentication code.
Main features of PHP5
- Rewrite the Object Oriented part
- new SimpleXML extension