Re: Redeclare a Function
| From: | Joffrey van Wageningen | Date: | Tue, 13 Nov 2001 13:32:41 +0000 |
| Subject: | Re: Redeclare a Function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74425@lists.php.net to get a copy of this message | ||
its possible to create lambda-style functions with create_function() and
redeclare the variable functions
---
$funct = create_function('$x', 'return ++$x;');
echo $funct(10);
$funct = create_function('$x', 'return --$x;');
echo $funct(10);
---
its fun to create array's of functions :) try it :P
with kind regards,
Joffrey van Wageningen
On Tue, 13 Nov 2001, Andrey Hristov wrote:
> I think it's not possible.
>
> Andrey Hristov
> IcyGEN Corporation
> http://www.icygen.com
> BALANCED SOLUTIONS
>
>
> ----- Original Message -----
> From: "Michael Cronström" <php@zoon.se>
> To: <php-general@lists.php.net>
> Sent: Tuesday, November 13, 2001 3:13 PM
> Subject: [PHP] Redeclare a Function
>
>
> Hi everybody,
>
> I would like to "declare/redeclare" a function twice in the same doc. Is it
> possible to "unset/undeclare" the function and include it again a second
> time? I have searched the manual but can´t find anything useful, any ideas?
>
> TIA
> Michael
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
>
>