ID: 44270 Updated by: [EMAIL PROTECTED] Reported By: stein at visibone dot com -Status: Assigned +Status: Open Bug Type: MySQLi related Operating System: Win2K PHP Version: 5.2.5 Assigned To: andrey New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-07-25 17:40:17] stein at visibone dot com uw I can mostly buy what you're selling. Firstly, the doc should not lie, so changing the doc, or changing the code works for me. Secondarily, consistency is good, other things being equal. mysqli_info() should fail the same way as $mysqli->info I still slightly prefer the empty string because it fails a little more gently, and there are much less ill-mannered ways of checking for failure than comparing this field with NULL or ''. But I defer to whatever noble soul does the actual work. ------------------------------------------------------------------------ [2008-07-24 12:08:55] [EMAIL PROTECTED] The more I think about it, the better I like NULL. NULL will be used on the C-level, under the hood. false gets used in ext/mysql. And both NULL and false have a different meaning than empty string. An empty string means that there is some information - even if the string is empty. NULL means that no information is available. In any case the procedural and OO interface should return the same value. Comments? I don't mind the PHP manual much as its a very minor change which most people will not notice as NULL == '' is true. ------------------------------------------------------------------------ [2008-07-15 16:06:20] [EMAIL PROTECTED] ... and of course: free to fix for whoever comes first ------------------------------------------------------------------------ [2008-07-15 16:05:27] [EMAIL PROTECTED] Bug - I'll modify mysqi_info.phpt to cover this detail. ------------------------------------------------------------------------ [2008-03-04 15:11:21] uwendel at mysql dot com Interesting question and good point. In real life only few people might notice the difference and cast the return value to string, but good question... Please don't commit the change. I wonder if there are more such tiny differences. For example, I wonder if my mysqli_info.phpt test is correct. Let me check in more detail first before we change anything. Ulf ------------------------------------------------------------------------ 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/44270 -- Edit this bug report at http://bugs.php.net/?id=44270&edit=1