Re: Converting from PHP4 to php5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux