Migrating from PHP 5.2 to 5.3

Now PHP 5.2 has no longer support split and ereg function. Most of programmers are using these two functions .They should have go to each and every self-made function where these deprecated functions are used and replace them…

Notes: Don’t forget to enable error reporting…error_reporting(E_ALL & ~E_NOTICE)

List of updates :–

1. Do not use session_register(), session_is_registered() and session_unregister().you must have to replace with $_SESSION.

For example :- session_register($sValue) –>$_session[$sValue]

2. Replace Long array name with short name.

For example:-$HTTP_GET_VARS = $_GET

$HTTP_POST_VARS=$_POST

$HTTP_SERVER_VARS=$_SERVER etc……

3.  Assigning the return value of new by reference is deprecated” error

$this->metatags = & new products(…parameters…), $this); // <<— WRONG
$this->metatags = new products(…parameters…), $this); // <<— RIGHT

List of deprecated function in PHP.

http://us.php.net/manual/en/reference.pcre.pattern.posix.php

List of POSIX to PCRE regex conversions and their equivalent functions in 5.3 .Most of global function and INI configuration.

http://us.php.net/manual/en/reference.pcre.pattern.posix.php

Hopefully you will get off 5.2 version of PHP.

This entry was posted in Categories, PHP. Bookmark the permalink.