Posted by Robin on 10/10/06 18:28
Bit Byte wrote:
> 1). Is the function signature correct (valid syntax?)
Depends on your PHP-Version, i.e.:
PHP 4:
function foo(&$arr){}
PHP 4 knows nothing about visibilty and always passes by value, hence
the '&' to signal a pass-by-reference. Nice text about using objects
and references in PHP 4:
http://www.obdev.at/developers/articles/00002.html
PHP 5:
public function foo(array $arr){}
PHP 5 always passes by reference, so no '&' is needed.
Cheers
Robin
Navigation:
[Reply to this message]
|