note 117154 added to sqlite3result.fetcharray

From: Date: Wed, 22 Apr 2015 22:06:34 +0000
Subject: note 117154 added to sqlite3result.fetcharray
Groups: php.notes 
Request: Send a blank email to php-notes+get-202325@lists.php.net to get a copy of this message
The 'fetchArray' seems to return NULL not false when eof. <?php $db = new SQLite3('database'); $r = $db->query("select name from test where rowid=1"); list($name) = $r->fetchArray(SQLITE3_NUM); var_dump($name); list($name) = $r->fetchArray(SQLITE3_NUM); echo $name === false ? "FALSE\n" : "NOT FALSE\n"; var_dump($name); ?> The output is: NOT FALSE string(11) "Some String" NULL While NULL does evaluate to FALSE in '$fname == false' it is NOT false. ---- Server IP: 72.52.91.14 Probable Submitter: 50.134.162.215 ---- Manual Page -- http://php.net/manual/en/sqlite3result.fetcharray.php Edit -- https://master.php.net/note/edit/117154 Del: integrated -- https://master.php.net/note/delete/117154/integrated Del: useless -- https://master.php.net/note/delete/117154/useless Del: bad code -- https://master.php.net/note/delete/117154/bad+code Del: spam -- https://master.php.net/note/delete/117154/spam Del: non-english -- https://master.php.net/note/delete/117154/non-english Del: in docs -- https://master.php.net/note/delete/117154/in+docs Del: other reasons-- https://master.php.net/note/delete/117154 Reject -- https://master.php.net/note/reject/117154 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202325) next »