Re: Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]
| From: | Sebastian Bergmann | Date: | Wed, 29 May 2002 16:01:42 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference] | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84532@lists.php.net to get a copy of this message | ||
brad lafountain wrote:
> function foo(&$bar = null)
> {
> }
This has already been "fixed" for the Zend Engine 2:
* Parameters that are passed by reference to a function
may now have default values.
Example:
<?php
function my_function(&$var = null) {
if ($var === null) {
die('$var needs to have a value');
}
}
?>
(Source: /ZendEngine2/ZEND_CHANGES)
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/