Date: 11/23/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Previous message: Andi Gutmans: "[PHP-DEV] Passing-by-reference"
- In reply to: Andi Gutmans: "[PHP-DEV] Passing-by-reference"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 23 Nov 2000, Andi Gutmans wrote:
> a) Do you prefer to document the three ways which work foo($a), foo(bar())
> where bar() is defined as function which returns a reference, and foo(new
> testclass) and all the rest will be documented as undefined.
> b) Do you want to define the "undefined" behavior in some way, i.e., always
> create a copy of the returned data and pass it.
>
> Thanks,
> Andi
> ---
> Andi Gutmans <andi <email protected>>
> http://www.zend.com/
>
c) Throw an error. More than likely this will indicate a coding problem, and
just passing a copy will cause a developer to scratch her head and say
"WTF?" for several months while trying to figure out the problem(s). Leaving
behavior as undefined will just cause memory corruption problems for sloppy
developers, which is what we want to get away from in the first place.
-- Ignacio Vazquez-Abrams <ignacio <email protected>>-- 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: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Previous message: Andi Gutmans: "[PHP-DEV] Passing-by-reference"
- In reply to: Andi Gutmans: "[PHP-DEV] Passing-by-reference"
- Next in thread: Andi Gutmans: "Re: [PHP-DEV] Passing-by-reference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

