|
Posted by Andy Hassall on 12/19/06 22:53
On 19 Dec 2006 14:27:26 -0800, "johnny" <rampeters@gmail.com> wrote:
>I have the following PHP code. I am using PHP 5.1.6.
>
>$req =& new HTTP_Request($this->accessUrl);
>
>I am getting the following errors:
>Strict Standards: Assigning the return value of new by reference is
>deprecated in c:\mysite\lib\simpleTest.php on line 80
>
>Can anyone tell why is this? Does it mean assigning the return value
>of new by reference is not supported in PHP 5.1.6?
Objects are always passed by reference in PHP 5 hence the warning of
deprecation of the effective double-reference.
Obviously if you have to support PHP 4 then you must keep the & - in which
case you need to disable E_STRICT from error_reporting.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|