Re: prob. with function parameter with "&"

From: Date: Tue, 12 Aug 2003 17:27:14 +0000
Subject: Re: prob. with function parameter with "&"
Groups: php.general 
Request: Send a blank email to php-general+get-159303@lists.php.net to get a copy of this message
You cannot pass NULL, where a 'reference' was exptected, it is not legal. Just as any other constant. NULL is a constant. function myfunc(&$p) { ... } $v = NULL; // passing NULL myfunc($x); Mukul Sabharwal http://www.devhome.org ----- Original Message ----- From: "Mirek Novak" <mirek.novak@auto.cz> To: "PHP List" <php-general@lists.php.net> Sent: Tuesday, August 12, 2003 12:06 PM Subject: [PHP] prob. with function parameter with "&" > Hi everybody, > > I have defined function > > function func ($var,$val,&$struct){ > // do something > } > > if I call this function following way > > func('a','b',NULL); > ===== Mukul Sabharwal (mjsabby@yahoo.com) __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

« previous php.general (#159303) next »