$HOST_PORT = isset($args["p"]) ? (int) $args["p"] : (isset($args["port"]) ? (string) $args["port"] : 3000);
echo colorize("Connecting to the host ≻", 'black', true);
$start = __LINE__;
$config = array("hosts" => array(array("addr" => $HOST_ADDR, "port" => $HOST_PORT)), "user" => "admin", "pass" => "admin");
$db = new Aerospike($config, false);
if (!$db->isConnected()) {
    echo fail("Could not connect to host {$HOST_ADDR}:{$HOST_PORT} [{$db->errorno()}]: {$db->error()}");
    exit(1);
}
echo success();
if (isset($args['a']) || isset($args['annotate'])) {
    display_code(__FILE__, $start, __LINE__);
}
echo colorize("Creating a user ≻", 'black', true);
$start = __LINE__;
$status = $db->createUser("example_user", "example_pass", array("read"));
sleep(1);
if ($status == Aerospike::OK) {
    echo success();
} else {
    echo standard_fail($db);
}
if (isset($args['a']) || isset($args['annotate'])) {
    display_code(__FILE__, $start, __LINE__);
}
echo colorize("Creating a role ≻", 'black', true);
$start = __LINE__;
$status = $db->createRole("example_role", array(array("code" => Aerospike::READ_WRITE, "ns" => "test", "set" => "demo")));
sleep(1);
if ($status == Aerospike::OK) {
    echo success();