Date: 11/23/00
- Next message: Ignacio Vazquez-Abrams: "Re: [PHP-DEV] Passing-by-reference"
- Previous message: André Langhorst: "Re: [PHP-DEV] Re: output buffering"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Next in thread: Ignacio Vazquez-Abrams: "Re: [PHP-DEV] Passing-by-reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Receiving arguments by reference:
> ----------------------------------------
> Three ways of passing an argument to a function which wants to receive
> its argument by reference:
> a) foo($a) // Passing a variable
> b) foo(new foo()) // Passing a newly created object
> c) foo(MyFactory()) // Where MyFactory() is explicitly defined to return
> the return value by reference, which is done by defining it as "function
> &MyFactor(){...}"
>
> ALL OTHER ARGUMENT PASSING RESULTS IN UNDEFINED BEHAVIOR!
*anyone* should be able to understand this and avoid that "undefined
behaviour"!
but it would be interesting what *could* happen... if just copied, fine
andré
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ignacio Vazquez-Abrams: "Re: [PHP-DEV] Passing-by-reference"
- Previous message: André Langhorst: "Re: [PHP-DEV] Re: output buffering"
- In reply to: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Next in thread: Ignacio Vazquez-Abrams: "Re: [PHP-DEV] Passing-by-reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

