PHP6 & floatval() BC issue

From: Date: Tue, 04 Mar 2008 14:17:01 +0000
Subject: PHP6 & floatval() BC issue
Groups: php.internals 
Request: Send a blank email to internals+get-35945@lists.php.net to get a copy of this message
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). Or would the proper procedure for me be to open a ticket in the bug tracker? - Chris

« previous php.internals (#35945) next »