Convert PHP 5.3 code to PHP 5.1 code