What is Removed From PHP 6?

In this post I am going to show you which features are removed from major release of the PHP which is PHP 6. These features are removed based on various reasons like security, incompatibility, performance, etc..

Here is the list of those features:

1) Register Globals
2) Safe Mode
3) Magic Quotes
4) Long variables ($_HTTP_*_VARS)
5) ereg removed from core
6) Short Tags

Register Globals

Main reason to remove this is the security of the PHP. If the register global is set to On then it will set all EGPCS ( Environment, Get, Post, Cookie, Server ) variables as global variable without need of the single line of code.

So for example, if your url is like “http://domain.com/index.php?name=expert-developer”; then it will set $name as global and can be accessed in whole script.

This feature is set as deprecated in PHP 5.3 and going to be removed in PHP 6.

Safe Mode

Safe mode does a user check for the files that is opened by the process. It will check the user of the file and user who runs the process. Possible probles with safe mode due to this file check are as below:

1) File Uploads
2) File Modification features like copying, moving, rename, changing ownership and changing the permission can be done with the administrative permissions only.
3) You can not use exec() and system() functions, if safe mode is on.

This feature is set as deprecated in PHP 5.3 and going to be removed in PHP 6.

Magic Quotes

Magic Quotes is a features which will automatically perfom an addslashes opration to the GET, POST and COOKIE values. But this is not the full proof solution to the SQL Injection.

To know more, please check my article on Magic Quotes in PHP.

Long Variables

In earlier verison of PHP POST and GET variables are accessed using the $HTTP_POST_VARS and $HTTP_GET_VARS respectively.

But after the introduction of PHP 4.1.0, these long variables are no longer used.

So, PHP 6 is going to remove the support for these Long Varibales.


ereg matches the string based on given regular expression in case sensitive manner.

preg_match() is become an alternative to ereg(), preg_match() is faster in terms of execution of the program than ereg().

This function is set as deprected in PHP 5.3 and going to be removed from PHP 6.

Short Tag

Short tag is method of printing variable in short manner.

Below both codes are same if short tag is enabled.

  <?php echo $name;?>

But it is not good to rely on this feature because configuration of the PHP can be different from one server to another. Because this can be disabled from PHP.ini.


What you think which feature should be removed and any other feature you wish to have in PHP 6? Yes we know that PHP people will not going consider our wishes from here. But as I say it is good to share.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: