If you’re planning to upgrade your PHP5.2 to 5.3, I’d suggest you to review your web apps beforehand. Today I was testing this new version, and some of the deprecated functions - which were to be removed only in PHP6 – are already launching error messages: At first, it is necessary to substitute all ocurrences of “<?” for it’s official equivalent “<?php“. And of course, the shorthand “<?=” must be turned into “<?php echo” The other problem is ereg* and eregi*, the deprecated regex functions, which should be replaced with their preg* equivalents. I will try to list here some of the equivalences and when possible, the regex conversion shortcuts, if any. (There’s a good article on converting these functions at http://brownfox.org/ebooks/webP/pcook/ch13_02.htm)
Conversion table for ereg* to preg* functions:
| ereg* | perl regex (preg*.) |
|---|---|
| ereg / eregi | preg_match |