Re: unset a function?
| From: | Bas Jobsen | Date: | Wed, 30 Jan 2002 21:06:57 +0000 |
| Subject: | Re: unset a function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82817@lists.php.net to get a copy of this message | ||
Hi,
<?
function bas() {echo "hello 1";}
bas();
unset(bas);
function bas() {echo "hello 2";}
bas();
?>
output:
parse error, expecting
T_VARIABLE' or '$''
Op woensdag 30 januari 2002 21:51, schreef Rick Emery:
> what happened when you tried unset()?
>
> -----Original Message-----
> From: Bas Jobsen [mailto:bas@startpunt.cc]
> Sent: Wednesday, January 30, 2002 2:52 PM
> To: PHP List
> Subject: [PHP] unset a function?
>
>
> Hello,
>
> I have this:
> <?
> include("file1");
> function_somename();
> include("file2");
> function_somename();
> ?>
>
> file1 and contain a function definition, but the function in both files had
> the same name. This will give "Cannot redeclare ....". So can i unset the
> function before the second include?
>
> Tnx,
>
> Bas