Re: [PHP4BETA] Re: [PHP-DEV] PHP 4.0 Bug #3054: func_num_args() returns incorrect value
| From: | Andi Gutmans | Date: | Tue, 28 Dec 1999 20:18:00 +0000 |
| Subject: | Re: [PHP4BETA] Re: [PHP-DEV] PHP 4.0 Bug #3054: func_num_args() returns incorrect value | ||
| References: | 1 | Groups: | php.dev php.version4 |
| Request: | Send a blank email to php-dev+get-14106@lists.php.net to get a copy of this message | ||
Ok we think we know what the problem is.
We'll check it out.
Andi
On Tue, 28 Dec 1999, Thies C. Arntzen wrote:
> On Tue, 28 Dec 1999, Andi Gutmans wrote:
>
> > On Tue, 28 Dec 1999, Thies C. Arntzen wrote:
> >
> > > you found a bug!
> > >
> > > <?
> > > function test()
> > > {
> > > var_dump(func_num_args());
> > > printf("%d <BR>\n",func_num_args());
> > > }
> > > test(1);
> > > ?>
> > >
> > > prints:
> > > int(1)
> > > 1487744 <BR>
> > >
> > > seems that the argument_stack is confused - zeev, andi?
> >
> > Looks like a bug in printf unless you can reproduce this with another
> > function besides printf. I can't!
>
> you haven't tried hard enough:-))
>
> <? var_dump(max(1,func_num_args())); ?>
>
> prints:
>
> int(1464792)
>
> so there's some problem in using func_num_args() in a function call! works
> fine in an assignment.
>
> tc
>
> >
> > This is probably some kind of bug with printf.
> > Looks like a job for Stig :) He's the printf guy.
> >
> > Andi
> >
> >
> > --
> > PHP 4.0 Beta Mailing List
> > <http://www.php.net/version4/>
> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> > For additional commands, e-mail: php4beta-help@lists.php.net
> > To contact the list administrators, e-mail: php4beta-admin@lists.php.net
> >
> >
>
>
> Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
> Digital Collections Phone +49 40 235350 Fax +49 40 23535180
> Hammerbrookstr. 93 20097 Hamburg / Germany
>