[Fwd: [PHP-DEV] 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:43:19 +0000 |
| Subject: | [Fwd: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] [RESENT] [PATCH] Allow constants / expressions to be passed by reference]] | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-84535@lists.php.net to get a copy of this message | ||
Hamster ate my mail? Resent, just in case.
Sebastian Bergmann wrote:
> 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/