ID: 30419 Updated by: [EMAIL PROTECTED] Reported By: m dot konings at knowmany dot nl -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows XP SP2 PHP Version: 4.3.8 New Comment:
All fixed! Previous Comments: ------------------------------------------------------------------------ [2004-10-13 13:26:39] [EMAIL PROTECTED] True, but it should be done here becuase it makes the function behave in two TOTALLY different ways. ------------------------------------------------------------------------ [2004-10-13 13:23:47] [EMAIL PROTECTED] I'm not sure I agree with that. Almost all the functions take scalar values, but the prefered (or optimal) is listed. PHP is loosely typed, I can't think of many situations were "1" instead of 1 will not work as expected (there are a few of course), I don't think these declarations should be changed to mixed either. ------------------------------------------------------------------------ [2004-10-13 09:59:27] [EMAIL PROTECTED] I agree with that, making it a documentation problem. ------------------------------------------------------------------------ [2004-10-13 09:30:33] m dot konings at knowmany dot nl Thanks for the explanation. Although I feel that in this case the documenation should reflect that strpos() takes a mixed needle variable type, not a string. There are lots of other PHP functions that take mixed variable types as parameter, and for those, the manual states so in the function declaration. ------------------------------------------------------------------------ [2004-10-13 09:24:24] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php See the manual (http://php.net/strpos): If needle is not a string, it is converted to an integer and applied as the ordinal value of a character. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/30419 -- Edit this bug report at http://bugs.php.net/?id=30419&edit=1
