= 70000) { Tester\Environment::skip('mysql driver is not supported on PHP 7'); } $conn = new Dibi\Connection($config); function test(Closure $function) { $function(); } /** Replaces [] with driver-specific quotes */ function reformat($s) { global $config; if (is_array($s)) { if (isset($s[$config['system']])) { return $s[$config['system']]; } $s = $s[0]; } if ($config['system'] === 'mysql') { return strtr($s, '[]', '``'); } elseif ($config['system'] === 'postgre') { return strtr($s, '[]', '""'); } elseif (in_array($config['system'], ['odbc', 'sqlite', 'sqlsrv'])) { return $s; } else { trigger_error("Unsupported driver $config[system]", E_USER_WARNING); } } function num($n) { global $config; if (substr(@$config['dsn'], 0, 5) === 'odbc:' || $config['driver'] === 'sqlite') { $n = is_float($n) ? "$n.0" : (string) $n; } return $n; }