title: php pdo with native mysql driver ( mysqlnd ) - fetch data retaining native column type
body: <p>How can I fetch data from pdo-mysql retaining native type column of mysql?</p>
  
  <p>example: I retrieve some data from a table. This table contain id column that is a integer column. When fetch data from this table, php result array has that id field like a string, not integer.</p>
  
  <pre><code>array(3) { ["id"]=&gt; string(2) "11" 
             ["name"]=&gt; string(24) "test name"           
             ["surname"]=&gt; string(2) "test suname"
            }
  </code></pre>
  
  <p>I know that with mysqlnd driver I can obtain this as default type in php.</p>
  
  <p>I use php 5.3 and mysqlnd is enable:</p>
  
  <pre><code>shell$ php -i | grep -i mysql     
  
  MySQL Support =&gt; enabled
  Client API version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $
  mysql.allow_local_infile =&gt; On =&gt; On
  mysql.allow_persistent =&gt; On =&gt; On
  mysql.connect_timeout =&gt; 60 =&gt; 60
  mysql.default_host =&gt; no value =&gt; no value
  mysql.default_password =&gt; no value =&gt; no value
  mysql.default_port =&gt; 3306 =&gt; 3306
  mysql.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock
  mysql.default_user =&gt; no value =&gt; no value
  mysql.max_links =&gt; Unlimited =&gt; Unlimited
  mysql.max_persistent =&gt; Unlimited =&gt; Unlimited
  mysql.trace_mode =&gt; Off =&gt; Off
  mysqli
  MysqlI Support =&gt; enabled
  Client API library version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $
  mysqli.allow_local_infile =&gt; On =&gt; On
  mysqli.allow_persistent =&gt; On =&gt; On
  mysqli.default_host =&gt; no value =&gt; no value
  mysqli.default_port =&gt; 3306 =&gt; 3306
  mysqli.default_pw =&gt; no value =&gt; no value
  mysqli.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock
  mysqli.default_user =&gt; no value =&gt; no value
  mysqli.max_links =&gt; Unlimited =&gt; Unlimited
  mysqli.max_persistent =&gt; Unlimited =&gt; Unlimited
  mysqli.reconnect =&gt; Off =&gt; Off
  mysqlnd
  mysqlnd =&gt; enabled
  Version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $
  PDO drivers =&gt; mysql, sqlite, sqlite2
  pdo_mysql
  PDO Driver for MySQL =&gt; enabled
  Client API version =&gt; mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $
  pdo_mysql.default_socket =&gt; /var/mysql/mysql.sock =&gt; /var/mysql/mysql.sock
  </code></pre>
  
  <p>How can I fetch data with native type?</p>