Re: Document call_time_pass_reference

From: Date: Thu, 05 Aug 2004 10:46:37 +0000
Subject: Re: Document call_time_pass_reference
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-11931@lists.php.net to get a copy of this message
l0t3k wrote: > in other (compiled) programming languages, a function prototype specifies > the "contract" between the function and its callers, and > makes explicit the programmer's intentions as to how the function is to be > called. Usually expected parameter types and passing methods specified by > the function as checked at compile-time to ensure that parameters passed to > the function are as expected. > in specifying a parameter as by-reference, the programmer makes it clear > that the function may modify the value of the parameter. In specifying the > parameter as by-value, s/he states that the passed in parameter will not > reflect any changes when the function returns. This is its "contract" with > the caller of the function. However, allowing call_time_pass_reference > violates this by bypassing the programmer's explicit intention in not > declaring a parameter by reference. Thanks for thorough explanation. I already thought about it, came to the same conclusion and documented it. Jakub Vrana

« previous php.internals (#11931) next »