Add support for PHP 5.3: assign object to variable before using it