Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9542 invoked from network); 4 Mar 2008 14:29:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2008 14:29:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.188 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.188 rv-out-0910.google.com Received: from [209.85.198.188] ([209.85.198.188:32721] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/E5-13488-CAC5DC74 for ; Tue, 04 Mar 2008 09:29:02 -0500 Received: by rv-out-0910.google.com with SMTP id k15so595093rvb.23 for ; Tue, 04 Mar 2008 06:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=w6ld6NAPABhiz+XnvjslZO4RqgCpKjBQGZxRrj5XjSw=; b=hMNb4tSNwEA0JOHYRFD/W13M1I3EI7Lth4m6hqXFV94o5It1oj30mmHvQ+uLJtT9Nim8fjU6D2FU12l+zD+T+po0F82ITwYRpwYfgOffEqimGv8n9MmFM0jkQvqQo+TILPdAwWAVy5+ehIkZTKdr39t2eqqMj2Bl3b88O8/AhuM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tiIv9AyQzEksmnK5LOLSjVRHZNuk+AjmLL/F8QXTzuvzk1uLin/wUU70GN0KyMfgvaVl4RNBrkPc/nt7wLB9udlaUOLuLeTEj37YdpDretMjVrm1aHwskJIOonsC0NQD4E7F9VKqkBN/JiPuzW/C7l9rD6cK57o/ce9ZMZKzB34= Received: by 10.141.27.16 with SMTP id e16mr596197rvj.259.1204640937649; Tue, 04 Mar 2008 06:28:57 -0800 (PST) Received: by 10.141.116.12 with HTTP; Tue, 4 Mar 2008 06:28:57 -0800 (PST) Message-ID: Date: Tue, 4 Mar 2008 15:28:57 +0100 To: "Christian Schneider" Cc: "PHP Developers Mailing List" In-Reply-To: <47CD59DD.8060208@cschneid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47CD59DD.8060208@cschneid.com> Subject: Re: [PHP-DEV] PHP6 & floatval() BC issue From: pierre.php@gmail.com ("Pierre Joye") Hi Christian, On Tue, Mar 4, 2008 at 3:17 PM, Christian Schneider wrote: > Hi all, > playing around with PHP 6 I noticed the following BC issue: > floatval("4.2foo") gives an E_NOTICE "A non well formed numeric value > encountered". The type casting (float)"4.2foo" still works as before. > > The change was introduced with the conversion of floatval() to > zend_parse_parameters with revision 1.43 of ext/standard/type.c on > 2006/09/24 18:23:47 by pollita (PHP6 Updates). > > In my opinion floatval() should be restored to the previous behavour > because a) the documentation for floatval itself uses a non well formed > value in the example and b) to keep it the same as type casting to (float). If we keep this behavior (I don't understand this change), it would be better to change (float) to behave like floatval, to be consistent. If we keep the (float) casting instead, then I agree with you, floatval notice should be removed. I prefer the second solution as it reduces the pain to migrate, if one likes to have strict validation or conversion it can rely on ext/filter. > Or would the proper procedure for me be to open a ticket in the bug tracker? It would help to do not forget this problem yes :) Thanks for your report! -- Pierre http://blog.thepimp.net | http://www.libgd.org