How to get a variable's byte count?
<p>In PHP, read binary data from MySQL, how to get binary data's length?</p>

<p>For example:</p>

<pre><code>   $sql = "SELECT * FROM test WHERE id = 2";
   $result = mysql_query($sql, $connection);

   if(!$result)
   {
       echo "Execute query failed!";
       exit;
   }

   $row = mysql_fetch_assoc($result));
   // $row["col_varbinary"] is binary data, how to get this data's length?
</code></pre>
