« Return to Thread: Function parameter passed by reference with default value to null

Re: Function parameter passed by reference with default value to null

by Lupus Michaelis-2 :: Rate this Message:

Reply to Author | View in Thread

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/>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 « Return to Thread: Function parameter passed by reference with default value to null