PHPjabbers - tools for webmasters
shopping cart (0 item)
HOME
PRODUCTS
PHP TUTORIALS
PHP FORUM
ABOUT US
CONTACT US
Our products

The future with PHP version 6

posted on November 5, 2008, 11:28 am
Comments: 0

The latest version of PHP – V6, has new features and syntax upgrades which will facilitate its use from an object’s point of view. Besides, PHP V6 is intended for better international assistance because many of the key functions have Unicode support.

PHP is familiar worldwide and is used in most domains and web companies. The forthcoming PHP edition presents new features that will make PHP either safer or more functional. The question is whether your programming code will work smoothly if you decide to upgrade.
PHP V6 support for Unicode strings in great part of the major functions is significant since it will make it possible for PHP to support more characters for international support. Now developers who have used another programming language due to its wider international support may consider PHP implementing.

A means of preventing confrontations of names between functions and classes and avoiding the inconvenient use of prefixes in naming conventions is namespaces. They allow you to have the same class names as other users without encountering any troubles. Moreover, it is not necessary to make any changes in your code if it doesn’t have namespaces. No matter what your present PHP code is, it will operate absolutely normally.

The influence of PHP V6 language and syntax on you is dependant on what your scripts are now and how you use PHP. The characteristics listed below let you implement Web 2.0 features into your PHP application.

SOAP is one of the protocols Web services use which is supported in many languages (e.g. Java and Microsoft®.NET). SOAP is not the only existing option for Web services realization, but it makes it possible for various platforms to work together. Apart from SOAP modules in the PHP Extension and Application Repository (PEAR) library, a SOAP extension was brought in V5. However, you or your Internet Service Provider must enable the extension. There is also an option that helps you make SOAP clients and servers – SOAP package.

Provided that you don’t alter the default, you will have SOAP extension working for you in V6. These extensions facilitate you to realize SOAP servers and clients, which on its part assists you in creating PHP applications that offer and use web services.  
Regarding PHP V5.1, XMLReader and XMLWriter have been present in the PHP basis helping you work with XML in your PHP applications. This is another good feature in case you use SOAP or XML since PHP V6 will certainly be more suitable for you in comparison to V4.

It is possible for you to read and write XML without troubling with XML details due to the XMLWriter and XMLReader which are object-oriented classes.

PHP V6 possesses many new characteristics. Apart from them, some other functions existing in the previous editions have been removed. Some of them (e.g. register_globals and safe_mode) are considered to pose security risks. The features described below are eliminated from PHP with the purpose of refining it. Although it may happen that some existing scripts disrupt after upgrade to PHP V6, the most important thing is that PHP developers offer a more secure and orderly implementation.

Magic-quotes are completely eliminated from PHP V6. The reasons for this are problems with efficiency and inconvenience. Hence, you have to bear in mind that your code does not use magic_quotes before you set to upgrading to PHP V6. For example, instead of using magic_quotes for escaping strings for database calls, you can use either your database implementation's parameterized queries or the escape function (e.g. mysql_escape_string for MySQL and pg_escape_string for PostgreSQL).

Since some of the characteristics are present in PHP V5.3 which was issued in the beginning of 2008, you may chose first to upgrade to V5.3. Thus, the next step of switching to PHP V6 will be less drastic.

PHP V6 will provide you with numerous good new or improved features. If you want to be sure that your applications will be supported, you can download developer versions of PHP V6 to see how your applications will be influenced. Besides, you can prepare your scripts and eliminate the functions described above that will be removed from the new version.