public function startQuery($sql, array $params = null, array $types = null)
{
$this->start = microtime(true);
$this->sql = preg_replace_callback("/\\?/", function ($matches) use(&$params, &$types) {
$param = array_shift($params);
if (null === $param) {
return "NULL";
} else {
return "'" . $param . "'";
}
}, $sql);
}