Re: Function parameter passed by reference with default value to null
| From: | Lupus Michaelis | Date: | Mon, 06 Jul 2009 09:47:48 +0000 |
| Subject: | Re: Function parameter passed by reference with default value to null | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294935@lists.php.net to get a copy of this message | ||
Stuart a écrit :
You appear to be using the definition of null that comes from the world of C.I didn't. The point is I'm allowed to set a default value to null for a referenced parameter (what I can do in C for a pointer, so I knew it). I'm happy PHP raises an error on foo(null) ; I'm in trouble when foo() doesn't. The actual question is : why PHP doesn't raise an error ? -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org Seeking for a position <http://lupusmic.org/pro/>