Re: PHP 4.0 Bug #7113: count and pointers

From: Date: Wed, 11 Oct 2000 08:07:25 +0000
Subject: Re: PHP 4.0 Bug #7113: count and pointers
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34646@lists.php.net to get a copy of this message
At 08:34 10-10-00 -0700, chrisv@b0rked.dhs.org wrote:
At 14:05 12-10-00 +0200, Dhr. CaPS Cappert wrote:
Now why would you do
        $blah = count(&$data)
the '&' doesn't make sense here. The code above still wouldn't make it make sense. count() doesn't modify, NO SENSE in using it there.
Not about modify but about speed Giving count a pointer to a large var should be faster then giving count the large value of the var Wico PHP has no notion of a pointer, therefore it's not worth using &$data here.
If using references in php are not worth using them why the hell are they introduced then? Wico
http://www.php.net/manual/language.references.php Chris


« previous php.dev (#34646) next »