Re: [PHP-DEV] [RFC] Binary String Comparison

[email protected] (Johannes Schlüter)
Newsgroups php.internals
Message-ID <1408376583.2617.357.camel@guybrush>
On Mon, 2014-08-18 at 17:30 +0200, Johannes Schlüter wrote:
>    foreach ($db->query("SELECT id, title FROM entries") as $row) {
>        echo "<tr><td";
>        if ($row[0] == $_GET['highlight_id']) {
>            echo " background='#ff0000'";
>        }
>        echo ">".htmlentities($row[1])."</td></tr>";
>    }
> 
> will suddenly fail. How wonderful! (irony)

Just to make this more fun: Assume $db is PDO then the behavior will
depend on the driver (and for some drivers even at the configuration,
i.e. setting of PDO::ATTR_EMULATE_PREPARES with MySQL) what will happen.

johannes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.