Re: Math functions (new parameter parsing)

From: Date: Wed, 13 Feb 2008 10:16:49 +0000
Subject: Re: Math functions (new parameter parsing)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-35440@lists.php.net to get a copy of this message
On Feb 13, 2008 11:05 AM, Felipe Pena <felipensp@gmail.com> wrote: > Em Qua, 2008-02-13 às 09:47 +0100, Pierre Joye escreveu: > > I can't test the patch right now but does it change the result or only raises > > a notice? > > It changes the result when a string is given, and issue notice when the > string starts with numeric. > > var_dump(acos("nonsense")); > Warning: acos() expects parameter 1 to be double, string given ... > NULL That's a BC but it seems to be sane to do it. It is amazing that the current version returns acos(0) (obvious but still amazing :). > var_dump(acos("1000ABC")); > Notice: A non well formed numeric value encountered ... > float(NAN) No BC here, as far as I can tell. It returns the same result as before. Thanks for your great work! :) -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#35440) next »