On Fri, 06 Aug 2010 15:50:33 +0100, Ralph Schindler <ra...@smashlabs.com>
wrote:
The attached patch is the suggested fix. I made this against master on
github.
In my opinion, it would make more sense, as was already suggested before,
to require the return to be passed by reference only if the prototype
specifies it should be passed by reference. This could be argued to be a
form of return contravariance.
As a bonus, it would be consistent with the "pass_rest_by_reference" flag
check:
if (proto->common.pass_rest_by_reference
&& !fe->common.pass_rest_by_reference) {
return 0;
}
//if (fe->common.return_reference != proto->common.return_reference) {
if (proto->common.return_reference && !fe->common.return_reference) {
return 0;
}
--
Gustavo Lopes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php