If you want to use PDO::FETCH_CLASS but don't like that all the values are of the type string, you can always use the __construct function of the class specified to convert them to a different type.
Another way is using mysqlnd, but it seems I had to recompile PHP for that.
<?php
class Cdr {
public $a; // int
public $b; // float
public $c; // string
public function __construct() {
$this->a = intval($this->a);
$this->b = floatval($this->b);
}
}
// ...
$arrCdrs = $objSqlStatement->fetchAll(PDO::FETCH_CLASS, 'Cdr');
?>