title: MySQL decimal fields returned as strings in PHP
body: <p>By default mysqli returns all values as strings, the <code>MYSQLI_OPT_INT_AND_FLOAT_NATIVE</code> option allows you to convert ints and floats to their appropriate types. Though this does not affect decimal fields.</p>
  
  <p>Is there a way to automatically cast all decimal fields to a php float type without manually calling <code>$value = (float) $row-&gt;some_decimal_field</code>?</p>