Hi Christian, On Tue, Mar 4, 2008 at 3:17 PM, Christian Schneider <[EMAIL PROTECTED]> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php