$key) { if (is_callable($key)) { $item[$index] = call_user_func($key, $val); } elseif (is_int($index)) { $item[$key] = $val[$key]; } else { $item[$key] = $val[$index]; } } return $item; }, $arr); if (!empty($key)) { $result = array_combine(array_column($arr, 'id'), $result); } return $result; } function array_value_sort(array $arr) { foreach ($arr as &$value) { sort($value); } } function query_mysql_connection_id(ConnectionInterface $connect): int { $cid = $connect->query('SELECT CONNECTION_ID() as cid')[0]['cid']; return (int) $cid; } function mysql_kill_connection(string $name, $cid) { Db::connect($name)->execute("KILL {$cid}"); }