PHP4 programming language

2013 年 5 月 10 日12,1890

PHP 4 - features

PHP is a server-side scripting language, especially suited for creating dynamic web pages, and offering web developers a large selection of instruments. PHP, currently the basis of many web applications, can be easily embedded in HTML code and connected to MySQL and PostgreSQL.

PHP Hosting

Table of contents :

PHP 4

The launch of PHP v.4 marked a serious progress in the popularity and utilization of this programming language. PHP v. 4 is the first version powered by the Zend Engine, which allows working with encoded files through the Zend Optimizer. The Zend Engine-powered PHP v. 4 is more efficient, more reliable, and much, much faster than PHP v.3. This optimized performance results from the redesign of the scripting engine used in PHP v.4 - the engine has been entirely rewritten and uses a significantly more efficient "compile-then-execute" paradigm, instead of the "execute-while parsing" model employed in PHP 3.0.

PHP 4 and Object Orientated Programming

While PHP 5 is known for its improved OOP (Object Orientated Programming), it builds its improvements on the foundations laid by PHP 4.

Object-overloading support - it allows third-party OO libraries to use the OO notation of PHP 4 in order to access their own functionality.

Output buffering support - PHP 4 is the first PHP revision where the coder can buffer the output of his code. It also allows the coder to use a wrapper and call a function to compress the buffer. The output buffering allows for HTML header information to be put anywhere in an HTML file. The header information itself is not buffered.

The php.ini configuration file

PHP also sees a great improvement in its configuration file - the php.ini. Configuration is now a lot easier than with previous versions. The configuration can now be edited while running the Apache or a Windows server. The configuration directives added in the php.ini file are now supported automatically in all relevant modules. Constants and operations with constants is also something new to the php.ini.

PHP encryption

Data can now be safely encrypted with PHP. Besides using the mycript library and hash encryption, PHP 4 also supports several other methods for encryption: Blowfish, TripleDES, MD5, SHA1, etc.

Possible yet not recommended usage:*

<?php

// support for Boolean type

$myBool = false;

if($myBool)

echo "will never enter here";

else

echo "will print this";

// checks for equality in both the value and the type

if("12" === 12) echo "This can't happen!";

// OOP Programming

class myClass {

var myClassVar = 'my string';

// my class constructor

function myClass()

{

...

}

}

$obj = new myClass();

echo $obj->myClassVar; // will print 'my string'

here

// new built-in functions

include('html/my_html_file.html');

eval('echo \'My evaluated string here\'; exit();');

foreach($myArr as $key=>$value) echo "$key is $value";

unset($myVar1,$myVar2,$,myVar3); //destroy multiple vars

?>


PHP 4 with NTC Hosting

PHP v. 4 support is featured in all NTC web hosting plans. Furthermore, our advanced PHP settings manager interface enables our clients to easily switch between PHP v. 4, PHP v. 5 and the still developed PHP v. 6. This functionality makes our web hosting platform a perfect environment for quickly developing and interactively growing web sites that need to extend their compatibility to newer PHP versions.

If you are new to the PHP scene, and you are not sure which PHP version is the one you should use, check our PHP 4 & PHP 5 detailed comparison.


0 0