$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)));
$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("Writing a record in test.characters with PK=1234 ≻", 'black', true);
$start = __LINE__;
$digest = $db->getKeyDigest("test", "characters", 1234);
$key = $db->initKey("test", "characters", $digest, true);
$put_vals = array("email" => "*****@*****.**", "name" => "Perceptron");
$status = $db->put($key, $put_vals);
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("Getting the record ≻", 'black', true);
$start = __LINE__;
$status = $db->get($key, $record);
if ($status == Aerospike::OK) {