final public static function pj(
		$retval, int $forbidden_code=null, int $cache=0
	) {
		$http_code = 200;
		if (!is_array($retval)) {
			$retval = [-1, null];
			$forbidden_code = 500;
		}
		if ($retval[0] !== 0) {
			$http_code = 401;
			if ($forbidden_code)
				$http_code = $forbidden_code;
		}
		if (!isset($retval[1]))
			$retval[1] = null;
		self::print_json($retval[0], $retval[1], $http_code, $cache);
	}