Using old code with new versions of PHP

For more details on these changes, see the section on predefined variables and links therein.