ID: 7878 Updated by: derick Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Documentation problem Operating system: PHP Version: 4.0.3pl1 Assigned To: Comments: I guess no-one had thoughts about this. What are we going to do with this one? Previous Comments: --------------------------------------------------------------------------- [2000-11-19 00:55:06] [EMAIL PROTECTED] The base argument for intval has no effect unless the first argument is a string. I am not sure what the best fix for this is: We could document that you should make the first argument a string to have the base argument used. We could convert the first argument to a string (using convert_to_string_ex) if there is a second argument That would mke calls made with base 10 would work as expected: intval (1000, 11); // Returns 1331 intval ('1000', 11); // Returns 1331 However, calls using other bases might seem a bit odd: intval ('077', 8); // returns 63 intval (077, 8); // returns 51 This would be because 077 is converted to 63, then the argument is converted to a string. Or we could add a warning if the first arg is not a string? Any thoughts?? --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=7878&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]