Re: Converting from PHP4 to php5

From: Date: Fri, 03 Jun 2011 05:54:03 +0000
Subject: Re: Converting from PHP4 to php5
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-47831@lists.php.net to get a copy of this message
On Friday, June 3, 2011, Guru™ wrote; > I am not a master but as per my knowledge your software which is in PHP4 > should work properly in PHP5 too. --- It will provided that the scripts use none of the deprecated elements that were dropped in PHP5. For example, $HTTP_POST_VARS, which became deprecated in PHP4, was dropped in PHP5. To convert a PHP4 script that uses this to PHP5 you can either do a global search and replace or else include $HTTP_POST_VARS = $_POST at the head of the script. BTW, $HTTP_POST_VARS isn't the only one - I'm just using it as an example here. Best practice also changed. For example, mysql_escape_string() became deprecated in PHP5 and in its place the manual advises use of mysql_real_escape_string(). HTH, -- Geoff

« previous php.db (#47831) next »