Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35441 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78679 invoked by uid 1010); 13 Feb 2008 10:17:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78664 invoked from network); 13 Feb 2008 10:17:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Feb 2008 10:17:48 -0000 Authentication-Results: pb1.pair.com header.from=jani.taskinen@sci.fi; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jani.taskinen@sci.fi; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sci.fi from 63.208.196.179 cause and error) X-PHP-List-Original-Sender: jani.taskinen@sci.fi X-Host-Fingerprint: 63.208.196.179 mho-02-bos.mailhop.org Received: from [63.208.196.179] ([63.208.196.179:52494] helo=mho-02-bos.mailhop.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/F3-42926-BC3C2B74 for ; Wed, 13 Feb 2008 05:17:47 -0500 Received: from [81.22.163.71] (helo=[10.6.109.198]) by mho-02-bos.mailhop.org with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.68) (envelope-from ) id 1JPEgS-0000ap-NY; Wed, 13 Feb 2008 10:17:45 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 81.22.163.71 X-Report-Abuse-To: abuse@dyndns.com (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/VYvaJ83d7CQ8NF+ULeyZe2VChMOTMGiY= Reply-To: jani.taskinen@iki.fi To: Felipe Pena Cc: Pierre Joye , internals@lists.php.net In-Reply-To: <1202897118.5384.5.camel@felipe> References: <1202861045.5872.37.camel@pena> <1202868491.5872.53.camel@pena> <1202897118.5384.5.camel@felipe> Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 Feb 2008 12:17:41 +0200 Message-ID: <1202897861.14383.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Math functions (new parameter parsing) From: jani.taskinen@sci.fi (Jani Taskinen) On Wed, 2008-02-13 at 08:05 -0200, Felipe Pena wrote: > Em Qua, 2008-02-13 =C3=A0s 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? >=20 > It changes the result when a string is given, and issue notice when the > string starts with numeric. >=20 > var_dump(acos("nonsense"));=20 > Warning: acos() expects parameter 1 to be double, string given ... > NULL >=20 > var_dump(acos("1000ABC")); > Notice: A non well formed numeric value encountered ... > float(NAN) # php -n -derror_reporting=3DE_ALL -r 'var_dump(acos("ABC"));' float(1.5707963267949) # php -n -derror_reporting=3DE_ALL -r 'var_dump(acos("100ABC"));' float(NAN) That's with PHP 5.2.5. I rather like the idea of these functions not doing magical conversion like this. --=20 Patches/Donations: http://pecl.php.net/~jani/