News Archive
PhpRiot Newsletter
Your Email Address:

More information

Moving to PHP 5.3

Note: This article was originally published at Planet PHP on 6 January 2011.
Planet PHP

Now that PHP 5.2 is at the end of life, we are starting to migrate to PHP 5.3.

Here are some of my experiences with our code:

  • The function session_register() is now deprecated. We have created a wrapper function called _session_register with the same functionality. //------------------------------------------- // php 5.3 compat version of session_register function _session_register($v) { global $$v; if (!isset($_SESSION[$v])) { if (!isset($$v)) $$v = null; $_SESSION[$v] =& $$v; } else $$v =& $_SESSION[$v]; }
  • Legacy PHP4 code with$obj = &new ClassName();has to be converted to$obj = new ClassName();
  • Lots of other functions have been deprecated, including split(), ereg(), etc. See PHP 5.3 Manual, Deprecated Features.