PK       ! a   a     php.ininu         [PHP]
post_max_size = 100M
upload_max_filesize = 100M
variables_order = EGPCS
pcov.directory = .
PK       ! ޒ}  }  
  Dockerfilenu         FROM ubuntu:22.04

LABEL maintainer="Taylor Otwell"

ARG WWWGROUP
ARG NODE_VERSION=20
ARG POSTGRES_VERSION=15

WORKDIR /var/www/html

ENV DEBIAN_FRONTEND noninteractive
ENV TZ=UTC
ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80"
ENV SUPERVISOR_PHP_USER="sail"

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update \
    && mkdir -p /etc/apt/keyrings \
    && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch ffmpeg nano \
    && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
    && echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
    && apt-get update \
    && apt-get install -y php8.1-cli php8.1-dev \
       php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-imagick \
       php8.1-curl \
       php8.1-imap php8.1-mysql php8.1-mbstring \
       php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap \
       php8.1-intl php8.1-readline \
       php8.1-ldap \
       php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole \
       php8.1-memcached php8.1-pcov php8.1-xdebug \
    && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
    && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
    && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
    && apt-get update \
    && apt-get install -y nodejs \
    && npm install -g npm \
    && npm install -g bun \
    && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null \
    && echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
    && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
    && echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
    && apt-get update \
    && apt-get install -y yarn \
    && apt-get install -y mysql-client \
    && apt-get install -y postgresql-client-$POSTGRES_VERSION \
    && apt-get -y autoremove \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.1

RUN groupadd --force -g $WWWGROUP sail
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail

COPY start-container /usr/local/bin/start-container
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
RUN chmod +x /usr/local/bin/start-container

EXPOSE 80/tcp

ENTRYPOINT ["start-container"]
PK       ! R;.  .    start-containernu         #!/usr/bin/env bash

if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then
    echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'."
    exit 1
fi

if [ ! -z "$WWWUSER" ]; then
    usermod -u $WWWUSER sail
fi

if [ ! -d /.composer ]; then
    mkdir /.composer
fi

chmod -R ugo+rw /.composer

if [ $# -gt 0 ]; then
    if [ "$SUPERVISOR_PHP_USER" = "root" ]; then
        exec "$@"
    else
        exec gosu $WWWUSER "$@"
    fi
else
    exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
fi
PK       ! FQ  Q    supervisord.confnu         [supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid

[program:php]
command=%(ENV_SUPERVISOR_PHP_COMMAND)s
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
PK       ! 3"      errorfunc.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ErrorfuncException;

/**
 * @param string $message
 * @param 0|1|2|3|4 $message_type
 * @param string $destination
 * @param string $extra_headers
 * @throws ErrorfuncException
 *
 */
function error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $extra_headers = null): void
{
    error_clear_last();
    if ($extra_headers !== null) {
        $safeResult = \error_log($message, $message_type, $destination, $extra_headers);
    } elseif ($destination !== null) {
        $safeResult = \error_log($message, $message_type, $destination);
    } else {
        $safeResult = \error_log($message, $message_type);
    }
    if ($safeResult === false) {
        throw ErrorfuncException::createFromPhpError();
    }
}
PK       ! I:B	  B	    zip.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ZipException;

/**
 * @param resource $zip_entry
 * @throws ZipException
 *
 */
function zip_entry_close($zip_entry): void
{
    error_clear_last();
    $safeResult = \zip_entry_close($zip_entry);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
}


/**
 * @param resource $zip_entry
 * @return int
 * @throws ZipException
 *
 */
function zip_entry_compressedsize($zip_entry): int
{
    error_clear_last();
    $safeResult = \zip_entry_compressedsize($zip_entry);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $zip_entry
 * @return string
 * @throws ZipException
 *
 */
function zip_entry_compressionmethod($zip_entry): string
{
    error_clear_last();
    $safeResult = \zip_entry_compressionmethod($zip_entry);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $zip_entry
 * @return int
 * @throws ZipException
 *
 */
function zip_entry_filesize($zip_entry): int
{
    error_clear_last();
    $safeResult = \zip_entry_filesize($zip_entry);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $zip_entry
 * @return string
 * @throws ZipException
 *
 */
function zip_entry_name($zip_entry): string
{
    error_clear_last();
    $safeResult = \zip_entry_name($zip_entry);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $zip_dp
 * @param resource $zip_entry
 * @param string $mode
 * @throws ZipException
 *
 */
function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void
{
    error_clear_last();
    $safeResult = \zip_entry_open($zip_dp, $zip_entry, $mode);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
}


/**
 * @param resource $zip_entry
 * @param int $len
 * @return string
 * @throws ZipException
 *
 */
function zip_entry_read($zip_entry, int $len = 1024): string
{
    error_clear_last();
    $safeResult = \zip_entry_read($zip_entry, $len);
    if ($safeResult === false) {
        throw ZipException::createFromPhpError();
    }
    return $safeResult;
}
PK       !        spl.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SplException;

/**
 * @param object|string $object_or_class
 * @param bool $autoload
 * @return array
 * @throws SplException
 *
 */
function class_implements($object_or_class, bool $autoload = true): array
{
    error_clear_last();
    $safeResult = \class_implements($object_or_class, $autoload);
    if ($safeResult === false) {
        throw SplException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param object|string $object_or_class
 * @param bool $autoload
 * @return array
 * @throws SplException
 *
 */
function class_parents($object_or_class, bool $autoload = true): array
{
    error_clear_last();
    $safeResult = \class_parents($object_or_class, $autoload);
    if ($safeResult === false) {
        throw SplException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param object|string $object_or_class
 * @param bool $autoload
 * @return array
 * @throws SplException
 *
 */
function class_uses($object_or_class, bool $autoload = true): array
{
    error_clear_last();
    $safeResult = \class_uses($object_or_class, $autoload);
    if ($safeResult === false) {
        throw SplException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param callable(string):void|null $callback
 * @param bool $throw
 * @param bool $prepend
 * @throws SplException
 *
 */
function spl_autoload_register(?callable $callback = null, bool $throw = true, bool $prepend = false): void
{
    error_clear_last();
    if ($prepend !== false) {
        $safeResult = \spl_autoload_register($callback, $throw, $prepend);
    } elseif ($throw !== true) {
        $safeResult = \spl_autoload_register($callback, $throw);
    } elseif ($callback !== null) {
        $safeResult = \spl_autoload_register($callback);
    } else {
        $safeResult = \spl_autoload_register();
    }
    if ($safeResult === false) {
        throw SplException::createFromPhpError();
    }
}


/**
 * @param mixed $callback
 * @throws SplException
 *
 */
function spl_autoload_unregister($callback): void
{
    error_clear_last();
    $safeResult = \spl_autoload_unregister($callback);
    if ($safeResult === false) {
        throw SplException::createFromPhpError();
    }
}
PK       !       uopz.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\UopzException;

/**
 * @param string $class
 * @param string $parent
 * @throws UopzException
 *
 */
function uopz_extend(string $class, string $parent): void
{
    error_clear_last();
    $safeResult = \uopz_extend($class, $parent);
    if ($safeResult === false) {
        throw UopzException::createFromPhpError();
    }
}


/**
 * @param string $class
 * @param string $interface
 * @throws UopzException
 *
 */
function uopz_implement(string $class, string $interface): void
{
    error_clear_last();
    $safeResult = \uopz_implement($class, $interface);
    if ($safeResult === false) {
        throw UopzException::createFromPhpError();
    }
}
PK       ! kD$      pcre.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PcreException;

/**
 * @param string $pattern
 * @param array $array
 * @param int $flags
 * @return array
 * @throws PcreException
 *
 */
function preg_grep(string $pattern, array $array, int $flags = 0): array
{
    error_clear_last();
    $safeResult = \preg_grep($pattern, $array, $flags);
    if ($safeResult === false) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param string $subject
 * @param array|null $matches
 * @param int $flags
 * @param int $offset
 * @return 0|positive-int
 * @throws PcreException
 *
 */
function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
    error_clear_last();
    $safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset);
    if ($safeResult === false) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param string $subject
 * @param null|string[] $matches
 * @param int $flags
 * @param int $offset
 * @return 0|1
 * @throws PcreException
 *
 */
function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): int
{
    error_clear_last();
    $safeResult = \preg_match($pattern, $subject, $matches, $flags, $offset);
    if ($safeResult === false) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $pattern
 * @param array|string $subject
 * @param int $limit
 * @param int|null $count
 * @param int $flags
 * @return array|string
 * @throws PcreException
 *
 */
function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, ?int &$count = null, int $flags = 0)
{
    error_clear_last();
    $safeResult = \preg_replace_callback_array($pattern, $subject, $limit, $count, $flags);
    if ($safeResult === null) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array|string $pattern
 * @param callable(array):string $callback
 * @param array|string $subject
 * @param int $limit
 * @param int|null $count
 * @param int $flags
 * @return array|string
 * @throws PcreException
 *
 */
function preg_replace_callback($pattern, callable $callback, $subject, int $limit = -1, ?int &$count = null, int $flags = 0)
{
    error_clear_last();
    $safeResult = \preg_replace_callback($pattern, $callback, $subject, $limit, $count, $flags);
    if ($safeResult === null) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param string $subject
 * @param int|null $limit
 * @param int $flags
 * @return list
 * @throws PcreException
 *
 */
function preg_split(string $pattern, string $subject, ?int $limit = -1, int $flags = 0): array
{
    error_clear_last();
    $safeResult = \preg_split($pattern, $subject, $limit, $flags);
    if ($safeResult === false) {
        throw PcreException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! Vu
  
    funchand.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FunchandException;

/**
 * @param callable(): void $callback
 * @param mixed $args
 * @throws FunchandException
 *
 */
function register_tick_function(callable $callback, ...$args): void
{
    error_clear_last();
    if ($args !== []) {
        $safeResult = \register_tick_function($callback, ...$args);
    } else {
        $safeResult = \register_tick_function($callback);
    }
    if ($safeResult === false) {
        throw FunchandException::createFromPhpError();
    }
}
PK       ! L9  9    rpminfo.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\RpminfoException;

/**
 * @param int $tag
 * @throws RpminfoException
 *
 */
function rpmaddtag(int $tag): void
{
    error_clear_last();
    $safeResult = \rpmaddtag($tag);
    if ($safeResult === false) {
        throw RpminfoException::createFromPhpError();
    }
}
PK       ! {    
  sqlsrv.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SqlsrvException;

/**
 * @param resource $conn
 * @throws SqlsrvException
 *
 */
function sqlsrv_begin_transaction($conn): void
{
    error_clear_last();
    $safeResult = \sqlsrv_begin_transaction($conn);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @throws SqlsrvException
 *
 */
function sqlsrv_cancel($stmt): void
{
    error_clear_last();
    $safeResult = \sqlsrv_cancel($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $conn
 * @return array
 * @throws SqlsrvException
 *
 */
function sqlsrv_client_info($conn): array
{
    error_clear_last();
    $safeResult = \sqlsrv_client_info($conn);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn
 * @throws SqlsrvException
 *
 */
function sqlsrv_close($conn): void
{
    error_clear_last();
    $safeResult = \sqlsrv_close($conn);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $conn
 * @throws SqlsrvException
 *
 */
function sqlsrv_commit($conn): void
{
    error_clear_last();
    $safeResult = \sqlsrv_commit($conn);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param string $setting
 * @param mixed $value
 * @throws SqlsrvException
 *
 */
function sqlsrv_configure(string $setting, $value): void
{
    error_clear_last();
    $safeResult = \sqlsrv_configure($setting, $value);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @throws SqlsrvException
 *
 */
function sqlsrv_execute($stmt): void
{
    error_clear_last();
    $safeResult = \sqlsrv_execute($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @param int $fetchType
 * @param int $row
 * @param int $offset
 * @return array|null
 * @throws SqlsrvException
 *
 */
function sqlsrv_fetch_array($stmt, ?int $fetchType = null, ?int $row = null, ?int $offset = null): ?array
{
    error_clear_last();
    if ($offset !== null) {
        $safeResult = \sqlsrv_fetch_array($stmt, $fetchType, $row, $offset);
    } elseif ($row !== null) {
        $safeResult = \sqlsrv_fetch_array($stmt, $fetchType, $row);
    } elseif ($fetchType !== null) {
        $safeResult = \sqlsrv_fetch_array($stmt, $fetchType);
    } else {
        $safeResult = \sqlsrv_fetch_array($stmt);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @param string $className
 * @param array $ctorParams
 * @param int $row
 * @param int $offset
 * @return null|object
 * @throws SqlsrvException
 *
 */
function sqlsrv_fetch_object($stmt, ?string $className = null, ?array $ctorParams = null, ?int $row = null, ?int $offset = null): ?object
{
    error_clear_last();
    if ($offset !== null) {
        $safeResult = \sqlsrv_fetch_object($stmt, $className, $ctorParams, $row, $offset);
    } elseif ($row !== null) {
        $safeResult = \sqlsrv_fetch_object($stmt, $className, $ctorParams, $row);
    } elseif ($ctorParams !== null) {
        $safeResult = \sqlsrv_fetch_object($stmt, $className, $ctorParams);
    } elseif ($className !== null) {
        $safeResult = \sqlsrv_fetch_object($stmt, $className);
    } else {
        $safeResult = \sqlsrv_fetch_object($stmt);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @param int $row
 * @param int $offset
 * @return bool|null
 * @throws SqlsrvException
 *
 */
function sqlsrv_fetch($stmt, ?int $row = null, ?int $offset = null): ?bool
{
    error_clear_last();
    if ($offset !== null) {
        $safeResult = \sqlsrv_fetch($stmt, $row, $offset);
    } elseif ($row !== null) {
        $safeResult = \sqlsrv_fetch($stmt, $row);
    } else {
        $safeResult = \sqlsrv_fetch($stmt);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @throws SqlsrvException
 *
 */
function sqlsrv_free_stmt($stmt): void
{
    error_clear_last();
    $safeResult = \sqlsrv_free_stmt($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @param int $fieldIndex
 * @param int $getAsType
 * @return mixed
 * @throws SqlsrvException
 *
 */
function sqlsrv_get_field($stmt, int $fieldIndex, ?int $getAsType = null)
{
    error_clear_last();
    if ($getAsType !== null) {
        $safeResult = \sqlsrv_get_field($stmt, $fieldIndex, $getAsType);
    } else {
        $safeResult = \sqlsrv_get_field($stmt, $fieldIndex);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @return bool|null
 * @throws SqlsrvException
 *
 */
function sqlsrv_next_result($stmt): ?bool
{
    error_clear_last();
    $safeResult = \sqlsrv_next_result($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @return int
 * @throws SqlsrvException
 *
 */
function sqlsrv_num_fields($stmt): int
{
    error_clear_last();
    $safeResult = \sqlsrv_num_fields($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @return int
 * @throws SqlsrvException
 *
 */
function sqlsrv_num_rows($stmt): int
{
    error_clear_last();
    $safeResult = \sqlsrv_num_rows($stmt);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn
 * @param string $sql
 * @param array $params
 * @param array $options
 * @return mixed
 * @throws SqlsrvException
 *
 */
function sqlsrv_prepare($conn, string $sql, ?array $params = null, ?array $options = null)
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \sqlsrv_prepare($conn, $sql, $params, $options);
    } elseif ($params !== null) {
        $safeResult = \sqlsrv_prepare($conn, $sql, $params);
    } else {
        $safeResult = \sqlsrv_prepare($conn, $sql);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn
 * @param string $sql
 * @param array $params
 * @param array $options
 * @return mixed
 * @throws SqlsrvException
 *
 */
function sqlsrv_query($conn, string $sql, ?array $params = null, ?array $options = null)
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \sqlsrv_query($conn, $sql, $params, $options);
    } elseif ($params !== null) {
        $safeResult = \sqlsrv_query($conn, $sql, $params);
    } else {
        $safeResult = \sqlsrv_query($conn, $sql);
    }
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn
 * @throws SqlsrvException
 *
 */
function sqlsrv_rollback($conn): void
{
    error_clear_last();
    $safeResult = \sqlsrv_rollback($conn);
    if ($safeResult === false) {
        throw SqlsrvException::createFromPhpError();
    }
}
PK       ! n~  ~  
  xmlrpc.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\XmlrpcException;

/**
 * @param \DateTime|string $value
 * @param string $type
 * @throws XmlrpcException
 *
 */
function xmlrpc_set_type(&$value, string $type): void
{
    error_clear_last();
    $safeResult = \xmlrpc_set_type($value, $type);
    if ($safeResult === false) {
        throw XmlrpcException::createFromPhpError();
    }
}
PK       ! _      json.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\JsonException;

/**
 * @param mixed $value
 * @param int $flags
 * @param positive-int $depth
 * @return non-empty-string
 * @throws JsonException
 *
 */
function json_encode($value, int $flags = 0, int $depth = 512): string
{
    error_clear_last();
    $safeResult = \json_encode($value, $flags, $depth);
    if ($safeResult === false) {
        throw JsonException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! Sg(  (    fpm.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FpmException;

/**
 * @throws FpmException
 *
 */
function fastcgi_finish_request(): void
{
    error_clear_last();
    $safeResult = \fastcgi_finish_request();
    if ($safeResult === false) {
        throw FpmException::createFromPhpError();
    }
}
PK       ! aeO  O  	  pcntl.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PcntlException;

/**
 * @param int|null $process_id
 * @param int $mode
 * @return int
 * @throws PcntlException
 *
 */
function pcntl_getpriority(?int $process_id = null, int $mode = PRIO_PROCESS): int
{
    error_clear_last();
    if ($mode !== PRIO_PROCESS) {
        $safeResult = \pcntl_getpriority($process_id, $mode);
    } elseif ($process_id !== null) {
        $safeResult = \pcntl_getpriority($process_id);
    } else {
        $safeResult = \pcntl_getpriority();
    }
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $priority
 * @param int|null $process_id
 * @param int $mode
 * @throws PcntlException
 *
 */
function pcntl_setpriority(int $priority, ?int $process_id = null, int $mode = PRIO_PROCESS): void
{
    error_clear_last();
    if ($mode !== PRIO_PROCESS) {
        $safeResult = \pcntl_setpriority($priority, $process_id, $mode);
    } elseif ($process_id !== null) {
        $safeResult = \pcntl_setpriority($priority, $process_id);
    } else {
        $safeResult = \pcntl_setpriority($priority);
    }
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
}


/**
 * @throws PcntlException
 *
 */
function pcntl_signal_dispatch(): void
{
    error_clear_last();
    $safeResult = \pcntl_signal_dispatch();
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
}


/**
 * @param int $signal
 * @param callable|int $handler
 * @param bool $restart_syscalls
 * @throws PcntlException
 *
 */
function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): void
{
    error_clear_last();
    $safeResult = \pcntl_signal($signal, $handler, $restart_syscalls);
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
}


/**
 * @param int $mode
 * @param array $signals
 * @param array|null $old_signals
 * @throws PcntlException
 *
 */
function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = null): void
{
    error_clear_last();
    $safeResult = \pcntl_sigprocmask($mode, $signals, $old_signals);
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
}


/**
 * @param array $signals
 * @param array|null $info
 * @param int $seconds
 * @param int $nanoseconds
 * @return int
 * @throws PcntlException
 *
 */
function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0, int $nanoseconds = 0): int
{
    error_clear_last();
    $safeResult = \pcntl_sigtimedwait($signals, $info, $seconds, $nanoseconds);
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $signals
 * @param array|null $info
 * @return int
 * @throws PcntlException
 *
 */
function pcntl_sigwaitinfo(array $signals, ?array &$info = []): int
{
    error_clear_last();
    $safeResult = \pcntl_sigwaitinfo($signals, $info);
    if ($safeResult === false) {
        throw PcntlException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! !P  P    imap.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ImapException;

/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_8bit(string $string): string
{
    error_clear_last();
    $safeResult = \imap_8bit($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $folder
 * @param string $message
 * @param null|string $options
 * @param null|string $internal_date
 * @throws ImapException
 *
 */
function imap_append(\IMAP\Connection $imap, string $folder, string $message, ?string $options = null, ?string $internal_date = null): void
{
    error_clear_last();
    if ($internal_date !== null) {
        $safeResult = \imap_append($imap, $folder, $message, $options, $internal_date);
    } elseif ($options !== null) {
        $safeResult = \imap_append($imap, $folder, $message, $options);
    } else {
        $safeResult = \imap_append($imap, $folder, $message);
    }
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_base64(string $string): string
{
    error_clear_last();
    $safeResult = \imap_base64($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_binary(string $string): string
{
    error_clear_last();
    $safeResult = \imap_binary($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param int $flags
 * @return string
 * @throws ImapException
 *
 */
function imap_body(\IMAP\Connection $imap, int $message_num, int $flags = 0): string
{
    error_clear_last();
    $safeResult = \imap_body($imap, $message_num, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param string $section
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_bodystruct(\IMAP\Connection $imap, int $message_num, string $section): \stdClass
{
    error_clear_last();
    $safeResult = \imap_bodystruct($imap, $message_num, $section);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_check(\IMAP\Connection $imap): \stdClass
{
    error_clear_last();
    $safeResult = \imap_check($imap);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $sequence
 * @param string $flag
 * @param int $options
 * @throws ImapException
 *
 */
function imap_clearflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): void
{
    error_clear_last();
    $safeResult = \imap_clearflag_full($imap, $sequence, $flag, $options);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_close(\IMAP\Connection $imap, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \imap_close($imap, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @throws ImapException
 *
 */
function imap_createmailbox(\IMAP\Connection $imap, string $mailbox): void
{
    error_clear_last();
    $safeResult = \imap_createmailbox($imap, $mailbox);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @throws ImapException
 *
 */
function imap_deletemailbox(\IMAP\Connection $imap, string $mailbox): void
{
    error_clear_last();
    $safeResult = \imap_deletemailbox($imap, $mailbox);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $sequence
 * @param int $flags
 * @return array
 * @throws ImapException
 *
 */
function imap_fetch_overview(\IMAP\Connection $imap, string $sequence, int $flags = 0): array
{
    error_clear_last();
    $safeResult = \imap_fetch_overview($imap, $sequence, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param string $section
 * @param int $flags
 * @return string
 * @throws ImapException
 *
 */
function imap_fetchbody(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string
{
    error_clear_last();
    $safeResult = \imap_fetchbody($imap, $message_num, $section, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param int $flags
 * @return string
 * @throws ImapException
 *
 */
function imap_fetchheader(\IMAP\Connection $imap, int $message_num, int $flags = 0): string
{
    error_clear_last();
    $safeResult = \imap_fetchheader($imap, $message_num, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param string $section
 * @param int $flags
 * @return string
 * @throws ImapException
 *
 */
function imap_fetchmime(\IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string
{
    error_clear_last();
    $safeResult = \imap_fetchmime($imap, $message_num, $section, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param int $flags
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_fetchstructure(\IMAP\Connection $imap, int $message_num, int $flags = 0): \stdClass
{
    error_clear_last();
    $safeResult = \imap_fetchstructure($imap, $message_num, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_gc(\IMAP\Connection $imap, int $flags): void
{
    error_clear_last();
    $safeResult = \imap_gc($imap, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @return array
 * @throws ImapException
 *
 */
function imap_getacl(\IMAP\Connection $imap, string $mailbox): array
{
    error_clear_last();
    $safeResult = \imap_getacl($imap, $mailbox);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $reference
 * @param string $pattern
 * @return array
 * @throws ImapException
 *
 */
function imap_getmailboxes(\IMAP\Connection $imap, string $reference, string $pattern): array
{
    error_clear_last();
    $safeResult = \imap_getmailboxes($imap, $reference, $pattern);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $reference
 * @param string $pattern
 * @return array
 * @throws ImapException
 *
 */
function imap_getsubscribed(\IMAP\Connection $imap, string $reference, string $pattern): array
{
    error_clear_last();
    $safeResult = \imap_getsubscribed($imap, $reference, $pattern);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int $message_num
 * @param int $from_length
 * @param int $subject_length
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_headerinfo(\IMAP\Connection $imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass
{
    error_clear_last();
    $safeResult = \imap_headerinfo($imap, $message_num, $from_length, $subject_length);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @return array
 * @throws ImapException
 *
 */
function imap_headers(\IMAP\Connection $imap): array
{
    error_clear_last();
    $safeResult = \imap_headers($imap);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $reference
 * @param string $pattern
 * @param string $content
 * @return array
 * @throws ImapException
 *
 */
function imap_listscan(\IMAP\Connection $imap, string $reference, string $pattern, string $content): array
{
    error_clear_last();
    $safeResult = \imap_listscan($imap, $reference, $pattern, $content);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $reference
 * @param string $pattern
 * @return array
 * @throws ImapException
 *
 */
function imap_lsub(\IMAP\Connection $imap, string $reference, string $pattern): array
{
    error_clear_last();
    $safeResult = \imap_lsub($imap, $reference, $pattern);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $envelope
 * @param array $bodies
 * @return string
 * @throws ImapException
 *
 */
function imap_mail_compose(array $envelope, array $bodies): string
{
    error_clear_last();
    $safeResult = \imap_mail_compose($envelope, $bodies);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $message_nums
 * @param string $mailbox
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_mail_copy(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \imap_mail_copy($imap, $message_nums, $mailbox, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $message_nums
 * @param string $mailbox
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_mail_move(\IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \imap_mail_move($imap, $message_nums, $mailbox, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param string $to
 * @param string $subject
 * @param string $message
 * @param null|string $additional_headers
 * @param null|string $cc
 * @param null|string $bcc
 * @param null|string $return_path
 * @throws ImapException
 *
 */
function imap_mail(string $to, string $subject, string $message, ?string $additional_headers = null, ?string $cc = null, ?string $bcc = null, ?string $return_path = null): void
{
    error_clear_last();
    if ($return_path !== null) {
        $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $return_path);
    } elseif ($bcc !== null) {
        $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc);
    } elseif ($cc !== null) {
        $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc);
    } elseif ($additional_headers !== null) {
        $safeResult = \imap_mail($to, $subject, $message, $additional_headers);
    } else {
        $safeResult = \imap_mail($to, $subject, $message);
    }
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_mailboxmsginfo(\IMAP\Connection $imap): \stdClass
{
    error_clear_last();
    $safeResult = \imap_mailboxmsginfo($imap);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @return array
 * @throws ImapException
 *
 */
function imap_mime_header_decode(string $string): array
{
    error_clear_last();
    $safeResult = \imap_mime_header_decode($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_mutf7_to_utf8(string $string): string
{
    error_clear_last();
    $safeResult = \imap_mutf7_to_utf8($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @return int
 * @throws ImapException
 *
 */
function imap_num_msg(\IMAP\Connection $imap): int
{
    error_clear_last();
    $safeResult = \imap_num_msg($imap);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $mailbox
 * @param string $user
 * @param string $password
 * @param int $flags
 * @param int $retries
 * @param array $options
 * @return \IMAP\Connection
 * @throws ImapException
 *
 */
function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []): \IMAP\Connection
{
    error_clear_last();
    $safeResult = \imap_open($mailbox, $user, $password, $flags, $retries, $options);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_qprint(string $string): string
{
    error_clear_last();
    $safeResult = \imap_qprint($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $from
 * @param string $to
 * @throws ImapException
 *
 */
function imap_renamemailbox(\IMAP\Connection $imap, string $from, string $to): void
{
    error_clear_last();
    $safeResult = \imap_renamemailbox($imap, $from, $to);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param null|string $mailbox
 * @param null|string $hostname
 * @param null|string $personal
 * @return string
 * @throws ImapException
 *
 */
function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string $personal): string
{
    error_clear_last();
    $safeResult = \imap_rfc822_write_address($mailbox, $hostname, $personal);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param int|resource|string $file
 * @param int $message_num
 * @param string $section
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_savebody(\IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0): void
{
    error_clear_last();
    $safeResult = \imap_savebody($imap, $file, $message_num, $section, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $quota_root
 * @param int $mailbox_size
 * @throws ImapException
 *
 */
function imap_set_quota(\IMAP\Connection $imap, string $quota_root, int $mailbox_size): void
{
    error_clear_last();
    $safeResult = \imap_set_quota($imap, $quota_root, $mailbox_size);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @param string $user_id
 * @param string $rights
 * @throws ImapException
 *
 */
function imap_setacl(\IMAP\Connection $imap, string $mailbox, string $user_id, string $rights): void
{
    error_clear_last();
    $safeResult = \imap_setacl($imap, $mailbox, $user_id, $rights);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $sequence
 * @param string $flag
 * @param int $options
 * @throws ImapException
 *
 */
function imap_setflag_full(\IMAP\Connection $imap, string $sequence, string $flag, int $options = 0): void
{
    error_clear_last();
    $safeResult = \imap_setflag_full($imap, $sequence, $flag, $options);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param int $criteria
 * @param int $reverse
 * @param int $flags
 * @param null|string $search_criteria
 * @param null|string $charset
 * @return array
 * @throws ImapException
 *
 */
function imap_sort(\IMAP\Connection $imap, int $criteria, int $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null): array
{
    error_clear_last();
    if ($charset !== null) {
        $safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria, $charset);
    } elseif ($search_criteria !== null) {
        $safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria);
    } else {
        $safeResult = \imap_sort($imap, $criteria, $reverse, $flags);
    }
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @param int $flags
 * @return \stdClass
 * @throws ImapException
 *
 */
function imap_status(\IMAP\Connection $imap, string $mailbox, int $flags): \stdClass
{
    error_clear_last();
    $safeResult = \imap_status($imap, $mailbox, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @throws ImapException
 *
 */
function imap_subscribe(\IMAP\Connection $imap, string $mailbox): void
{
    error_clear_last();
    $safeResult = \imap_subscribe($imap, $mailbox);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param int $flags
 * @return array
 * @throws ImapException
 *
 */
function imap_thread(\IMAP\Connection $imap, int $flags = SE_FREE): array
{
    error_clear_last();
    $safeResult = \imap_thread($imap, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $timeout_type
 * @param int $timeout
 * @return mixed
 * @throws ImapException
 *
 */
function imap_timeout(int $timeout_type, int $timeout = -1)
{
    error_clear_last();
    $safeResult = \imap_timeout($timeout_type, $timeout);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \IMAP\Connection $imap
 * @param string $message_num
 * @param int $flags
 * @throws ImapException
 *
 */
function imap_undelete(\IMAP\Connection $imap, string $message_num, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \imap_undelete($imap, $message_num, $flags);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param \IMAP\Connection $imap
 * @param string $mailbox
 * @throws ImapException
 *
 */
function imap_unsubscribe(\IMAP\Connection $imap, string $mailbox): void
{
    error_clear_last();
    $safeResult = \imap_unsubscribe($imap, $mailbox);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
}


/**
 * @param string $string
 * @return string
 * @throws ImapException
 *
 */
function imap_utf8_to_mutf7(string $string): string
{
    error_clear_last();
    $safeResult = \imap_utf8_to_mutf7($string);
    if ($safeResult === false) {
        throw ImapException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! D'T  T    var.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\VarException;

/**
 * @param mixed $var
 * @param string $type
 * @throws VarException
 *
 */
function settype(&$var, string $type): void
{
    error_clear_last();
    $safeResult = \settype($var, $type);
    if ($safeResult === false) {
        throw VarException::createFromPhpError();
    }
}
PK       ! n~ɋ    	  bzip2.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\Bzip2Exception;

/**
 * @param resource $bz
 * @throws Bzip2Exception
 *
 */
function bzclose($bz): void
{
    error_clear_last();
    $safeResult = \bzclose($bz);
    if ($safeResult === false) {
        throw Bzip2Exception::createFromPhpError();
    }
}


/**
 * @param resource $bz
 * @throws Bzip2Exception
 *
 */
function bzflush($bz): void
{
    error_clear_last();
    $safeResult = \bzflush($bz);
    if ($safeResult === false) {
        throw Bzip2Exception::createFromPhpError();
    }
}


/**
 * @param resource|string $file
 * @param string $mode
 * @return resource
 * @throws Bzip2Exception
 *
 */
function bzopen($file, string $mode)
{
    error_clear_last();
    $safeResult = \bzopen($file, $mode);
    if ($safeResult === false) {
        throw Bzip2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $bz
 * @param int $length
 * @return string
 * @throws Bzip2Exception
 *
 */
function bzread($bz, int $length = 1024): string
{
    error_clear_last();
    $safeResult = \bzread($bz, $length);
    if ($safeResult === false) {
        throw Bzip2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $bz
 * @param string $data
 * @param int|null $length
 * @return int
 * @throws Bzip2Exception
 *
 */
function bzwrite($bz, string $data, ?int $length = null): int
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \bzwrite($bz, $data, $length);
    } else {
        $safeResult = \bzwrite($bz, $data);
    }
    if ($safeResult === false) {
        throw Bzip2Exception::createFromPhpError();
    }
    return $safeResult;
}
PK       ! ;B      strings.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\StringsException;

/**
 * @param string $string
 * @return string
 * @throws StringsException
 *
 */
function convert_uudecode(string $string): string
{
    error_clear_last();
    $safeResult = \convert_uudecode($string);
    if ($safeResult === false) {
        throw StringsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @return string
 * @throws StringsException
 *
 */
function hex2bin(string $string): string
{
    error_clear_last();
    $safeResult = \hex2bin($string);
    if ($safeResult === false) {
        throw StringsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param bool $binary
 * @return non-falsy-string&lowercase-string
 * @throws StringsException
 *
 */
function md5_file(string $filename, bool $binary = false): string
{
    error_clear_last();
    $safeResult = \md5_file($filename, $binary);
    if ($safeResult === false) {
        throw StringsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param bool $binary
 * @return non-falsy-string&lowercase-string
 * @throws StringsException
 *
 */
function sha1_file(string $filename, bool $binary = false): string
{
    error_clear_last();
    $safeResult = \sha1_file($filename, $binary);
    if ($safeResult === false) {
        throw StringsException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! zNiT/  T/  	  mysql.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\MysqlException;

/**
 * @param null|resource $link_identifier
 * @throws MysqlException
 *
 */
function mysql_close($link_identifier = null): void
{
    error_clear_last();
    $safeResult = \mysql_close($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param string $server
 * @param string $username
 * @param string $password
 * @param bool $new_link
 * @param int $client_flags
 * @return resource
 * @throws MysqlException
 *
 */
function mysql_connect(?string $server = null, ?string $username = null, ?string $password = null, bool $new_link = false, int $client_flags = 0)
{
    error_clear_last();
    if ($client_flags !== 0) {
        $safeResult = \mysql_connect($server, $username, $password, $new_link, $client_flags);
    } elseif ($new_link !== false) {
        $safeResult = \mysql_connect($server, $username, $password, $new_link);
    } elseif ($password !== null) {
        $safeResult = \mysql_connect($server, $username, $password);
    } elseif ($username !== null) {
        $safeResult = \mysql_connect($server, $username);
    } elseif ($server !== null) {
        $safeResult = \mysql_connect($server);
    } else {
        $safeResult = \mysql_connect();
    }
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database_name
 * @param null|resource $link_identifier
 * @throws MysqlException
 *
 */
function mysql_create_db(string $database_name, $link_identifier = null): void
{
    error_clear_last();
    $safeResult = \mysql_create_db($database_name, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @param int $row_number
 * @throws MysqlException
 *
 */
function mysql_data_seek($result, int $row_number): void
{
    error_clear_last();
    $safeResult = \mysql_data_seek($result, $row_number);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @param int $row
 * @param mixed $field
 * @return string
 * @throws MysqlException
 *
 */
function mysql_db_name($result, int $row, $field = null): string
{
    error_clear_last();
    $safeResult = \mysql_db_name($result, $row, $field);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database
 * @param string $query
 * @param null|resource $link_identifier
 * @return bool|resource
 * @throws MysqlException
 *
 */
function mysql_db_query(string $database, string $query, $link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_db_query($database, $query, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database_name
 * @param null|resource $link_identifier
 * @throws MysqlException
 *
 */
function mysql_drop_db(string $database_name, $link_identifier = null): void
{
    error_clear_last();
    $safeResult = \mysql_drop_db($database_name, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @return array
 * @throws MysqlException
 *
 */
function mysql_fetch_lengths($result): array
{
    error_clear_last();
    $safeResult = \mysql_fetch_lengths($result);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @param int $field_offset
 * @return string
 * @throws MysqlException
 *
 */
function mysql_field_flags($result, int $field_offset): string
{
    error_clear_last();
    $safeResult = \mysql_field_flags($result, $field_offset);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @param int $field_offset
 * @return int
 * @throws MysqlException
 *
 */
function mysql_field_len($result, int $field_offset): int
{
    error_clear_last();
    $safeResult = \mysql_field_len($result, $field_offset);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @param int $field_offset
 * @return string
 * @throws MysqlException
 *
 */
function mysql_field_name($result, int $field_offset): string
{
    error_clear_last();
    $safeResult = \mysql_field_name($result, $field_offset);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @param int $field_offset
 * @throws MysqlException
 *
 */
function mysql_field_seek($result, int $field_offset): void
{
    error_clear_last();
    $safeResult = \mysql_field_seek($result, $field_offset);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @throws MysqlException
 *
 */
function mysql_free_result($result): void
{
    error_clear_last();
    $safeResult = \mysql_free_result($result);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param null|resource $link_identifier
 * @return string
 * @throws MysqlException
 *
 */
function mysql_get_host_info($link_identifier = null): string
{
    error_clear_last();
    $safeResult = \mysql_get_host_info($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return int
 * @throws MysqlException
 *
 */
function mysql_get_proto_info($link_identifier = null): int
{
    error_clear_last();
    $safeResult = \mysql_get_proto_info($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return string
 * @throws MysqlException
 *
 */
function mysql_get_server_info($link_identifier = null): string
{
    error_clear_last();
    $safeResult = \mysql_get_server_info($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return string
 * @throws MysqlException
 *
 */
function mysql_info($link_identifier = null): string
{
    error_clear_last();
    $safeResult = \mysql_info($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return resource
 * @throws MysqlException
 *
 */
function mysql_list_dbs($link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_list_dbs($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database_name
 * @param string $table_name
 * @param null|resource $link_identifier
 * @return resource
 * @throws MysqlException
 *
 */
function mysql_list_fields(string $database_name, string $table_name, $link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_list_fields($database_name, $table_name, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return resource
 * @throws MysqlException
 *
 */
function mysql_list_processes($link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_list_processes($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database
 * @param null|resource $link_identifier
 * @return resource
 * @throws MysqlException
 *
 */
function mysql_list_tables(string $database, $link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_list_tables($database, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @return int
 * @throws MysqlException
 *
 */
function mysql_num_fields($result): int
{
    error_clear_last();
    $safeResult = \mysql_num_fields($result);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @return int
 * @throws MysqlException
 *
 */
function mysql_num_rows($result): int
{
    error_clear_last();
    $safeResult = \mysql_num_rows($result);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $query
 * @param null|resource $link_identifier
 * @return bool|resource
 * @throws MysqlException
 *
 */
function mysql_query(string $query, $link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_query($query, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $unescaped_string
 * @param null|resource $link_identifier
 * @return string
 * @throws MysqlException
 *
 */
function mysql_real_escape_string(string $unescaped_string, $link_identifier = null): string
{
    error_clear_last();
    $safeResult = \mysql_real_escape_string($unescaped_string, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @param int $row
 * @param mixed $field
 * @return string
 * @throws MysqlException
 *
 */
function mysql_result($result, int $row, $field = 0): string
{
    error_clear_last();
    $safeResult = \mysql_result($result, $row, $field);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $database_name
 * @param null|resource $link_identifier
 * @throws MysqlException
 *
 */
function mysql_select_db(string $database_name, $link_identifier = null): void
{
    error_clear_last();
    $safeResult = \mysql_select_db($database_name, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param string $charset
 * @param null|resource $link_identifier
 * @throws MysqlException
 *
 */
function mysql_set_charset(string $charset, $link_identifier = null): void
{
    error_clear_last();
    $safeResult = \mysql_set_charset($charset, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @param int $i
 * @return string
 * @throws MysqlException
 *
 */
function mysql_tablename($result, int $i): string
{
    error_clear_last();
    $safeResult = \mysql_tablename($result, $i);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_identifier
 * @return int
 * @throws MysqlException
 *
 */
function mysql_thread_id($link_identifier = null): int
{
    error_clear_last();
    $safeResult = \mysql_thread_id($link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $query
 * @param null|resource $link_identifier
 * @return bool|resource
 * @throws MysqlException
 *
 */
function mysql_unbuffered_query(string $query, $link_identifier = null)
{
    error_clear_last();
    $safeResult = \mysql_unbuffered_query($query, $link_identifier);
    if ($safeResult === false) {
        throw MysqlException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! Ch.
  
    mailparse.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\MailparseException;

/**
 * @param resource $mimemail
 * @param mixed $filename
 * @param callable $callbackfunc
 * @return string
 * @throws MailparseException
 *
 */
function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callbackfunc = null): string
{
    error_clear_last();
    if ($callbackfunc !== null) {
        $safeResult = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc);
    } else {
        $safeResult = \mailparse_msg_extract_part_file($mimemail, $filename);
    }
    if ($safeResult === false) {
        throw MailparseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $mimemail
 * @throws MailparseException
 *
 */
function mailparse_msg_free($mimemail): void
{
    error_clear_last();
    $safeResult = \mailparse_msg_free($mimemail);
    if ($safeResult === false) {
        throw MailparseException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @return resource
 * @throws MailparseException
 *
 */
function mailparse_msg_parse_file(string $filename)
{
    error_clear_last();
    $safeResult = \mailparse_msg_parse_file($filename);
    if ($safeResult === false) {
        throw MailparseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $mimemail
 * @param string $data
 * @throws MailparseException
 *
 */
function mailparse_msg_parse($mimemail, string $data): void
{
    error_clear_last();
    $safeResult = \mailparse_msg_parse($mimemail, $data);
    if ($safeResult === false) {
        throw MailparseException::createFromPhpError();
    }
}


/**
 * @param resource $sourcefp
 * @param resource $destfp
 * @param string $encoding
 * @throws MailparseException
 *
 */
function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void
{
    error_clear_last();
    $safeResult = \mailparse_stream_encode($sourcefp, $destfp, $encoding);
    if ($safeResult === false) {
        throw MailparseException::createFromPhpError();
    }
}
PK       ! `  `    hash.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\HashException;

/**
 * @param string $algo
 * @param string $key
 * @param int $length
 * @param string $info
 * @param string $salt
 * @return non-falsy-string
 * @throws HashException
 *
 */
function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string
{
    error_clear_last();
    $safeResult = \hash_hkdf($algo, $key, $length, $info, $salt);
    if ($safeResult === false) {
        throw HashException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \HashContext $context
 * @param string $filename
 * @param \HashContext|null $stream_context
 * @throws HashException
 *
 */
function hash_update_file(\HashContext $context, string $filename, ?\HashContext $stream_context = null): void
{
    error_clear_last();
    if ($stream_context !== null) {
        $safeResult = \hash_update_file($context, $filename, $stream_context);
    } else {
        $safeResult = \hash_update_file($context, $filename);
    }
    if ($safeResult === false) {
        throw HashException::createFromPhpError();
    }
}
PK       ! lƔ	  	  	  array.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ArrayException;

/**
 * @param array $keys
 * @param array $values
 * @return array
 * @throws ArrayException
 *
 */
function array_combine(array $keys, array $values): array
{
    error_clear_last();
    $safeResult = \array_combine($keys, $values);
    if ($safeResult === false) {
        throw ArrayException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $array
 * @return array
 * @throws ArrayException
 *
 */
function array_flip(array $array): array
{
    error_clear_last();
    $safeResult = \array_flip($array);
    if ($safeResult === null) {
        throw ArrayException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $array
 * @param array $replacements
 * @return array
 * @throws ArrayException
 *
 */
function array_replace_recursive(array $array, array ...$replacements): array
{
    error_clear_last();
    if ($replacements !== []) {
        $safeResult = \array_replace_recursive($array, ...$replacements);
    } else {
        $safeResult = \array_replace_recursive($array);
    }
    if ($safeResult === null) {
        throw ArrayException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $array
 * @param array $replacements
 * @return array
 * @throws ArrayException
 *
 */
function array_replace(array $array, array ...$replacements): array
{
    error_clear_last();
    if ($replacements !== []) {
        $safeResult = \array_replace($array, ...$replacements);
    } else {
        $safeResult = \array_replace($array);
    }
    if ($safeResult === null) {
        throw ArrayException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array|object $array
 * @param callable $callback
 * @param mixed $arg
 * @throws ArrayException
 *
 */
function array_walk_recursive(&$array, callable $callback, $arg = null): void
{
    error_clear_last();
    if ($arg !== null) {
        $safeResult = \array_walk_recursive($array, $callback, $arg);
    } else {
        $safeResult = \array_walk_recursive($array, $callback);
    }
    if ($safeResult === false) {
        throw ArrayException::createFromPhpError();
    }
}


/**
 * @param array $array
 * @throws ArrayException
 *
 */
function shuffle(array &$array): void
{
    error_clear_last();
    $safeResult = \shuffle($array);
    if ($safeResult === false) {
        throw ArrayException::createFromPhpError();
    }
}
PK       ! ӮK8  8    oci8.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\Oci8Exception;

/**
 * @param resource $statement
 * @param string $param
 * @param array $var
 * @param int $max_array_length
 * @param int $max_item_length
 * @param int $type
 * @throws Oci8Exception
 *
 */
function oci_bind_array_by_name($statement, string $param, array &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC): void
{
    error_clear_last();
    $safeResult = \oci_bind_array_by_name($statement, $param, $var, $max_array_length, $max_item_length, $type);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param string $param
 * @param mixed $var
 * @param int $max_length
 * @param int $type
 * @throws Oci8Exception
 *
 */
function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1, int $type = 0): void
{
    error_clear_last();
    $safeResult = \oci_bind_by_name($statement, $param, $var, $max_length, $type);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @throws Oci8Exception
 *
 */
function oci_cancel($statement): void
{
    error_clear_last();
    $safeResult = \oci_cancel($statement);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @throws Oci8Exception
 *
 */
function oci_commit($connection): void
{
    error_clear_last();
    $safeResult = \oci_commit($connection);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param string $username
 * @param string $password
 * @param null|string $connection_string
 * @param string $encoding
 * @param int $session_mode
 * @return resource
 * @throws Oci8Exception
 *
 */
function oci_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
    error_clear_last();
    if ($session_mode !== OCI_DEFAULT) {
        $safeResult = \oci_connect($username, $password, $connection_string, $encoding, $session_mode);
    } elseif ($encoding !== "") {
        $safeResult = \oci_connect($username, $password, $connection_string, $encoding);
    } elseif ($connection_string !== null) {
        $safeResult = \oci_connect($username, $password, $connection_string);
    } else {
        $safeResult = \oci_connect($username, $password);
    }
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param string $column
 * @param mixed $var
 * @param int $type
 * @throws Oci8Exception
 *
 */
function oci_define_by_name($statement, string $column, &$var, int $type = 0): void
{
    error_clear_last();
    $safeResult = \oci_define_by_name($statement, $column, $var, $type);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param int $mode
 * @throws Oci8Exception
 *
 */
function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void
{
    error_clear_last();
    $safeResult = \oci_execute($statement, $mode);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return string
 * @throws Oci8Exception
 *
 */
function oci_field_name($statement, $column): string
{
    error_clear_last();
    $safeResult = \oci_field_name($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return int
 * @throws Oci8Exception
 *
 */
function oci_field_precision($statement, $column): int
{
    error_clear_last();
    $safeResult = \oci_field_precision($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return int
 * @throws Oci8Exception
 *
 */
function oci_field_scale($statement, $column): int
{
    error_clear_last();
    $safeResult = \oci_field_scale($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return int
 * @throws Oci8Exception
 *
 */
function oci_field_size($statement, $column): int
{
    error_clear_last();
    $safeResult = \oci_field_size($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return int
 * @throws Oci8Exception
 *
 */
function oci_field_type_raw($statement, $column): int
{
    error_clear_last();
    $safeResult = \oci_field_type_raw($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return mixed
 * @throws Oci8Exception
 *
 */
function oci_field_type($statement, $column)
{
    error_clear_last();
    $safeResult = \oci_field_type($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OCILob $lob
 * @throws Oci8Exception
 *
 */
function oci_free_descriptor(\OCILob $lob): void
{
    error_clear_last();
    $safeResult = \oci_free_descriptor($lob);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @throws Oci8Exception
 *
 */
function oci_free_statement($statement): void
{
    error_clear_last();
    $safeResult = \oci_free_statement($statement);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param string $type_name
 * @param null|string $schema
 * @return \OCI-Collection
 * @throws Oci8Exception
 *
 */
function oci_new_collection($connection, string $type_name, ?string $schema = null)
{
    error_clear_last();
    if ($schema !== null) {
        $safeResult = \oci_new_collection($connection, $type_name, $schema);
    } else {
        $safeResult = \oci_new_collection($connection, $type_name);
    }
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $username
 * @param string $password
 * @param null|string $connection_string
 * @param string $encoding
 * @param int $session_mode
 * @return resource
 * @throws Oci8Exception
 *
 */
function oci_new_connect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
    error_clear_last();
    if ($session_mode !== OCI_DEFAULT) {
        $safeResult = \oci_new_connect($username, $password, $connection_string, $encoding, $session_mode);
    } elseif ($encoding !== "") {
        $safeResult = \oci_new_connect($username, $password, $connection_string, $encoding);
    } elseif ($connection_string !== null) {
        $safeResult = \oci_new_connect($username, $password, $connection_string);
    } else {
        $safeResult = \oci_new_connect($username, $password);
    }
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @return resource
 * @throws Oci8Exception
 *
 */
function oci_new_cursor($connection)
{
    error_clear_last();
    $safeResult = \oci_new_cursor($connection);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @param int $type
 * @return \OCI-Lob|false
 * @throws Oci8Exception
 *
 */
function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB)
{
    error_clear_last();
    $safeResult = \oci_new_descriptor($connection, $type);
    if ($safeResult === null) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @return 0|positive-int
 * @throws Oci8Exception
 *
 */
function oci_num_rows($statement): int
{
    error_clear_last();
    $safeResult = \oci_num_rows($statement);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @param string $sql
 * @return resource
 * @throws Oci8Exception
 *
 */
function oci_parse($connection, string $sql)
{
    error_clear_last();
    $safeResult = \oci_parse($connection, $sql);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $username
 * @param string $password
 * @param null|string $connection_string
 * @param string $encoding
 * @param int $session_mode
 * @return resource
 * @throws Oci8Exception
 *
 */
function oci_pconnect(string $username, string $password, ?string $connection_string = null, string $encoding = "", int $session_mode = OCI_DEFAULT)
{
    error_clear_last();
    if ($session_mode !== OCI_DEFAULT) {
        $safeResult = \oci_pconnect($username, $password, $connection_string, $encoding, $session_mode);
    } elseif ($encoding !== "") {
        $safeResult = \oci_pconnect($username, $password, $connection_string, $encoding);
    } elseif ($connection_string !== null) {
        $safeResult = \oci_pconnect($username, $password, $connection_string);
    } else {
        $safeResult = \oci_pconnect($username, $password);
    }
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @param callable $callback
 * @throws Oci8Exception
 *
 */
function oci_register_taf_callback($connection, callable $callback): void
{
    error_clear_last();
    $safeResult = \oci_register_taf_callback($connection, $callback);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param mixed $column
 * @return string
 * @throws Oci8Exception
 *
 */
function oci_result($statement, $column): string
{
    error_clear_last();
    $safeResult = \oci_result($statement, $column);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @throws Oci8Exception
 *
 */
function oci_rollback($connection): void
{
    error_clear_last();
    $safeResult = \oci_rollback($connection);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @return string
 * @throws Oci8Exception
 *
 */
function oci_server_version($connection): string
{
    error_clear_last();
    $safeResult = \oci_server_version($connection);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @param string $action
 * @throws Oci8Exception
 *
 */
function oci_set_action($connection, string $action): void
{
    error_clear_last();
    $safeResult = \oci_set_action($connection, $action);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param int $timeout
 * @throws Oci8Exception
 *
 */
function oci_set_call_timeout($connection, int $timeout): void
{
    error_clear_last();
    $safeResult = \oci_set_call_timeout($connection, $timeout);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param string $client_id
 * @throws Oci8Exception
 *
 */
function oci_set_client_identifier($connection, string $client_id): void
{
    error_clear_last();
    $safeResult = \oci_set_client_identifier($connection, $client_id);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param string $client_info
 * @throws Oci8Exception
 *
 */
function oci_set_client_info($connection, string $client_info): void
{
    error_clear_last();
    $safeResult = \oci_set_client_info($connection, $client_info);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param string $action
 * @throws Oci8Exception
 *
 */
function oci_set_db_operation($connection, string $action): void
{
    error_clear_last();
    $safeResult = \oci_set_db_operation($connection, $action);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param string $edition
 * @throws Oci8Exception
 *
 */
function oci_set_edition(string $edition): void
{
    error_clear_last();
    $safeResult = \oci_set_edition($edition);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @param string $name
 * @throws Oci8Exception
 *
 */
function oci_set_module_name($connection, string $name): void
{
    error_clear_last();
    $safeResult = \oci_set_module_name($connection, $name);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param int $rows
 * @throws Oci8Exception
 *
 */
function oci_set_prefetch($statement, int $rows): void
{
    error_clear_last();
    $safeResult = \oci_set_prefetch($statement, $rows);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @return string
 * @throws Oci8Exception
 *
 */
function oci_statement_type($statement): string
{
    error_clear_last();
    $safeResult = \oci_statement_type($statement);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @throws Oci8Exception
 *
 */
function oci_unregister_taf_callback($connection): void
{
    error_clear_last();
    $safeResult = \oci_unregister_taf_callback($connection);
    if ($safeResult === false) {
        throw Oci8Exception::createFromPhpError();
    }
}
PK       !  0M  M    readline.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ReadlineException;

/**
 * @param string $prompt
 * @throws ReadlineException
 *
 */
function readline_add_history(string $prompt): void
{
    error_clear_last();
    $safeResult = \readline_add_history($prompt);
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}


/**
 * @param string $prompt
 * @param callable $callback
 * @throws ReadlineException
 *
 */
function readline_callback_handler_install(string $prompt, callable $callback): void
{
    error_clear_last();
    $safeResult = \readline_callback_handler_install($prompt, $callback);
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}


/**
 * @throws ReadlineException
 *
 */
function readline_clear_history(): void
{
    error_clear_last();
    $safeResult = \readline_clear_history();
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}


/**
 * @param callable $callback
 * @throws ReadlineException
 *
 */
function readline_completion_function(callable $callback): void
{
    error_clear_last();
    $safeResult = \readline_completion_function($callback);
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}


/**
 * @param null|string $filename
 * @throws ReadlineException
 *
 */
function readline_read_history(?string $filename = null): void
{
    error_clear_last();
    if ($filename !== null) {
        $safeResult = \readline_read_history($filename);
    } else {
        $safeResult = \readline_read_history();
    }
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}


/**
 * @param null|string $filename
 * @throws ReadlineException
 *
 */
function readline_write_history(?string $filename = null): void
{
    error_clear_last();
    if ($filename !== null) {
        $safeResult = \readline_write_history($filename);
    } else {
        $safeResult = \readline_write_history();
    }
    if ($safeResult === false) {
        throw ReadlineException::createFromPhpError();
    }
}
PK       ! Ȯ      rector-migrate.phpnu Iw        <?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;

// This file configures rector/rector to replace all PHP functions with their equivalent "safe" functions.
return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->ruleWithConfiguration(
        RenameFunctionRector::class,
        [            'apache_getenv' => 'Safe\apache_getenv',
            'apache_get_version' => 'Safe\apache_get_version',
            'apache_lookup_uri' => 'Safe\apache_lookup_uri',
            'apache_setenv' => 'Safe\apache_setenv',
            'apcu_cache_info' => 'Safe\apcu_cache_info',
            'apcu_cas' => 'Safe\apcu_cas',
            'apcu_dec' => 'Safe\apcu_dec',
            'apcu_fetch' => 'Safe\apcu_fetch',
            'apcu_inc' => 'Safe\apcu_inc',
            'apcu_sma_info' => 'Safe\apcu_sma_info',
            'assert_options' => 'Safe\assert_options',
            'base64_decode' => 'Safe\base64_decode',
            'bindtextdomain' => 'Safe\bindtextdomain',
            'bzclose' => 'Safe\bzclose',
            'bzflush' => 'Safe\bzflush',
            'bzopen' => 'Safe\bzopen',
            'bzread' => 'Safe\bzread',
            'bzwrite' => 'Safe\bzwrite',
            'chdir' => 'Safe\chdir',
            'chgrp' => 'Safe\chgrp',
            'chmod' => 'Safe\chmod',
            'chown' => 'Safe\chown',
            'chroot' => 'Safe\chroot',
            'class_alias' => 'Safe\class_alias',
            'class_implements' => 'Safe\class_implements',
            'class_parents' => 'Safe\class_parents',
            'class_uses' => 'Safe\class_uses',
            'cli_set_process_title' => 'Safe\cli_set_process_title',
            'closelog' => 'Safe\closelog',
            'com_create_guid' => 'Safe\com_create_guid',
            'com_event_sink' => 'Safe\com_event_sink',
            'com_load_typelib' => 'Safe\com_load_typelib',
            'com_print_typeinfo' => 'Safe\com_print_typeinfo',
            'convert_uudecode' => 'Safe\convert_uudecode',
            'copy' => 'Safe\copy',
            'cubrid_bind' => 'Safe\cubrid_bind',
            'cubrid_column_names' => 'Safe\cubrid_column_names',
            'cubrid_column_types' => 'Safe\cubrid_column_types',
            'cubrid_col_size' => 'Safe\cubrid_col_size',
            'cubrid_commit' => 'Safe\cubrid_commit',
            'cubrid_connect' => 'Safe\cubrid_connect',
            'cubrid_connect_with_url' => 'Safe\cubrid_connect_with_url',
            'cubrid_current_oid' => 'Safe\cubrid_current_oid',
            'cubrid_disconnect' => 'Safe\cubrid_disconnect',
            'cubrid_drop' => 'Safe\cubrid_drop',
            'cubrid_free_result' => 'Safe\cubrid_free_result',
            'cubrid_get_charset' => 'Safe\cubrid_get_charset',
            'cubrid_get_class_name' => 'Safe\cubrid_get_class_name',
            'cubrid_get_client_info' => 'Safe\cubrid_get_client_info',
            'cubrid_get_db_parameter' => 'Safe\cubrid_get_db_parameter',
            'cubrid_get_query_timeout' => 'Safe\cubrid_get_query_timeout',
            'cubrid_get_server_info' => 'Safe\cubrid_get_server_info',
            'cubrid_insert_id' => 'Safe\cubrid_insert_id',
            'cubrid_lob2_bind' => 'Safe\cubrid_lob2_bind',
            'cubrid_lob2_close' => 'Safe\cubrid_lob2_close',
            'cubrid_lob2_export' => 'Safe\cubrid_lob2_export',
            'cubrid_lob2_import' => 'Safe\cubrid_lob2_import',
            'cubrid_lob2_new' => 'Safe\cubrid_lob2_new',
            'cubrid_lob2_read' => 'Safe\cubrid_lob2_read',
            'cubrid_lob2_seek' => 'Safe\cubrid_lob2_seek',
            'cubrid_lob2_seek64' => 'Safe\cubrid_lob2_seek64',
            'cubrid_lob2_size' => 'Safe\cubrid_lob2_size',
            'cubrid_lob2_size64' => 'Safe\cubrid_lob2_size64',
            'cubrid_lob2_tell' => 'Safe\cubrid_lob2_tell',
            'cubrid_lob2_tell64' => 'Safe\cubrid_lob2_tell64',
            'cubrid_lob2_write' => 'Safe\cubrid_lob2_write',
            'cubrid_lob_close' => 'Safe\cubrid_lob_close',
            'cubrid_lob_export' => 'Safe\cubrid_lob_export',
            'cubrid_lob_get' => 'Safe\cubrid_lob_get',
            'cubrid_lob_send' => 'Safe\cubrid_lob_send',
            'cubrid_lob_size' => 'Safe\cubrid_lob_size',
            'cubrid_lock_read' => 'Safe\cubrid_lock_read',
            'cubrid_lock_write' => 'Safe\cubrid_lock_write',
            'cubrid_move_cursor' => 'Safe\cubrid_move_cursor',
            'cubrid_next_result' => 'Safe\cubrid_next_result',
            'cubrid_pconnect' => 'Safe\cubrid_pconnect',
            'cubrid_pconnect_with_url' => 'Safe\cubrid_pconnect_with_url',
            'cubrid_prepare' => 'Safe\cubrid_prepare',
            'cubrid_put' => 'Safe\cubrid_put',
            'cubrid_rollback' => 'Safe\cubrid_rollback',
            'cubrid_schema' => 'Safe\cubrid_schema',
            'cubrid_seq_drop' => 'Safe\cubrid_seq_drop',
            'cubrid_seq_insert' => 'Safe\cubrid_seq_insert',
            'cubrid_seq_put' => 'Safe\cubrid_seq_put',
            'cubrid_set_add' => 'Safe\cubrid_set_add',
            'cubrid_set_autocommit' => 'Safe\cubrid_set_autocommit',
            'cubrid_set_db_parameter' => 'Safe\cubrid_set_db_parameter',
            'cubrid_set_drop' => 'Safe\cubrid_set_drop',
            'cubrid_set_query_timeout' => 'Safe\cubrid_set_query_timeout',
            'curl_copy_handle' => 'Safe\curl_copy_handle',
            'curl_escape' => 'Safe\curl_escape',
            'curl_exec' => 'Safe\curl_exec',
            'curl_getinfo' => 'Safe\curl_getinfo',
            'curl_init' => 'Safe\curl_init',
            'curl_multi_info_read' => 'Safe\curl_multi_info_read',
            'curl_multi_init' => 'Safe\curl_multi_init',
            'curl_multi_setopt' => 'Safe\curl_multi_setopt',
            'curl_setopt' => 'Safe\curl_setopt',
            'curl_share_setopt' => 'Safe\curl_share_setopt',
            'curl_unescape' => 'Safe\curl_unescape',
            'date_parse_from_format' => 'Safe\date_parse_from_format',
            'date_sunrise' => 'Safe\date_sunrise',
            'date_sunset' => 'Safe\date_sunset',
            'db2_autocommit' => 'Safe\db2_autocommit',
            'db2_bind_param' => 'Safe\db2_bind_param',
            'db2_client_info' => 'Safe\db2_client_info',
            'db2_close' => 'Safe\db2_close',
            'db2_commit' => 'Safe\db2_commit',
            'db2_execute' => 'Safe\db2_execute',
            'db2_free_result' => 'Safe\db2_free_result',
            'db2_free_stmt' => 'Safe\db2_free_stmt',
            'db2_get_option' => 'Safe\db2_get_option',
            'db2_pclose' => 'Safe\db2_pclose',
            'db2_rollback' => 'Safe\db2_rollback',
            'db2_server_info' => 'Safe\db2_server_info',
            'db2_set_option' => 'Safe\db2_set_option',
            'define' => 'Safe\define',
            'deflate_add' => 'Safe\deflate_add',
            'deflate_init' => 'Safe\deflate_init',
            'dir' => 'Safe\dir',
            'disk_free_space' => 'Safe\disk_free_space',
            'disk_total_space' => 'Safe\disk_total_space',
            'dl' => 'Safe\dl',
            'dns_get_record' => 'Safe\dns_get_record',
            'eio_busy' => 'Safe\eio_busy',
            'eio_chmod' => 'Safe\eio_chmod',
            'eio_chown' => 'Safe\eio_chown',
            'eio_close' => 'Safe\eio_close',
            'eio_custom' => 'Safe\eio_custom',
            'eio_dup2' => 'Safe\eio_dup2',
            'eio_event_loop' => 'Safe\eio_event_loop',
            'eio_fallocate' => 'Safe\eio_fallocate',
            'eio_fchmod' => 'Safe\eio_fchmod',
            'eio_fchown' => 'Safe\eio_fchown',
            'eio_fdatasync' => 'Safe\eio_fdatasync',
            'eio_fstat' => 'Safe\eio_fstat',
            'eio_fstatvfs' => 'Safe\eio_fstatvfs',
            'eio_fsync' => 'Safe\eio_fsync',
            'eio_ftruncate' => 'Safe\eio_ftruncate',
            'eio_futime' => 'Safe\eio_futime',
            'eio_grp' => 'Safe\eio_grp',
            'eio_lstat' => 'Safe\eio_lstat',
            'eio_mkdir' => 'Safe\eio_mkdir',
            'eio_mknod' => 'Safe\eio_mknod',
            'eio_nop' => 'Safe\eio_nop',
            'eio_readahead' => 'Safe\eio_readahead',
            'eio_readdir' => 'Safe\eio_readdir',
            'eio_readlink' => 'Safe\eio_readlink',
            'eio_rename' => 'Safe\eio_rename',
            'eio_rmdir' => 'Safe\eio_rmdir',
            'eio_seek' => 'Safe\eio_seek',
            'eio_sendfile' => 'Safe\eio_sendfile',
            'eio_stat' => 'Safe\eio_stat',
            'eio_statvfs' => 'Safe\eio_statvfs',
            'eio_symlink' => 'Safe\eio_symlink',
            'eio_sync' => 'Safe\eio_sync',
            'eio_syncfs' => 'Safe\eio_syncfs',
            'eio_sync_file_range' => 'Safe\eio_sync_file_range',
            'eio_truncate' => 'Safe\eio_truncate',
            'eio_unlink' => 'Safe\eio_unlink',
            'eio_utime' => 'Safe\eio_utime',
            'eio_write' => 'Safe\eio_write',
            'error_log' => 'Safe\error_log',
            'exec' => 'Safe\exec',
            'fastcgi_finish_request' => 'Safe\fastcgi_finish_request',
            'fbird_blob_cancel' => 'Safe\fbird_blob_cancel',
            'fclose' => 'Safe\fclose',
            'fdatasync' => 'Safe\fdatasync',
            'fflush' => 'Safe\fflush',
            'fgetcsv' => 'Safe\fgetcsv',
            'file' => 'Safe\file',
            'fileatime' => 'Safe\fileatime',
            'filectime' => 'Safe\filectime',
            'fileinode' => 'Safe\fileinode',
            'filemtime' => 'Safe\filemtime',
            'fileowner' => 'Safe\fileowner',
            'fileperms' => 'Safe\fileperms',
            'filesize' => 'Safe\filesize',
            'filetype' => 'Safe\filetype',
            'file_get_contents' => 'Safe\file_get_contents',
            'file_put_contents' => 'Safe\file_put_contents',
            'filter_input_array' => 'Safe\filter_input_array',
            'filter_var_array' => 'Safe\filter_var_array',
            'finfo_close' => 'Safe\finfo_close',
            'finfo_open' => 'Safe\finfo_open',
            'flock' => 'Safe\flock',
            'fopen' => 'Safe\fopen',
            'fputcsv' => 'Safe\fputcsv',
            'fread' => 'Safe\fread',
            'fsockopen' => 'Safe\fsockopen',
            'fstat' => 'Safe\fstat',
            'fsync' => 'Safe\fsync',
            'ftell' => 'Safe\ftell',
            'ftp_alloc' => 'Safe\ftp_alloc',
            'ftp_append' => 'Safe\ftp_append',
            'ftp_cdup' => 'Safe\ftp_cdup',
            'ftp_chdir' => 'Safe\ftp_chdir',
            'ftp_chmod' => 'Safe\ftp_chmod',
            'ftp_close' => 'Safe\ftp_close',
            'ftp_connect' => 'Safe\ftp_connect',
            'ftp_delete' => 'Safe\ftp_delete',
            'ftp_fget' => 'Safe\ftp_fget',
            'ftp_fput' => 'Safe\ftp_fput',
            'ftp_get' => 'Safe\ftp_get',
            'ftp_login' => 'Safe\ftp_login',
            'ftp_mkdir' => 'Safe\ftp_mkdir',
            'ftp_mlsd' => 'Safe\ftp_mlsd',
            'ftp_nb_put' => 'Safe\ftp_nb_put',
            'ftp_nlist' => 'Safe\ftp_nlist',
            'ftp_pasv' => 'Safe\ftp_pasv',
            'ftp_put' => 'Safe\ftp_put',
            'ftp_pwd' => 'Safe\ftp_pwd',
            'ftp_raw' => 'Safe\ftp_raw',
            'ftp_rename' => 'Safe\ftp_rename',
            'ftp_rmdir' => 'Safe\ftp_rmdir',
            'ftp_site' => 'Safe\ftp_site',
            'ftp_size' => 'Safe\ftp_size',
            'ftp_ssl_connect' => 'Safe\ftp_ssl_connect',
            'ftp_systype' => 'Safe\ftp_systype',
            'ftruncate' => 'Safe\ftruncate',
            'fwrite' => 'Safe\fwrite',
            'getcwd' => 'Safe\getcwd',
            'gethostname' => 'Safe\gethostname',
            'getimagesize' => 'Safe\getimagesize',
            'getlastmod' => 'Safe\getlastmod',
            'getmygid' => 'Safe\getmygid',
            'getmyinode' => 'Safe\getmyinode',
            'getmypid' => 'Safe\getmypid',
            'getmyuid' => 'Safe\getmyuid',
            'getopt' => 'Safe\getopt',
            'getprotobyname' => 'Safe\getprotobyname',
            'getprotobynumber' => 'Safe\getprotobynumber',
            'getrusage' => 'Safe\getrusage',
            'getservbyport' => 'Safe\getservbyport',
            'get_cfg_var' => 'Safe\get_cfg_var',
            'get_headers' => 'Safe\get_headers',
            'get_include_path' => 'Safe\get_include_path',
            'get_meta_tags' => 'Safe\get_meta_tags',
            'glob' => 'Safe\glob',
            'gmmktime' => 'Safe\gmmktime',
            'gmstrftime' => 'Safe\gmstrftime',
            'gnupg_adddecryptkey' => 'Safe\gnupg_adddecryptkey',
            'gnupg_addencryptkey' => 'Safe\gnupg_addencryptkey',
            'gnupg_addsignkey' => 'Safe\gnupg_addsignkey',
            'gnupg_cleardecryptkeys' => 'Safe\gnupg_cleardecryptkeys',
            'gnupg_clearencryptkeys' => 'Safe\gnupg_clearencryptkeys',
            'gnupg_clearsignkeys' => 'Safe\gnupg_clearsignkeys',
            'gnupg_setarmor' => 'Safe\gnupg_setarmor',
            'gnupg_setsignmode' => 'Safe\gnupg_setsignmode',
            'gzclose' => 'Safe\gzclose',
            'gzcompress' => 'Safe\gzcompress',
            'gzdecode' => 'Safe\gzdecode',
            'gzdeflate' => 'Safe\gzdeflate',
            'gzencode' => 'Safe\gzencode',
            'gzfile' => 'Safe\gzfile',
            'gzgets' => 'Safe\gzgets',
            'gzinflate' => 'Safe\gzinflate',
            'gzopen' => 'Safe\gzopen',
            'gzpassthru' => 'Safe\gzpassthru',
            'gzread' => 'Safe\gzread',
            'gzrewind' => 'Safe\gzrewind',
            'gztell' => 'Safe\gztell',
            'gzuncompress' => 'Safe\gzuncompress',
            'gzwrite' => 'Safe\gzwrite',
            'hash_file' => 'Safe\hash_file',
            'hash_hmac_file' => 'Safe\hash_hmac_file',
            'hash_update_file' => 'Safe\hash_update_file',
            'header_register_callback' => 'Safe\header_register_callback',
            'hex2bin' => 'Safe\hex2bin',
            'highlight_file' => 'Safe\highlight_file',
            'highlight_string' => 'Safe\highlight_string',
            'hrtime' => 'Safe\hrtime',
            'ibase_add_user' => 'Safe\ibase_add_user',
            'ibase_backup' => 'Safe\ibase_backup',
            'ibase_blob_cancel' => 'Safe\ibase_blob_cancel',
            'ibase_blob_create' => 'Safe\ibase_blob_create',
            'ibase_blob_get' => 'Safe\ibase_blob_get',
            'ibase_close' => 'Safe\ibase_close',
            'ibase_commit' => 'Safe\ibase_commit',
            'ibase_commit_ret' => 'Safe\ibase_commit_ret',
            'ibase_connect' => 'Safe\ibase_connect',
            'ibase_delete_user' => 'Safe\ibase_delete_user',
            'ibase_drop_db' => 'Safe\ibase_drop_db',
            'ibase_free_event_handler' => 'Safe\ibase_free_event_handler',
            'ibase_free_query' => 'Safe\ibase_free_query',
            'ibase_free_result' => 'Safe\ibase_free_result',
            'ibase_maintain_db' => 'Safe\ibase_maintain_db',
            'ibase_modify_user' => 'Safe\ibase_modify_user',
            'ibase_name_result' => 'Safe\ibase_name_result',
            'ibase_pconnect' => 'Safe\ibase_pconnect',
            'ibase_restore' => 'Safe\ibase_restore',
            'ibase_rollback' => 'Safe\ibase_rollback',
            'ibase_rollback_ret' => 'Safe\ibase_rollback_ret',
            'ibase_service_attach' => 'Safe\ibase_service_attach',
            'ibase_service_detach' => 'Safe\ibase_service_detach',
            'iconv' => 'Safe\iconv',
            'iconv_get_encoding' => 'Safe\iconv_get_encoding',
            'iconv_mime_decode' => 'Safe\iconv_mime_decode',
            'iconv_mime_encode' => 'Safe\iconv_mime_encode',
            'iconv_set_encoding' => 'Safe\iconv_set_encoding',
            'iconv_strlen' => 'Safe\iconv_strlen',
            'idate' => 'Safe\idate',
            'imageaffine' => 'Safe\imageaffine',
            'imageaffinematrixconcat' => 'Safe\imageaffinematrixconcat',
            'imageaffinematrixget' => 'Safe\imageaffinematrixget',
            'imagealphablending' => 'Safe\imagealphablending',
            'imageantialias' => 'Safe\imageantialias',
            'imagearc' => 'Safe\imagearc',
            'imageavif' => 'Safe\imageavif',
            'imagebmp' => 'Safe\imagebmp',
            'imagechar' => 'Safe\imagechar',
            'imagecharup' => 'Safe\imagecharup',
            'imagecolorat' => 'Safe\imagecolorat',
            'imagecolordeallocate' => 'Safe\imagecolordeallocate',
            'imagecolormatch' => 'Safe\imagecolormatch',
            'imagecolorset' => 'Safe\imagecolorset',
            'imageconvolution' => 'Safe\imageconvolution',
            'imagecopy' => 'Safe\imagecopy',
            'imagecopymerge' => 'Safe\imagecopymerge',
            'imagecopymergegray' => 'Safe\imagecopymergegray',
            'imagecopyresampled' => 'Safe\imagecopyresampled',
            'imagecopyresized' => 'Safe\imagecopyresized',
            'imagecreate' => 'Safe\imagecreate',
            'imagecreatefromavif' => 'Safe\imagecreatefromavif',
            'imagecreatefrombmp' => 'Safe\imagecreatefrombmp',
            'imagecreatefromgd' => 'Safe\imagecreatefromgd',
            'imagecreatefromgd2' => 'Safe\imagecreatefromgd2',
            'imagecreatefromgd2part' => 'Safe\imagecreatefromgd2part',
            'imagecreatefromgif' => 'Safe\imagecreatefromgif',
            'imagecreatefromjpeg' => 'Safe\imagecreatefromjpeg',
            'imagecreatefrompng' => 'Safe\imagecreatefrompng',
            'imagecreatefromstring' => 'Safe\imagecreatefromstring',
            'imagecreatefromtga' => 'Safe\imagecreatefromtga',
            'imagecreatefromwbmp' => 'Safe\imagecreatefromwbmp',
            'imagecreatefromwebp' => 'Safe\imagecreatefromwebp',
            'imagecreatefromxbm' => 'Safe\imagecreatefromxbm',
            'imagecreatefromxpm' => 'Safe\imagecreatefromxpm',
            'imagecreatetruecolor' => 'Safe\imagecreatetruecolor',
            'imagecrop' => 'Safe\imagecrop',
            'imagecropauto' => 'Safe\imagecropauto',
            'imagedashedline' => 'Safe\imagedashedline',
            'imagedestroy' => 'Safe\imagedestroy',
            'imageellipse' => 'Safe\imageellipse',
            'imagefill' => 'Safe\imagefill',
            'imagefilledarc' => 'Safe\imagefilledarc',
            'imagefilledellipse' => 'Safe\imagefilledellipse',
            'imagefilledrectangle' => 'Safe\imagefilledrectangle',
            'imagefilltoborder' => 'Safe\imagefilltoborder',
            'imagefilter' => 'Safe\imagefilter',
            'imageflip' => 'Safe\imageflip',
            'imageftbbox' => 'Safe\imageftbbox',
            'imagefttext' => 'Safe\imagefttext',
            'imagegammacorrect' => 'Safe\imagegammacorrect',
            'imagegd' => 'Safe\imagegd',
            'imagegd2' => 'Safe\imagegd2',
            'imagegif' => 'Safe\imagegif',
            'imagegrabscreen' => 'Safe\imagegrabscreen',
            'imagegrabwindow' => 'Safe\imagegrabwindow',
            'imagejpeg' => 'Safe\imagejpeg',
            'imagelayereffect' => 'Safe\imagelayereffect',
            'imageline' => 'Safe\imageline',
            'imageloadfont' => 'Safe\imageloadfont',
            'imagepng' => 'Safe\imagepng',
            'imagerectangle' => 'Safe\imagerectangle',
            'imageresolution' => 'Safe\imageresolution',
            'imagerotate' => 'Safe\imagerotate',
            'imagesavealpha' => 'Safe\imagesavealpha',
            'imagescale' => 'Safe\imagescale',
            'imagesetbrush' => 'Safe\imagesetbrush',
            'imagesetclip' => 'Safe\imagesetclip',
            'imagesetinterpolation' => 'Safe\imagesetinterpolation',
            'imagesetpixel' => 'Safe\imagesetpixel',
            'imagesetstyle' => 'Safe\imagesetstyle',
            'imagesetthickness' => 'Safe\imagesetthickness',
            'imagesettile' => 'Safe\imagesettile',
            'imagestring' => 'Safe\imagestring',
            'imagestringup' => 'Safe\imagestringup',
            'imagetruecolortopalette' => 'Safe\imagetruecolortopalette',
            'imagettfbbox' => 'Safe\imagettfbbox',
            'imagettftext' => 'Safe\imagettftext',
            'imagewbmp' => 'Safe\imagewbmp',
            'imagewebp' => 'Safe\imagewebp',
            'imagexbm' => 'Safe\imagexbm',
            'image_type_to_extension' => 'Safe\image_type_to_extension',
            'imap_8bit' => 'Safe\imap_8bit',
            'imap_append' => 'Safe\imap_append',
            'imap_base64' => 'Safe\imap_base64',
            'imap_binary' => 'Safe\imap_binary',
            'imap_body' => 'Safe\imap_body',
            'imap_bodystruct' => 'Safe\imap_bodystruct',
            'imap_check' => 'Safe\imap_check',
            'imap_clearflag_full' => 'Safe\imap_clearflag_full',
            'imap_close' => 'Safe\imap_close',
            'imap_createmailbox' => 'Safe\imap_createmailbox',
            'imap_deletemailbox' => 'Safe\imap_deletemailbox',
            'imap_fetchbody' => 'Safe\imap_fetchbody',
            'imap_fetchheader' => 'Safe\imap_fetchheader',
            'imap_fetchmime' => 'Safe\imap_fetchmime',
            'imap_fetchstructure' => 'Safe\imap_fetchstructure',
            'imap_fetch_overview' => 'Safe\imap_fetch_overview',
            'imap_gc' => 'Safe\imap_gc',
            'imap_getacl' => 'Safe\imap_getacl',
            'imap_getmailboxes' => 'Safe\imap_getmailboxes',
            'imap_getsubscribed' => 'Safe\imap_getsubscribed',
            'imap_headerinfo' => 'Safe\imap_headerinfo',
            'imap_headers' => 'Safe\imap_headers',
            'imap_listscan' => 'Safe\imap_listscan',
            'imap_lsub' => 'Safe\imap_lsub',
            'imap_mail' => 'Safe\imap_mail',
            'imap_mailboxmsginfo' => 'Safe\imap_mailboxmsginfo',
            'imap_mail_compose' => 'Safe\imap_mail_compose',
            'imap_mail_copy' => 'Safe\imap_mail_copy',
            'imap_mail_move' => 'Safe\imap_mail_move',
            'imap_mime_header_decode' => 'Safe\imap_mime_header_decode',
            'imap_mutf7_to_utf8' => 'Safe\imap_mutf7_to_utf8',
            'imap_num_msg' => 'Safe\imap_num_msg',
            'imap_open' => 'Safe\imap_open',
            'imap_qprint' => 'Safe\imap_qprint',
            'imap_renamemailbox' => 'Safe\imap_renamemailbox',
            'imap_rfc822_write_address' => 'Safe\imap_rfc822_write_address',
            'imap_savebody' => 'Safe\imap_savebody',
            'imap_setacl' => 'Safe\imap_setacl',
            'imap_setflag_full' => 'Safe\imap_setflag_full',
            'imap_set_quota' => 'Safe\imap_set_quota',
            'imap_sort' => 'Safe\imap_sort',
            'imap_status' => 'Safe\imap_status',
            'imap_subscribe' => 'Safe\imap_subscribe',
            'imap_thread' => 'Safe\imap_thread',
            'imap_timeout' => 'Safe\imap_timeout',
            'imap_undelete' => 'Safe\imap_undelete',
            'imap_unsubscribe' => 'Safe\imap_unsubscribe',
            'imap_utf8_to_mutf7' => 'Safe\imap_utf8_to_mutf7',
            'inet_ntop' => 'Safe\inet_ntop',
            'inet_pton' => 'Safe\inet_pton',
            'inflate_add' => 'Safe\inflate_add',
            'inflate_get_read_len' => 'Safe\inflate_get_read_len',
            'inflate_get_status' => 'Safe\inflate_get_status',
            'inflate_init' => 'Safe\inflate_init',
            'ini_get' => 'Safe\ini_get',
            'ini_set' => 'Safe\ini_set',
            'inotify_init' => 'Safe\inotify_init',
            'inotify_rm_watch' => 'Safe\inotify_rm_watch',
            'iptcembed' => 'Safe\iptcembed',
            'iptcparse' => 'Safe\iptcparse',
            'json_decode' => 'Safe\json_decode',
            'json_encode' => 'Safe\json_encode',
            'lchgrp' => 'Safe\lchgrp',
            'lchown' => 'Safe\lchown',
            'ldap_8859_to_t61' => 'Safe\ldap_8859_to_t61',
            'ldap_add' => 'Safe\ldap_add',
            'ldap_bind' => 'Safe\ldap_bind',
            'ldap_compare' => 'Safe\ldap_compare',
            'ldap_control_paged_result' => 'Safe\ldap_control_paged_result',
            'ldap_control_paged_result_response' => 'Safe\ldap_control_paged_result_response',
            'ldap_count_entries' => 'Safe\ldap_count_entries',
            'ldap_delete' => 'Safe\ldap_delete',
            'ldap_dn2ufn' => 'Safe\ldap_dn2ufn',
            'ldap_exop' => 'Safe\ldap_exop',
            'ldap_exop_passwd' => 'Safe\ldap_exop_passwd',
            'ldap_exop_whoami' => 'Safe\ldap_exop_whoami',
            'ldap_explode_dn' => 'Safe\ldap_explode_dn',
            'ldap_first_attribute' => 'Safe\ldap_first_attribute',
            'ldap_first_entry' => 'Safe\ldap_first_entry',
            'ldap_free_result' => 'Safe\ldap_free_result',
            'ldap_get_attributes' => 'Safe\ldap_get_attributes',
            'ldap_get_dn' => 'Safe\ldap_get_dn',
            'ldap_get_entries' => 'Safe\ldap_get_entries',
            'ldap_get_option' => 'Safe\ldap_get_option',
            'ldap_get_values' => 'Safe\ldap_get_values',
            'ldap_get_values_len' => 'Safe\ldap_get_values_len',
            'ldap_modify_batch' => 'Safe\ldap_modify_batch',
            'ldap_mod_add' => 'Safe\ldap_mod_add',
            'ldap_mod_del' => 'Safe\ldap_mod_del',
            'ldap_mod_replace' => 'Safe\ldap_mod_replace',
            'ldap_next_attribute' => 'Safe\ldap_next_attribute',
            'ldap_parse_exop' => 'Safe\ldap_parse_exop',
            'ldap_parse_result' => 'Safe\ldap_parse_result',
            'ldap_rename' => 'Safe\ldap_rename',
            'ldap_sasl_bind' => 'Safe\ldap_sasl_bind',
            'ldap_set_option' => 'Safe\ldap_set_option',
            'ldap_unbind' => 'Safe\ldap_unbind',
            'libxml_set_external_entity_loader' => 'Safe\libxml_set_external_entity_loader',
            'link' => 'Safe\link',
            'lstat' => 'Safe\lstat',
            'lzf_compress' => 'Safe\lzf_compress',
            'lzf_decompress' => 'Safe\lzf_decompress',
            'mailparse_msg_extract_part_file' => 'Safe\mailparse_msg_extract_part_file',
            'mailparse_msg_free' => 'Safe\mailparse_msg_free',
            'mailparse_msg_parse' => 'Safe\mailparse_msg_parse',
            'mailparse_msg_parse_file' => 'Safe\mailparse_msg_parse_file',
            'mailparse_stream_encode' => 'Safe\mailparse_stream_encode',
            'mb_chr' => 'Safe\mb_chr',
            'mb_convert_encoding' => 'Safe\mb_convert_encoding',
            'mb_convert_variables' => 'Safe\mb_convert_variables',
            'mb_detect_order' => 'Safe\mb_detect_order',
            'mb_encoding_aliases' => 'Safe\mb_encoding_aliases',
            'mb_eregi_replace' => 'Safe\mb_eregi_replace',
            'mb_ereg_replace' => 'Safe\mb_ereg_replace',
            'mb_ereg_replace_callback' => 'Safe\mb_ereg_replace_callback',
            'mb_ereg_search_getregs' => 'Safe\mb_ereg_search_getregs',
            'mb_ereg_search_init' => 'Safe\mb_ereg_search_init',
            'mb_ereg_search_regs' => 'Safe\mb_ereg_search_regs',
            'mb_ereg_search_setpos' => 'Safe\mb_ereg_search_setpos',
            'mb_get_info' => 'Safe\mb_get_info',
            'mb_http_output' => 'Safe\mb_http_output',
            'mb_internal_encoding' => 'Safe\mb_internal_encoding',
            'mb_ord' => 'Safe\mb_ord',
            'mb_parse_str' => 'Safe\mb_parse_str',
            'mb_regex_encoding' => 'Safe\mb_regex_encoding',
            'mb_send_mail' => 'Safe\mb_send_mail',
            'mb_split' => 'Safe\mb_split',
            'md5_file' => 'Safe\md5_file',
            'mime_content_type' => 'Safe\mime_content_type',
            'mkdir' => 'Safe\mkdir',
            'mktime' => 'Safe\mktime',
            'msg_get_queue' => 'Safe\msg_get_queue',
            'msg_queue_exists' => 'Safe\msg_queue_exists',
            'msg_receive' => 'Safe\msg_receive',
            'msg_remove_queue' => 'Safe\msg_remove_queue',
            'msg_send' => 'Safe\msg_send',
            'msg_set_queue' => 'Safe\msg_set_queue',
            'msg_stat_queue' => 'Safe\msg_stat_queue',
            'mysql_close' => 'Safe\mysql_close',
            'mysql_connect' => 'Safe\mysql_connect',
            'mysql_create_db' => 'Safe\mysql_create_db',
            'mysql_data_seek' => 'Safe\mysql_data_seek',
            'mysql_db_name' => 'Safe\mysql_db_name',
            'mysql_db_query' => 'Safe\mysql_db_query',
            'mysql_drop_db' => 'Safe\mysql_drop_db',
            'mysql_fetch_lengths' => 'Safe\mysql_fetch_lengths',
            'mysql_field_flags' => 'Safe\mysql_field_flags',
            'mysql_field_len' => 'Safe\mysql_field_len',
            'mysql_field_name' => 'Safe\mysql_field_name',
            'mysql_field_seek' => 'Safe\mysql_field_seek',
            'mysql_free_result' => 'Safe\mysql_free_result',
            'mysql_get_host_info' => 'Safe\mysql_get_host_info',
            'mysql_get_proto_info' => 'Safe\mysql_get_proto_info',
            'mysql_get_server_info' => 'Safe\mysql_get_server_info',
            'mysql_info' => 'Safe\mysql_info',
            'mysql_list_dbs' => 'Safe\mysql_list_dbs',
            'mysql_list_fields' => 'Safe\mysql_list_fields',
            'mysql_list_processes' => 'Safe\mysql_list_processes',
            'mysql_list_tables' => 'Safe\mysql_list_tables',
            'mysql_num_fields' => 'Safe\mysql_num_fields',
            'mysql_num_rows' => 'Safe\mysql_num_rows',
            'mysql_query' => 'Safe\mysql_query',
            'mysql_real_escape_string' => 'Safe\mysql_real_escape_string',
            'mysql_result' => 'Safe\mysql_result',
            'mysql_select_db' => 'Safe\mysql_select_db',
            'mysql_set_charset' => 'Safe\mysql_set_charset',
            'mysql_tablename' => 'Safe\mysql_tablename',
            'mysql_thread_id' => 'Safe\mysql_thread_id',
            'mysql_unbuffered_query' => 'Safe\mysql_unbuffered_query',
            'ob_clean' => 'Safe\ob_clean',
            'ob_end_clean' => 'Safe\ob_end_clean',
            'ob_end_flush' => 'Safe\ob_end_flush',
            'ob_flush' => 'Safe\ob_flush',
            'ob_get_clean' => 'Safe\ob_get_clean',
            'ob_start' => 'Safe\ob_start',
            'oci_bind_array_by_name' => 'Safe\oci_bind_array_by_name',
            'oci_bind_by_name' => 'Safe\oci_bind_by_name',
            'oci_cancel' => 'Safe\oci_cancel',
            'oci_commit' => 'Safe\oci_commit',
            'oci_connect' => 'Safe\oci_connect',
            'oci_define_by_name' => 'Safe\oci_define_by_name',
            'oci_execute' => 'Safe\oci_execute',
            'oci_field_name' => 'Safe\oci_field_name',
            'oci_field_precision' => 'Safe\oci_field_precision',
            'oci_field_scale' => 'Safe\oci_field_scale',
            'oci_field_size' => 'Safe\oci_field_size',
            'oci_field_type' => 'Safe\oci_field_type',
            'oci_field_type_raw' => 'Safe\oci_field_type_raw',
            'oci_free_descriptor' => 'Safe\oci_free_descriptor',
            'oci_free_statement' => 'Safe\oci_free_statement',
            'oci_new_collection' => 'Safe\oci_new_collection',
            'oci_new_connect' => 'Safe\oci_new_connect',
            'oci_new_cursor' => 'Safe\oci_new_cursor',
            'oci_new_descriptor' => 'Safe\oci_new_descriptor',
            'oci_num_rows' => 'Safe\oci_num_rows',
            'oci_parse' => 'Safe\oci_parse',
            'oci_pconnect' => 'Safe\oci_pconnect',
            'oci_register_taf_callback' => 'Safe\oci_register_taf_callback',
            'oci_result' => 'Safe\oci_result',
            'oci_rollback' => 'Safe\oci_rollback',
            'oci_server_version' => 'Safe\oci_server_version',
            'oci_set_action' => 'Safe\oci_set_action',
            'oci_set_call_timeout' => 'Safe\oci_set_call_timeout',
            'oci_set_client_identifier' => 'Safe\oci_set_client_identifier',
            'oci_set_client_info' => 'Safe\oci_set_client_info',
            'oci_set_db_operation' => 'Safe\oci_set_db_operation',
            'oci_set_edition' => 'Safe\oci_set_edition',
            'oci_set_module_name' => 'Safe\oci_set_module_name',
            'oci_set_prefetch' => 'Safe\oci_set_prefetch',
            'oci_statement_type' => 'Safe\oci_statement_type',
            'oci_unregister_taf_callback' => 'Safe\oci_unregister_taf_callback',
            'odbc_autocommit' => 'Safe\odbc_autocommit',
            'odbc_binmode' => 'Safe\odbc_binmode',
            'odbc_columnprivileges' => 'Safe\odbc_columnprivileges',
            'odbc_columns' => 'Safe\odbc_columns',
            'odbc_commit' => 'Safe\odbc_commit',
            'odbc_connect' => 'Safe\odbc_connect',
            'odbc_cursor' => 'Safe\odbc_cursor',
            'odbc_data_source' => 'Safe\odbc_data_source',
            'odbc_exec' => 'Safe\odbc_exec',
            'odbc_execute' => 'Safe\odbc_execute',
            'odbc_fetch_into' => 'Safe\odbc_fetch_into',
            'odbc_field_len' => 'Safe\odbc_field_len',
            'odbc_field_name' => 'Safe\odbc_field_name',
            'odbc_field_num' => 'Safe\odbc_field_num',
            'odbc_field_scale' => 'Safe\odbc_field_scale',
            'odbc_field_type' => 'Safe\odbc_field_type',
            'odbc_foreignkeys' => 'Safe\odbc_foreignkeys',
            'odbc_gettypeinfo' => 'Safe\odbc_gettypeinfo',
            'odbc_longreadlen' => 'Safe\odbc_longreadlen',
            'odbc_num_fields' => 'Safe\odbc_num_fields',
            'odbc_pconnect' => 'Safe\odbc_pconnect',
            'odbc_prepare' => 'Safe\odbc_prepare',
            'odbc_primarykeys' => 'Safe\odbc_primarykeys',
            'odbc_procedurecolumns' => 'Safe\odbc_procedurecolumns',
            'odbc_procedures' => 'Safe\odbc_procedures',
            'odbc_result' => 'Safe\odbc_result',
            'odbc_result_all' => 'Safe\odbc_result_all',
            'odbc_rollback' => 'Safe\odbc_rollback',
            'odbc_setoption' => 'Safe\odbc_setoption',
            'odbc_specialcolumns' => 'Safe\odbc_specialcolumns',
            'odbc_statistics' => 'Safe\odbc_statistics',
            'odbc_tableprivileges' => 'Safe\odbc_tableprivileges',
            'odbc_tables' => 'Safe\odbc_tables',
            'opcache_compile_file' => 'Safe\opcache_compile_file',
            'opcache_get_status' => 'Safe\opcache_get_status',
            'opendir' => 'Safe\opendir',
            'openlog' => 'Safe\openlog',
            'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length',
            'openssl_cms_decrypt' => 'Safe\openssl_cms_decrypt',
            'openssl_cms_encrypt' => 'Safe\openssl_cms_encrypt',
            'openssl_cms_read' => 'Safe\openssl_cms_read',
            'openssl_cms_sign' => 'Safe\openssl_cms_sign',
            'openssl_cms_verify' => 'Safe\openssl_cms_verify',
            'openssl_csr_export' => 'Safe\openssl_csr_export',
            'openssl_csr_export_to_file' => 'Safe\openssl_csr_export_to_file',
            'openssl_csr_get_public_key' => 'Safe\openssl_csr_get_public_key',
            'openssl_csr_get_subject' => 'Safe\openssl_csr_get_subject',
            'openssl_csr_new' => 'Safe\openssl_csr_new',
            'openssl_csr_sign' => 'Safe\openssl_csr_sign',
            'openssl_decrypt' => 'Safe\openssl_decrypt',
            'openssl_dh_compute_key' => 'Safe\openssl_dh_compute_key',
            'openssl_digest' => 'Safe\openssl_digest',
            'openssl_encrypt' => 'Safe\openssl_encrypt',
            'openssl_get_curve_names' => 'Safe\openssl_get_curve_names',
            'openssl_open' => 'Safe\openssl_open',
            'openssl_pbkdf2' => 'Safe\openssl_pbkdf2',
            'openssl_pkcs7_decrypt' => 'Safe\openssl_pkcs7_decrypt',
            'openssl_pkcs7_encrypt' => 'Safe\openssl_pkcs7_encrypt',
            'openssl_pkcs7_read' => 'Safe\openssl_pkcs7_read',
            'openssl_pkcs7_sign' => 'Safe\openssl_pkcs7_sign',
            'openssl_pkcs12_export' => 'Safe\openssl_pkcs12_export',
            'openssl_pkcs12_export_to_file' => 'Safe\openssl_pkcs12_export_to_file',
            'openssl_pkcs12_read' => 'Safe\openssl_pkcs12_read',
            'openssl_pkey_derive' => 'Safe\openssl_pkey_derive',
            'openssl_pkey_export' => 'Safe\openssl_pkey_export',
            'openssl_pkey_export_to_file' => 'Safe\openssl_pkey_export_to_file',
            'openssl_pkey_get_details' => 'Safe\openssl_pkey_get_details',
            'openssl_pkey_get_private' => 'Safe\openssl_pkey_get_private',
            'openssl_pkey_get_public' => 'Safe\openssl_pkey_get_public',
            'openssl_pkey_new' => 'Safe\openssl_pkey_new',
            'openssl_private_decrypt' => 'Safe\openssl_private_decrypt',
            'openssl_private_encrypt' => 'Safe\openssl_private_encrypt',
            'openssl_public_decrypt' => 'Safe\openssl_public_decrypt',
            'openssl_public_encrypt' => 'Safe\openssl_public_encrypt',
            'openssl_seal' => 'Safe\openssl_seal',
            'openssl_sign' => 'Safe\openssl_sign',
            'openssl_spki_export' => 'Safe\openssl_spki_export',
            'openssl_spki_export_challenge' => 'Safe\openssl_spki_export_challenge',
            'openssl_spki_new' => 'Safe\openssl_spki_new',
            'openssl_spki_verify' => 'Safe\openssl_spki_verify',
            'openssl_verify' => 'Safe\openssl_verify',
            'openssl_x509_checkpurpose' => 'Safe\openssl_x509_checkpurpose',
            'openssl_x509_export' => 'Safe\openssl_x509_export',
            'openssl_x509_export_to_file' => 'Safe\openssl_x509_export_to_file',
            'openssl_x509_fingerprint' => 'Safe\openssl_x509_fingerprint',
            'openssl_x509_read' => 'Safe\openssl_x509_read',
            'output_add_rewrite_var' => 'Safe\output_add_rewrite_var',
            'output_reset_rewrite_vars' => 'Safe\output_reset_rewrite_vars',
            'parse_ini_file' => 'Safe\parse_ini_file',
            'parse_ini_string' => 'Safe\parse_ini_string',
            'parse_url' => 'Safe\parse_url',
            'passthru' => 'Safe\passthru',
            'pclose' => 'Safe\pclose',
            'pcntl_getpriority' => 'Safe\pcntl_getpriority',
            'pcntl_setpriority' => 'Safe\pcntl_setpriority',
            'pcntl_signal' => 'Safe\pcntl_signal',
            'pcntl_signal_dispatch' => 'Safe\pcntl_signal_dispatch',
            'pcntl_sigprocmask' => 'Safe\pcntl_sigprocmask',
            'pcntl_sigtimedwait' => 'Safe\pcntl_sigtimedwait',
            'pcntl_sigwaitinfo' => 'Safe\pcntl_sigwaitinfo',
            'pfsockopen' => 'Safe\pfsockopen',
            'pg_cancel_query' => 'Safe\pg_cancel_query',
            'pg_connect' => 'Safe\pg_connect',
            'pg_connection_reset' => 'Safe\pg_connection_reset',
            'pg_convert' => 'Safe\pg_convert',
            'pg_copy_from' => 'Safe\pg_copy_from',
            'pg_copy_to' => 'Safe\pg_copy_to',
            'pg_delete' => 'Safe\pg_delete',
            'pg_end_copy' => 'Safe\pg_end_copy',
            'pg_execute' => 'Safe\pg_execute',
            'pg_field_num' => 'Safe\pg_field_num',
            'pg_field_table' => 'Safe\pg_field_table',
            'pg_flush' => 'Safe\pg_flush',
            'pg_free_result' => 'Safe\pg_free_result',
            'pg_host' => 'Safe\pg_host',
            'pg_insert' => 'Safe\pg_insert',
            'pg_last_oid' => 'Safe\pg_last_oid',
            'pg_lo_close' => 'Safe\pg_lo_close',
            'pg_lo_export' => 'Safe\pg_lo_export',
            'pg_lo_import' => 'Safe\pg_lo_import',
            'pg_lo_open' => 'Safe\pg_lo_open',
            'pg_lo_read' => 'Safe\pg_lo_read',
            'pg_lo_seek' => 'Safe\pg_lo_seek',
            'pg_lo_truncate' => 'Safe\pg_lo_truncate',
            'pg_lo_unlink' => 'Safe\pg_lo_unlink',
            'pg_lo_write' => 'Safe\pg_lo_write',
            'pg_meta_data' => 'Safe\pg_meta_data',
            'pg_parameter_status' => 'Safe\pg_parameter_status',
            'pg_pconnect' => 'Safe\pg_pconnect',
            'pg_ping' => 'Safe\pg_ping',
            'pg_prepare' => 'Safe\pg_prepare',
            'pg_put_line' => 'Safe\pg_put_line',
            'pg_query' => 'Safe\pg_query',
            'pg_query_params' => 'Safe\pg_query_params',
            'pg_result_error_field' => 'Safe\pg_result_error_field',
            'pg_result_seek' => 'Safe\pg_result_seek',
            'pg_select' => 'Safe\pg_select',
            'pg_socket' => 'Safe\pg_socket',
            'pg_trace' => 'Safe\pg_trace',
            'pg_update' => 'Safe\pg_update',
            'phpcredits' => 'Safe\phpcredits',
            'phpinfo' => 'Safe\phpinfo',
            'php_sapi_name' => 'Safe\php_sapi_name',
            'popen' => 'Safe\popen',
            'posix_access' => 'Safe\posix_access',
            'posix_getgrgid' => 'Safe\posix_getgrgid',
            'posix_getgrnam' => 'Safe\posix_getgrnam',
            'posix_getgroups' => 'Safe\posix_getgroups',
            'posix_getlogin' => 'Safe\posix_getlogin',
            'posix_getpgid' => 'Safe\posix_getpgid',
            'posix_getpwuid' => 'Safe\posix_getpwuid',
            'posix_getrlimit' => 'Safe\posix_getrlimit',
            'posix_getsid' => 'Safe\posix_getsid',
            'posix_initgroups' => 'Safe\posix_initgroups',
            'posix_kill' => 'Safe\posix_kill',
            'posix_mkfifo' => 'Safe\posix_mkfifo',
            'posix_mknod' => 'Safe\posix_mknod',
            'posix_setegid' => 'Safe\posix_setegid',
            'posix_seteuid' => 'Safe\posix_seteuid',
            'posix_setgid' => 'Safe\posix_setgid',
            'posix_setpgid' => 'Safe\posix_setpgid',
            'posix_setrlimit' => 'Safe\posix_setrlimit',
            'posix_setsid' => 'Safe\posix_setsid',
            'posix_setuid' => 'Safe\posix_setuid',
            'posix_times' => 'Safe\posix_times',
            'posix_uname' => 'Safe\posix_uname',
            'preg_grep' => 'Safe\preg_grep',
            'preg_match' => 'Safe\preg_match',
            'preg_match_all' => 'Safe\preg_match_all',
            'preg_replace' => 'Safe\preg_replace',
            'preg_replace_callback' => 'Safe\preg_replace_callback',
            'preg_replace_callback_array' => 'Safe\preg_replace_callback_array',
            'preg_split' => 'Safe\preg_split',
            'proc_close' => 'Safe\proc_close',
            'proc_nice' => 'Safe\proc_nice',
            'proc_open' => 'Safe\proc_open',
            'pspell_add_to_personal' => 'Safe\pspell_add_to_personal',
            'pspell_add_to_session' => 'Safe\pspell_add_to_session',
            'pspell_clear_session' => 'Safe\pspell_clear_session',
            'pspell_config_create' => 'Safe\pspell_config_create',
            'pspell_config_data_dir' => 'Safe\pspell_config_data_dir',
            'pspell_config_dict_dir' => 'Safe\pspell_config_dict_dir',
            'pspell_config_ignore' => 'Safe\pspell_config_ignore',
            'pspell_config_mode' => 'Safe\pspell_config_mode',
            'pspell_config_personal' => 'Safe\pspell_config_personal',
            'pspell_config_repl' => 'Safe\pspell_config_repl',
            'pspell_config_runtogether' => 'Safe\pspell_config_runtogether',
            'pspell_config_save_repl' => 'Safe\pspell_config_save_repl',
            'pspell_new' => 'Safe\pspell_new',
            'pspell_new_config' => 'Safe\pspell_new_config',
            'pspell_new_personal' => 'Safe\pspell_new_personal',
            'pspell_save_wordlist' => 'Safe\pspell_save_wordlist',
            'pspell_store_replacement' => 'Safe\pspell_store_replacement',
            'ps_add_launchlink' => 'Safe\ps_add_launchlink',
            'ps_add_locallink' => 'Safe\ps_add_locallink',
            'ps_add_note' => 'Safe\ps_add_note',
            'ps_add_pdflink' => 'Safe\ps_add_pdflink',
            'ps_add_weblink' => 'Safe\ps_add_weblink',
            'ps_arc' => 'Safe\ps_arc',
            'ps_arcn' => 'Safe\ps_arcn',
            'ps_begin_page' => 'Safe\ps_begin_page',
            'ps_begin_pattern' => 'Safe\ps_begin_pattern',
            'ps_begin_template' => 'Safe\ps_begin_template',
            'ps_circle' => 'Safe\ps_circle',
            'ps_clip' => 'Safe\ps_clip',
            'ps_close' => 'Safe\ps_close',
            'ps_closepath' => 'Safe\ps_closepath',
            'ps_closepath_stroke' => 'Safe\ps_closepath_stroke',
            'ps_close_image' => 'Safe\ps_close_image',
            'ps_continue_text' => 'Safe\ps_continue_text',
            'ps_curveto' => 'Safe\ps_curveto',
            'ps_delete' => 'Safe\ps_delete',
            'ps_end_page' => 'Safe\ps_end_page',
            'ps_end_pattern' => 'Safe\ps_end_pattern',
            'ps_end_template' => 'Safe\ps_end_template',
            'ps_fill' => 'Safe\ps_fill',
            'ps_fill_stroke' => 'Safe\ps_fill_stroke',
            'ps_get_parameter' => 'Safe\ps_get_parameter',
            'ps_hyphenate' => 'Safe\ps_hyphenate',
            'ps_include_file' => 'Safe\ps_include_file',
            'ps_lineto' => 'Safe\ps_lineto',
            'ps_moveto' => 'Safe\ps_moveto',
            'ps_new' => 'Safe\ps_new',
            'ps_open_file' => 'Safe\ps_open_file',
            'ps_place_image' => 'Safe\ps_place_image',
            'ps_rect' => 'Safe\ps_rect',
            'ps_restore' => 'Safe\ps_restore',
            'ps_rotate' => 'Safe\ps_rotate',
            'ps_save' => 'Safe\ps_save',
            'ps_scale' => 'Safe\ps_scale',
            'ps_setcolor' => 'Safe\ps_setcolor',
            'ps_setdash' => 'Safe\ps_setdash',
            'ps_setflat' => 'Safe\ps_setflat',
            'ps_setfont' => 'Safe\ps_setfont',
            'ps_setgray' => 'Safe\ps_setgray',
            'ps_setlinecap' => 'Safe\ps_setlinecap',
            'ps_setlinejoin' => 'Safe\ps_setlinejoin',
            'ps_setlinewidth' => 'Safe\ps_setlinewidth',
            'ps_setmiterlimit' => 'Safe\ps_setmiterlimit',
            'ps_setoverprintmode' => 'Safe\ps_setoverprintmode',
            'ps_setpolydash' => 'Safe\ps_setpolydash',
            'ps_set_border_color' => 'Safe\ps_set_border_color',
            'ps_set_border_dash' => 'Safe\ps_set_border_dash',
            'ps_set_border_style' => 'Safe\ps_set_border_style',
            'ps_set_info' => 'Safe\ps_set_info',
            'ps_set_parameter' => 'Safe\ps_set_parameter',
            'ps_set_text_pos' => 'Safe\ps_set_text_pos',
            'ps_set_value' => 'Safe\ps_set_value',
            'ps_shading' => 'Safe\ps_shading',
            'ps_shading_pattern' => 'Safe\ps_shading_pattern',
            'ps_shfill' => 'Safe\ps_shfill',
            'ps_show' => 'Safe\ps_show',
            'ps_show2' => 'Safe\ps_show2',
            'ps_show_xy' => 'Safe\ps_show_xy',
            'ps_show_xy2' => 'Safe\ps_show_xy2',
            'ps_stroke' => 'Safe\ps_stroke',
            'ps_symbol' => 'Safe\ps_symbol',
            'ps_translate' => 'Safe\ps_translate',
            'putenv' => 'Safe\putenv',
            'readfile' => 'Safe\readfile',
            'readgzfile' => 'Safe\readgzfile',
            'readline_add_history' => 'Safe\readline_add_history',
            'readline_callback_handler_install' => 'Safe\readline_callback_handler_install',
            'readline_clear_history' => 'Safe\readline_clear_history',
            'readline_completion_function' => 'Safe\readline_completion_function',
            'readline_read_history' => 'Safe\readline_read_history',
            'readline_write_history' => 'Safe\readline_write_history',
            'readlink' => 'Safe\readlink',
            'realpath' => 'Safe\realpath',
            'register_tick_function' => 'Safe\register_tick_function',
            'rename' => 'Safe\rename',
            'rewind' => 'Safe\rewind',
            'rmdir' => 'Safe\rmdir',
            'rpmaddtag' => 'Safe\rpmaddtag',
            'rrd_create' => 'Safe\rrd_create',
            'rrd_first' => 'Safe\rrd_first',
            'rrd_graph' => 'Safe\rrd_graph',
            'rrd_info' => 'Safe\rrd_info',
            'rrd_lastupdate' => 'Safe\rrd_lastupdate',
            'rrd_restore' => 'Safe\rrd_restore',
            'rrd_tune' => 'Safe\rrd_tune',
            'rrd_update' => 'Safe\rrd_update',
            'rrd_xport' => 'Safe\rrd_xport',
            'sapi_windows_cp_conv' => 'Safe\sapi_windows_cp_conv',
            'sapi_windows_cp_set' => 'Safe\sapi_windows_cp_set',
            'sapi_windows_generate_ctrl_event' => 'Safe\sapi_windows_generate_ctrl_event',
            'sapi_windows_set_ctrl_handler' => 'Safe\sapi_windows_set_ctrl_handler',
            'sapi_windows_vt100_support' => 'Safe\sapi_windows_vt100_support',
            'scandir' => 'Safe\scandir',
            'sem_acquire' => 'Safe\sem_acquire',
            'sem_get' => 'Safe\sem_get',
            'sem_release' => 'Safe\sem_release',
            'sem_remove' => 'Safe\sem_remove',
            'session_abort' => 'Safe\session_abort',
            'session_cache_expire' => 'Safe\session_cache_expire',
            'session_cache_limiter' => 'Safe\session_cache_limiter',
            'session_create_id' => 'Safe\session_create_id',
            'session_decode' => 'Safe\session_decode',
            'session_destroy' => 'Safe\session_destroy',
            'session_encode' => 'Safe\session_encode',
            'session_gc' => 'Safe\session_gc',
            'session_id' => 'Safe\session_id',
            'session_module_name' => 'Safe\session_module_name',
            'session_name' => 'Safe\session_name',
            'session_regenerate_id' => 'Safe\session_regenerate_id',
            'session_reset' => 'Safe\session_reset',
            'session_save_path' => 'Safe\session_save_path',
            'session_start' => 'Safe\session_start',
            'session_unset' => 'Safe\session_unset',
            'session_write_close' => 'Safe\session_write_close',
            'settype' => 'Safe\settype',
            'set_include_path' => 'Safe\set_include_path',
            'set_time_limit' => 'Safe\set_time_limit',
            'sha1_file' => 'Safe\sha1_file',
            'shell_exec' => 'Safe\shell_exec',
            'shmop_delete' => 'Safe\shmop_delete',
            'shmop_read' => 'Safe\shmop_read',
            'shm_attach' => 'Safe\shm_attach',
            'shm_detach' => 'Safe\shm_detach',
            'shm_put_var' => 'Safe\shm_put_var',
            'shm_remove' => 'Safe\shm_remove',
            'shm_remove_var' => 'Safe\shm_remove_var',
            'simplexml_import_dom' => 'Safe\simplexml_import_dom',
            'simplexml_load_file' => 'Safe\simplexml_load_file',
            'simplexml_load_string' => 'Safe\simplexml_load_string',
            'socket_accept' => 'Safe\socket_accept',
            'socket_addrinfo_bind' => 'Safe\socket_addrinfo_bind',
            'socket_addrinfo_connect' => 'Safe\socket_addrinfo_connect',
            'socket_addrinfo_lookup' => 'Safe\socket_addrinfo_lookup',
            'socket_bind' => 'Safe\socket_bind',
            'socket_connect' => 'Safe\socket_connect',
            'socket_create' => 'Safe\socket_create',
            'socket_create_listen' => 'Safe\socket_create_listen',
            'socket_create_pair' => 'Safe\socket_create_pair',
            'socket_export_stream' => 'Safe\socket_export_stream',
            'socket_getpeername' => 'Safe\socket_getpeername',
            'socket_getsockname' => 'Safe\socket_getsockname',
            'socket_get_option' => 'Safe\socket_get_option',
            'socket_import_stream' => 'Safe\socket_import_stream',
            'socket_listen' => 'Safe\socket_listen',
            'socket_read' => 'Safe\socket_read',
            'socket_send' => 'Safe\socket_send',
            'socket_sendmsg' => 'Safe\socket_sendmsg',
            'socket_sendto' => 'Safe\socket_sendto',
            'socket_set_block' => 'Safe\socket_set_block',
            'socket_set_nonblock' => 'Safe\socket_set_nonblock',
            'socket_set_option' => 'Safe\socket_set_option',
            'socket_shutdown' => 'Safe\socket_shutdown',
            'socket_write' => 'Safe\socket_write',
            'socket_wsaprotocol_info_export' => 'Safe\socket_wsaprotocol_info_export',
            'socket_wsaprotocol_info_import' => 'Safe\socket_wsaprotocol_info_import',
            'socket_wsaprotocol_info_release' => 'Safe\socket_wsaprotocol_info_release',
            'sodium_crypto_aead_aes256gcm_decrypt' => 'Safe\sodium_crypto_aead_aes256gcm_decrypt',
            'sodium_crypto_aead_chacha20poly1305_decrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_decrypt',
            'sodium_crypto_aead_chacha20poly1305_encrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_encrypt',
            'sodium_crypto_aead_chacha20poly1305_ietf_decrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_ietf_decrypt',
            'sodium_crypto_aead_chacha20poly1305_ietf_encrypt' => 'Safe\sodium_crypto_aead_chacha20poly1305_ietf_encrypt',
            'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt' => 'Safe\sodium_crypto_aead_xchacha20poly1305_ietf_decrypt',
            'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt' => 'Safe\sodium_crypto_aead_xchacha20poly1305_ietf_encrypt',
            'sodium_crypto_box_open' => 'Safe\sodium_crypto_box_open',
            'sodium_crypto_box_seal_open' => 'Safe\sodium_crypto_box_seal_open',
            'sodium_crypto_generichash_update' => 'Safe\sodium_crypto_generichash_update',
            'sodium_crypto_secretbox_open' => 'Safe\sodium_crypto_secretbox_open',
            'sodium_crypto_sign_open' => 'Safe\sodium_crypto_sign_open',
            'solr_get_version' => 'Safe\solr_get_version',
            'spl_autoload_register' => 'Safe\spl_autoload_register',
            'spl_autoload_unregister' => 'Safe\spl_autoload_unregister',
            'sqlsrv_begin_transaction' => 'Safe\sqlsrv_begin_transaction',
            'sqlsrv_cancel' => 'Safe\sqlsrv_cancel',
            'sqlsrv_client_info' => 'Safe\sqlsrv_client_info',
            'sqlsrv_close' => 'Safe\sqlsrv_close',
            'sqlsrv_commit' => 'Safe\sqlsrv_commit',
            'sqlsrv_configure' => 'Safe\sqlsrv_configure',
            'sqlsrv_execute' => 'Safe\sqlsrv_execute',
            'sqlsrv_fetch' => 'Safe\sqlsrv_fetch',
            'sqlsrv_fetch_array' => 'Safe\sqlsrv_fetch_array',
            'sqlsrv_fetch_object' => 'Safe\sqlsrv_fetch_object',
            'sqlsrv_free_stmt' => 'Safe\sqlsrv_free_stmt',
            'sqlsrv_get_field' => 'Safe\sqlsrv_get_field',
            'sqlsrv_next_result' => 'Safe\sqlsrv_next_result',
            'sqlsrv_num_fields' => 'Safe\sqlsrv_num_fields',
            'sqlsrv_num_rows' => 'Safe\sqlsrv_num_rows',
            'sqlsrv_prepare' => 'Safe\sqlsrv_prepare',
            'sqlsrv_query' => 'Safe\sqlsrv_query',
            'sqlsrv_rollback' => 'Safe\sqlsrv_rollback',
            'ssdeep_fuzzy_compare' => 'Safe\ssdeep_fuzzy_compare',
            'ssdeep_fuzzy_hash' => 'Safe\ssdeep_fuzzy_hash',
            'ssdeep_fuzzy_hash_filename' => 'Safe\ssdeep_fuzzy_hash_filename',
            'ssh2_auth_agent' => 'Safe\ssh2_auth_agent',
            'ssh2_auth_hostbased_file' => 'Safe\ssh2_auth_hostbased_file',
            'ssh2_auth_password' => 'Safe\ssh2_auth_password',
            'ssh2_auth_pubkey_file' => 'Safe\ssh2_auth_pubkey_file',
            'ssh2_connect' => 'Safe\ssh2_connect',
            'ssh2_disconnect' => 'Safe\ssh2_disconnect',
            'ssh2_exec' => 'Safe\ssh2_exec',
            'ssh2_forward_accept' => 'Safe\ssh2_forward_accept',
            'ssh2_forward_listen' => 'Safe\ssh2_forward_listen',
            'ssh2_publickey_add' => 'Safe\ssh2_publickey_add',
            'ssh2_publickey_init' => 'Safe\ssh2_publickey_init',
            'ssh2_publickey_remove' => 'Safe\ssh2_publickey_remove',
            'ssh2_scp_recv' => 'Safe\ssh2_scp_recv',
            'ssh2_scp_send' => 'Safe\ssh2_scp_send',
            'ssh2_send_eof' => 'Safe\ssh2_send_eof',
            'ssh2_sftp' => 'Safe\ssh2_sftp',
            'ssh2_sftp_chmod' => 'Safe\ssh2_sftp_chmod',
            'ssh2_sftp_mkdir' => 'Safe\ssh2_sftp_mkdir',
            'ssh2_sftp_rename' => 'Safe\ssh2_sftp_rename',
            'ssh2_sftp_rmdir' => 'Safe\ssh2_sftp_rmdir',
            'ssh2_sftp_symlink' => 'Safe\ssh2_sftp_symlink',
            'ssh2_sftp_unlink' => 'Safe\ssh2_sftp_unlink',
            'ssh2_shell' => 'Safe\ssh2_shell',
            'stream_context_set_params' => 'Safe\stream_context_set_params',
            'stream_copy_to_stream' => 'Safe\stream_copy_to_stream',
            'stream_filter_append' => 'Safe\stream_filter_append',
            'stream_filter_prepend' => 'Safe\stream_filter_prepend',
            'stream_filter_register' => 'Safe\stream_filter_register',
            'stream_filter_remove' => 'Safe\stream_filter_remove',
            'stream_get_contents' => 'Safe\stream_get_contents',
            'stream_get_line' => 'Safe\stream_get_line',
            'stream_isatty' => 'Safe\stream_isatty',
            'stream_resolve_include_path' => 'Safe\stream_resolve_include_path',
            'stream_set_blocking' => 'Safe\stream_set_blocking',
            'stream_set_timeout' => 'Safe\stream_set_timeout',
            'stream_socket_accept' => 'Safe\stream_socket_accept',
            'stream_socket_client' => 'Safe\stream_socket_client',
            'stream_socket_get_name' => 'Safe\stream_socket_get_name',
            'stream_socket_pair' => 'Safe\stream_socket_pair',
            'stream_socket_server' => 'Safe\stream_socket_server',
            'stream_socket_shutdown' => 'Safe\stream_socket_shutdown',
            'stream_supports_lock' => 'Safe\stream_supports_lock',
            'stream_wrapper_register' => 'Safe\stream_wrapper_register',
            'stream_wrapper_restore' => 'Safe\stream_wrapper_restore',
            'stream_wrapper_unregister' => 'Safe\stream_wrapper_unregister',
            'strftime' => 'Safe\strftime',
            'strptime' => 'Safe\strptime',
            'strtotime' => 'Safe\strtotime',
            'swoole_async_dns_lookup' => 'Safe\swoole_async_dns_lookup',
            'swoole_async_readfile' => 'Safe\swoole_async_readfile',
            'swoole_async_write' => 'Safe\swoole_async_write',
            'swoole_async_writefile' => 'Safe\swoole_async_writefile',
            'swoole_event_defer' => 'Safe\swoole_event_defer',
            'swoole_event_del' => 'Safe\swoole_event_del',
            'swoole_event_write' => 'Safe\swoole_event_write',
            'symlink' => 'Safe\symlink',
            'syslog' => 'Safe\syslog',
            'system' => 'Safe\system',
            'sys_getloadavg' => 'Safe\sys_getloadavg',
            'tempnam' => 'Safe\tempnam',
            'timezone_name_from_abbr' => 'Safe\timezone_name_from_abbr',
            'time_nanosleep' => 'Safe\time_nanosleep',
            'time_sleep_until' => 'Safe\time_sleep_until',
            'tmpfile' => 'Safe\tmpfile',
            'touch' => 'Safe\touch',
            'unixtojd' => 'Safe\unixtojd',
            'unlink' => 'Safe\unlink',
            'unpack' => 'Safe\unpack',
            'unserialize' => 'Safe\unserialize',
            'uopz_extend' => 'Safe\uopz_extend',
            'uopz_implement' => 'Safe\uopz_implement',
            'variant_date_to_timestamp' => 'Safe\variant_date_to_timestamp',
            'variant_round' => 'Safe\variant_round',
            'virtual' => 'Safe\virtual',
            'xdiff_file_bdiff' => 'Safe\xdiff_file_bdiff',
            'xdiff_file_bpatch' => 'Safe\xdiff_file_bpatch',
            'xdiff_file_diff' => 'Safe\xdiff_file_diff',
            'xdiff_file_diff_binary' => 'Safe\xdiff_file_diff_binary',
            'xdiff_file_patch_binary' => 'Safe\xdiff_file_patch_binary',
            'xdiff_file_rabdiff' => 'Safe\xdiff_file_rabdiff',
            'xdiff_string_bpatch' => 'Safe\xdiff_string_bpatch',
            'xdiff_string_patch' => 'Safe\xdiff_string_patch',
            'xdiff_string_patch_binary' => 'Safe\xdiff_string_patch_binary',
            'xmlrpc_set_type' => 'Safe\xmlrpc_set_type',
            'xml_parser_free' => 'Safe\xml_parser_free',
            'xml_set_character_data_handler' => 'Safe\xml_set_character_data_handler',
            'xml_set_default_handler' => 'Safe\xml_set_default_handler',
            'xml_set_element_handler' => 'Safe\xml_set_element_handler',
            'xml_set_end_namespace_decl_handler' => 'Safe\xml_set_end_namespace_decl_handler',
            'xml_set_external_entity_ref_handler' => 'Safe\xml_set_external_entity_ref_handler',
            'xml_set_notation_decl_handler' => 'Safe\xml_set_notation_decl_handler',
            'xml_set_object' => 'Safe\xml_set_object',
            'xml_set_processing_instruction_handler' => 'Safe\xml_set_processing_instruction_handler',
            'xml_set_start_namespace_decl_handler' => 'Safe\xml_set_start_namespace_decl_handler',
            'xml_set_unparsed_entity_decl_handler' => 'Safe\xml_set_unparsed_entity_decl_handler',
            'yaml_parse' => 'Safe\yaml_parse',
            'yaml_parse_file' => 'Safe\yaml_parse_file',
            'yaml_parse_url' => 'Safe\yaml_parse_url',
            'yaz_ccl_parse' => 'Safe\yaz_ccl_parse',
            'yaz_close' => 'Safe\yaz_close',
            'yaz_connect' => 'Safe\yaz_connect',
            'yaz_database' => 'Safe\yaz_database',
            'yaz_element' => 'Safe\yaz_element',
            'yaz_present' => 'Safe\yaz_present',
            'yaz_search' => 'Safe\yaz_search',
            'yaz_wait' => 'Safe\yaz_wait',
            'zip_entry_close' => 'Safe\zip_entry_close',
            'zip_entry_compressedsize' => 'Safe\zip_entry_compressedsize',
            'zip_entry_compressionmethod' => 'Safe\zip_entry_compressionmethod',
            'zip_entry_filesize' => 'Safe\zip_entry_filesize',
            'zip_entry_name' => 'Safe\zip_entry_name',
            'zip_entry_open' => 'Safe\zip_entry_open',
            'zip_entry_read' => 'Safe\zip_entry_read',
            'zlib_decode' => 'Safe\zlib_decode',
        ]
    );
};
PK       ! %W      fileinfo.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FileinfoException;

/**
 * @param \finfo $finfo
 * @throws FileinfoException
 *
 */
function finfo_close(\finfo $finfo): void
{
    error_clear_last();
    $safeResult = \finfo_close($finfo);
    if ($safeResult === false) {
        throw FileinfoException::createFromPhpError();
    }
}


/**
 * @param int $flags
 * @param null|string $magic_database
 * @return \finfo
 * @throws FileinfoException
 *
 */
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): \finfo
{
    error_clear_last();
    if ($magic_database !== null) {
        $safeResult = \finfo_open($flags, $magic_database);
    } else {
        $safeResult = \finfo_open($flags);
    }
    if ($safeResult === false) {
        throw FileinfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource|string $filename
 * @return string
 * @throws FileinfoException
 *
 */
function mime_content_type($filename): string
{
    error_clear_last();
    $safeResult = \mime_content_type($filename);
    if ($safeResult === false) {
        throw FileinfoException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! cH    
  libxml.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\LibxmlException;

/**
 * @param callable $resolver_function
 * @throws LibxmlException
 *
 */
function libxml_set_external_entity_loader(callable $resolver_function): void
{
    error_clear_last();
    $safeResult = \libxml_set_external_entity_loader($resolver_function);
    if ($safeResult === false) {
        throw LibxmlException::createFromPhpError();
    }
}
PK       ! NtD  D    gmp.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\GmpException;

/**
 * @param \GMP|int|string $seed
 * @throws GmpException
 *
 */
function gmp_random_seed($seed): void
{
    error_clear_last();
    $safeResult = \gmp_random_seed($seed);
    if ($safeResult === false) {
        throw GmpException::createFromPhpError();
    }
}
PK       ! |IG  IG  	  pgsql.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PgsqlException;

/**
 * @param \PgSql\Connection $connection
 * @throws PgsqlException
 *
 */
function pg_cancel_query(\PgSql\Connection $connection): void
{
    error_clear_last();
    $safeResult = \pg_cancel_query($connection);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param string $connection_string
 * @param int $flags
 * @return \PgSql\Connection
 * @throws PgsqlException
 *
 */
function pg_connect(string $connection_string, int $flags = 0): \PgSql\Connection
{
    error_clear_last();
    $safeResult = \pg_connect($connection_string, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @throws PgsqlException
 *
 */
function pg_connection_reset(\PgSql\Connection $connection): void
{
    error_clear_last();
    $safeResult = \pg_connection_reset($connection);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $values
 * @param int $flags
 * @return array
 * @throws PgsqlException
 *
 */
function pg_convert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = 0): array
{
    error_clear_last();
    $safeResult = \pg_convert($connection, $table_name, $values, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $rows
 * @param string $separator
 * @param string $null_as
 * @throws PgsqlException
 *
 */
function pg_copy_from(\PgSql\Connection $connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): void
{
    error_clear_last();
    $safeResult = \pg_copy_from($connection, $table_name, $rows, $separator, $null_as);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param string $separator
 * @param string $null_as
 * @return array
 * @throws PgsqlException
 *
 */
function pg_copy_to(\PgSql\Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array
{
    error_clear_last();
    $safeResult = \pg_copy_to($connection, $table_name, $separator, $null_as);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $conditions
 * @param int $flags
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_delete(\PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC)
{
    error_clear_last();
    $safeResult = \pg_delete($connection, $table_name, $conditions, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection|null $connection
 * @throws PgsqlException
 *
 */
function pg_end_copy(?\PgSql\Connection $connection = null): void
{
    error_clear_last();
    if ($connection !== null) {
        $safeResult = \pg_end_copy($connection);
    } else {
        $safeResult = \pg_end_copy();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $stmtname
 * @param array $params
 * @return \PgSql\Result
 * @throws PgsqlException
 *
 */
function pg_execute(?\PgSql\Connection $connection = null, ?string $stmtname = null, ?array $params = null): \PgSql\Result
{
    error_clear_last();
    if ($params !== null) {
        $safeResult = \pg_execute($connection, $stmtname, $params);
    } elseif ($stmtname !== null) {
        $safeResult = \pg_execute($connection, $stmtname);
    } elseif ($connection !== null) {
        $safeResult = \pg_execute($connection);
    } else {
        $safeResult = \pg_execute();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @param string $field
 * @return int
 * @throws PgsqlException
 *
 */
function pg_field_num(\PgSql\Result $result, string $field): int
{
    error_clear_last();
    $safeResult = \pg_field_num($result, $field);
    if ($safeResult === -1) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @param int $field
 * @param bool $oid_only
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_field_table(\PgSql\Result $result, int $field, bool $oid_only = false)
{
    error_clear_last();
    $safeResult = \pg_field_table($result, $field, $oid_only);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_flush(\PgSql\Connection $connection)
{
    error_clear_last();
    $safeResult = \pg_flush($connection);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @throws PgsqlException
 *
 */
function pg_free_result(\PgSql\Result $result): void
{
    error_clear_last();
    $safeResult = \pg_free_result($result);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection|null $connection
 * @return string
 * @throws PgsqlException
 *
 */
function pg_host(?\PgSql\Connection $connection = null): string
{
    error_clear_last();
    if ($connection !== null) {
        $safeResult = \pg_host($connection);
    } else {
        $safeResult = \pg_host();
    }
    if ($safeResult === '') {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $values
 * @param int $flags
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_insert(\PgSql\Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC)
{
    error_clear_last();
    $safeResult = \pg_insert($connection, $table_name, $values, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @return string
 * @throws PgsqlException
 *
 */
function pg_last_oid(\PgSql\Result $result): string
{
    error_clear_last();
    $safeResult = \pg_last_oid($result);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Lob $lob
 * @throws PgsqlException
 *
 */
function pg_lo_close(\PgSql\Lob $lob): void
{
    error_clear_last();
    $safeResult = \pg_lo_close($lob);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param int $oid
 * @param string $pathname
 * @throws PgsqlException
 *
 */
function pg_lo_export(?\PgSql\Connection $connection = null, ?int $oid = null, ?string $pathname = null): void
{
    error_clear_last();
    if ($pathname !== null) {
        $safeResult = \pg_lo_export($connection, $oid, $pathname);
    } elseif ($oid !== null) {
        $safeResult = \pg_lo_export($connection, $oid);
    } elseif ($connection !== null) {
        $safeResult = \pg_lo_export($connection);
    } else {
        $safeResult = \pg_lo_export();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $pathname
 * @param  $object_id
 * @return int
 * @throws PgsqlException
 *
 */
function pg_lo_import(?\PgSql\Connection $connection = null, ?string $pathname = null, $object_id = null): int
{
    error_clear_last();
    if ($object_id !== null) {
        $safeResult = \pg_lo_import($connection, $pathname, $object_id);
    } elseif ($pathname !== null) {
        $safeResult = \pg_lo_import($connection, $pathname);
    } elseif ($connection !== null) {
        $safeResult = \pg_lo_import($connection);
    } else {
        $safeResult = \pg_lo_import();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param int $oid
 * @param string $mode
 * @return \PgSql\Lob
 * @throws PgsqlException
 *
 */
function pg_lo_open(\PgSql\Connection $connection, int $oid, string $mode): \PgSql\Lob
{
    error_clear_last();
    $safeResult = \pg_lo_open($connection, $oid, $mode);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Lob $lob
 * @param int $length
 * @return string
 * @throws PgsqlException
 *
 */
function pg_lo_read(\PgSql\Lob $lob, int $length = 8192): string
{
    error_clear_last();
    $safeResult = \pg_lo_read($lob, $length);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Lob $lob
 * @param int $offset
 * @param int $whence
 * @throws PgsqlException
 *
 */
function pg_lo_seek(\PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): void
{
    error_clear_last();
    $safeResult = \pg_lo_seek($lob, $offset, $whence);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Lob $lob
 * @param int $size
 * @throws PgsqlException
 *
 */
function pg_lo_truncate(\PgSql\Lob $lob, int $size): void
{
    error_clear_last();
    $safeResult = \pg_lo_truncate($lob, $size);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param int $oid
 * @throws PgsqlException
 *
 */
function pg_lo_unlink(\PgSql\Connection $connection, int $oid): void
{
    error_clear_last();
    $safeResult = \pg_lo_unlink($connection, $oid);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Lob $lob
 * @param string $data
 * @param int|null $length
 * @return int
 * @throws PgsqlException
 *
 */
function pg_lo_write(\PgSql\Lob $lob, string $data, ?int $length = null): int
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \pg_lo_write($lob, $data, $length);
    } else {
        $safeResult = \pg_lo_write($lob, $data);
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param bool $extended
 * @return array
 * @throws PgsqlException
 *
 */
function pg_meta_data(\PgSql\Connection $connection, string $table_name, bool $extended = false): array
{
    error_clear_last();
    $safeResult = \pg_meta_data($connection, $table_name, $extended);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $param_name
 * @return string
 * @throws PgsqlException
 *
 */
function pg_parameter_status(?\PgSql\Connection $connection = null, ?string $param_name = null): string
{
    error_clear_last();
    if ($param_name !== null) {
        $safeResult = \pg_parameter_status($connection, $param_name);
    } elseif ($connection !== null) {
        $safeResult = \pg_parameter_status($connection);
    } else {
        $safeResult = \pg_parameter_status();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $connection_string
 * @param int $flags
 * @return \PgSql\Connection
 * @throws PgsqlException
 *
 */
function pg_pconnect(string $connection_string, int $flags = 0): \PgSql\Connection
{
    error_clear_last();
    $safeResult = \pg_pconnect($connection_string, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection|null $connection
 * @throws PgsqlException
 *
 */
function pg_ping(?\PgSql\Connection $connection = null): void
{
    error_clear_last();
    if ($connection !== null) {
        $safeResult = \pg_ping($connection);
    } else {
        $safeResult = \pg_ping();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $stmtname
 * @param string $query
 * @return \PgSql\Result
 * @throws PgsqlException
 *
 */
function pg_prepare(?\PgSql\Connection $connection = null, ?string $stmtname = null, ?string $query = null): \PgSql\Result
{
    error_clear_last();
    if ($query !== null) {
        $safeResult = \pg_prepare($connection, $stmtname, $query);
    } elseif ($stmtname !== null) {
        $safeResult = \pg_prepare($connection, $stmtname);
    } elseif ($connection !== null) {
        $safeResult = \pg_prepare($connection);
    } else {
        $safeResult = \pg_prepare();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $data
 * @throws PgsqlException
 *
 */
function pg_put_line(?\PgSql\Connection $connection = null, ?string $data = null): void
{
    error_clear_last();
    if ($data !== null) {
        $safeResult = \pg_put_line($connection, $data);
    } elseif ($connection !== null) {
        $safeResult = \pg_put_line($connection);
    } else {
        $safeResult = \pg_put_line();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $query
 * @param array $params
 * @return \PgSql\Result
 * @throws PgsqlException
 *
 */
function pg_query_params(?\PgSql\Connection $connection = null, ?string $query = null, ?array $params = null): \PgSql\Result
{
    error_clear_last();
    if ($params !== null) {
        $safeResult = \pg_query_params($connection, $query, $params);
    } elseif ($query !== null) {
        $safeResult = \pg_query_params($connection, $query);
    } elseif ($connection !== null) {
        $safeResult = \pg_query_params($connection);
    } else {
        $safeResult = \pg_query_params();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @param string $query
 * @return \PgSql\Result
 * @throws PgsqlException
 *
 */
function pg_query(?\PgSql\Connection $connection = null, ?string $query = null): \PgSql\Result
{
    error_clear_last();
    if ($query !== null) {
        $safeResult = \pg_query($connection, $query);
    } elseif ($connection !== null) {
        $safeResult = \pg_query($connection);
    } else {
        $safeResult = \pg_query();
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @param int $field_code
 * @return null|string
 * @throws PgsqlException
 *
 */
function pg_result_error_field(\PgSql\Result $result, int $field_code): ?string
{
    error_clear_last();
    $safeResult = \pg_result_error_field($result, $field_code);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Result $result
 * @param int $row
 * @throws PgsqlException
 *
 */
function pg_result_seek(\PgSql\Result $result, int $row): void
{
    error_clear_last();
    $safeResult = \pg_result_seek($result, $row);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $conditions
 * @param int $flags
 * @param int $mode
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_select(\PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC)
{
    error_clear_last();
    $safeResult = \pg_select($connection, $table_name, $conditions, $flags, $mode);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \PgSql\Connection $connection
 * @return resource
 * @throws PgsqlException
 *
 */
function pg_socket(\PgSql\Connection $connection)
{
    error_clear_last();
    $safeResult = \pg_socket($connection);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param string $mode
 * @param \PgSql\Connection|null $connection
 * @throws PgsqlException
 *
 */
function pg_trace(string $filename, string $mode = "w", ?\PgSql\Connection $connection = null): void
{
    error_clear_last();
    if ($connection !== null) {
        $safeResult = \pg_trace($filename, $mode, $connection);
    } else {
        $safeResult = \pg_trace($filename, $mode);
    }
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
}


/**
 * @param \PgSql\Connection $connection
 * @param string $table_name
 * @param array $values
 * @param array $conditions
 * @param int $flags
 * @return mixed
 * @throws PgsqlException
 *
 */
function pg_update(\PgSql\Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC)
{
    error_clear_last();
    $safeResult = \pg_update($connection, $table_name, $values, $conditions, $flags);
    if ($safeResult === false) {
        throw PgsqlException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! +vkR	  R	    dir.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\DirException;

/**
 * @param string $directory
 * @throws DirException
 *
 */
function chdir(string $directory): void
{
    error_clear_last();
    $safeResult = \chdir($directory);
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
}


/**
 * @param string $directory
 * @throws DirException
 *
 */
function chroot(string $directory): void
{
    error_clear_last();
    $safeResult = \chroot($directory);
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
}


/**
 * @param string $directory
 * @param null|resource $context
 * @return \Directory
 * @throws DirException
 *
 */
function dir(string $directory, $context = null): \Directory
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \dir($directory, $context);
    } else {
        $safeResult = \dir($directory);
    }
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return non-empty-string
 * @throws DirException
 *
 */
function getcwd(): string
{
    error_clear_last();
    $safeResult = \getcwd();
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $directory
 * @param null|resource $context
 * @return resource
 * @throws DirException
 *
 */
function opendir(string $directory, $context = null)
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \opendir($directory, $context);
    } else {
        $safeResult = \opendir($directory);
    }
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $directory
 * @param SCANDIR_SORT_ASCENDING|SCANDIR_SORT_DESCENDING|SCANDIR_SORT_NONE $sorting_order
 * @param null|resource $context
 * @return list
 * @throws DirException
 *
 */
function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \scandir($directory, $sorting_order, $context);
    } else {
        $safeResult = \scandir($directory, $sorting_order);
    }
    if ($safeResult === false) {
        throw DirException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! $[  [  
  cubrid.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\CubridException;

/**
 * @param resource $req_identifier
 * @param int $bind_index
 * @param mixed $bind_value
 * @param string $bind_value_type
 * @throws CubridException
 *
 */
function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bind_value_type = null): void
{
    error_clear_last();
    if ($bind_value_type !== null) {
        $safeResult = \cubrid_bind($req_identifier, $bind_index, $bind_value, $bind_value_type);
    } else {
        $safeResult = \cubrid_bind($req_identifier, $bind_index, $bind_value);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @return int
 * @throws CubridException
 *
 */
function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int
{
    error_clear_last();
    $safeResult = \cubrid_col_size($conn_identifier, $oid, $attr_name);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $req_identifier
 * @return array
 * @throws CubridException
 *
 */
function cubrid_column_names($req_identifier): array
{
    error_clear_last();
    $safeResult = \cubrid_column_names($req_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $req_identifier
 * @return array
 * @throws CubridException
 *
 */
function cubrid_column_types($req_identifier): array
{
    error_clear_last();
    $safeResult = \cubrid_column_types($req_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @throws CubridException
 *
 */
function cubrid_commit($conn_identifier): void
{
    error_clear_last();
    $safeResult = \cubrid_commit($conn_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param string $conn_url
 * @param string $userid
 * @param string $passwd
 * @param bool $new_link
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?string $passwd = null, bool $new_link = false)
{
    error_clear_last();
    if ($new_link !== false) {
        $safeResult = \cubrid_connect_with_url($conn_url, $userid, $passwd, $new_link);
    } elseif ($passwd !== null) {
        $safeResult = \cubrid_connect_with_url($conn_url, $userid, $passwd);
    } elseif ($userid !== null) {
        $safeResult = \cubrid_connect_with_url($conn_url, $userid);
    } else {
        $safeResult = \cubrid_connect_with_url($conn_url);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $host
 * @param int $port
 * @param string $dbname
 * @param string $userid
 * @param string $passwd
 * @param bool $new_link
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_connect(string $host, int $port, string $dbname, ?string $userid = null, ?string $passwd = null, bool $new_link = false)
{
    error_clear_last();
    if ($new_link !== false) {
        $safeResult = \cubrid_connect($host, $port, $dbname, $userid, $passwd, $new_link);
    } elseif ($passwd !== null) {
        $safeResult = \cubrid_connect($host, $port, $dbname, $userid, $passwd);
    } elseif ($userid !== null) {
        $safeResult = \cubrid_connect($host, $port, $dbname, $userid);
    } else {
        $safeResult = \cubrid_connect($host, $port, $dbname);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $req_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_current_oid($req_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_current_oid($req_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @throws CubridException
 *
 */
function cubrid_disconnect($conn_identifier = null): void
{
    error_clear_last();
    if ($conn_identifier !== null) {
        $safeResult = \cubrid_disconnect($conn_identifier);
    } else {
        $safeResult = \cubrid_disconnect();
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @throws CubridException
 *
 */
function cubrid_drop($conn_identifier, string $oid): void
{
    error_clear_last();
    $safeResult = \cubrid_drop($conn_identifier, $oid);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $req_identifier
 * @throws CubridException
 *
 */
function cubrid_free_result($req_identifier): void
{
    error_clear_last();
    $safeResult = \cubrid_free_result($req_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_get_charset($conn_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_get_charset($conn_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @return string
 * @throws CubridException
 *
 */
function cubrid_get_class_name($conn_identifier, string $oid): string
{
    error_clear_last();
    $safeResult = \cubrid_get_class_name($conn_identifier, $oid);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return string
 * @throws CubridException
 *
 */
function cubrid_get_client_info(): string
{
    error_clear_last();
    $safeResult = \cubrid_get_client_info();
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @return array
 * @throws CubridException
 *
 */
function cubrid_get_db_parameter($conn_identifier): array
{
    error_clear_last();
    $safeResult = \cubrid_get_db_parameter($conn_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $req_identifier
 * @return int
 * @throws CubridException
 *
 */
function cubrid_get_query_timeout($req_identifier): int
{
    error_clear_last();
    $safeResult = \cubrid_get_query_timeout($req_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_get_server_info($conn_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_get_server_info($conn_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_insert_id($conn_identifier = null): string
{
    error_clear_last();
    if ($conn_identifier !== null) {
        $safeResult = \cubrid_insert_id($conn_identifier);
    } else {
        $safeResult = \cubrid_insert_id();
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $lob_identifier_array
 * @throws CubridException
 *
 */
function cubrid_lob_close(array $lob_identifier_array): void
{
    error_clear_last();
    $safeResult = \cubrid_lob_close($lob_identifier_array);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param resource $lob_identifier
 * @param string $path_name
 * @throws CubridException
 *
 */
function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name): void
{
    error_clear_last();
    $safeResult = \cubrid_lob_export($conn_identifier, $lob_identifier, $path_name);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $sql
 * @return array
 * @throws CubridException
 *
 */
function cubrid_lob_get($conn_identifier, string $sql): array
{
    error_clear_last();
    $safeResult = \cubrid_lob_get($conn_identifier, $sql);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @param resource $lob_identifier
 * @throws CubridException
 *
 */
function cubrid_lob_send($conn_identifier, $lob_identifier): void
{
    error_clear_last();
    $safeResult = \cubrid_lob_send($conn_identifier, $lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_lob_size($lob_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_lob_size($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $req_identifier
 * @param int $bind_index
 * @param mixed $bind_value
 * @param string $bind_value_type
 * @throws CubridException
 *
 */
function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string $bind_value_type = null): void
{
    error_clear_last();
    if ($bind_value_type !== null) {
        $safeResult = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value, $bind_value_type);
    } else {
        $safeResult = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @throws CubridException
 *
 */
function cubrid_lob2_close($lob_identifier): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_close($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @param string $file_name
 * @throws CubridException
 *
 */
function cubrid_lob2_export($lob_identifier, string $file_name): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_export($lob_identifier, $file_name);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @param string $file_name
 * @throws CubridException
 *
 */
function cubrid_lob2_import($lob_identifier, string $file_name): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_import($lob_identifier, $file_name);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $type
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB")
{
    error_clear_last();
    if ($type !== "BLOB") {
        $safeResult = \cubrid_lob2_new($conn_identifier, $type);
    } elseif ($conn_identifier !== null) {
        $safeResult = \cubrid_lob2_new($conn_identifier);
    } else {
        $safeResult = \cubrid_lob2_new();
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @param int $len
 * @return string
 * @throws CubridException
 *
 */
function cubrid_lob2_read($lob_identifier, int $len): string
{
    error_clear_last();
    $safeResult = \cubrid_lob2_read($lob_identifier, $len);
    if ($safeResult === null) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @param int $offset
 * @param int $origin
 * @throws CubridException
 *
 */
function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_seek($lob_identifier, $offset, $origin);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @param string $offset
 * @param int $origin
 * @throws CubridException
 *
 */
function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRID_CURSOR_CURRENT): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_seek64($lob_identifier, $offset, $origin);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $lob_identifier
 * @return int
 * @throws CubridException
 *
 */
function cubrid_lob2_size($lob_identifier): int
{
    error_clear_last();
    $safeResult = \cubrid_lob2_size($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_lob2_size64($lob_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_lob2_size64($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @return int
 * @throws CubridException
 *
 */
function cubrid_lob2_tell($lob_identifier): int
{
    error_clear_last();
    $safeResult = \cubrid_lob2_tell($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @return string
 * @throws CubridException
 *
 */
function cubrid_lob2_tell64($lob_identifier): string
{
    error_clear_last();
    $safeResult = \cubrid_lob2_tell64($lob_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $lob_identifier
 * @param string $buf
 * @throws CubridException
 *
 */
function cubrid_lob2_write($lob_identifier, string $buf): void
{
    error_clear_last();
    $safeResult = \cubrid_lob2_write($lob_identifier, $buf);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @throws CubridException
 *
 */
function cubrid_lock_read($conn_identifier, string $oid): void
{
    error_clear_last();
    $safeResult = \cubrid_lock_read($conn_identifier, $oid);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @throws CubridException
 *
 */
function cubrid_lock_write($conn_identifier, string $oid): void
{
    error_clear_last();
    $safeResult = \cubrid_lock_write($conn_identifier, $oid);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $req_identifier
 * @param int $offset
 * @param int $origin
 * @return int
 * @throws CubridException
 *
 */
function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): int
{
    error_clear_last();
    $safeResult = \cubrid_move_cursor($req_identifier, $offset, $origin);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $result
 * @throws CubridException
 *
 */
function cubrid_next_result($result): void
{
    error_clear_last();
    $safeResult = \cubrid_next_result($result);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param string $conn_url
 * @param string $userid
 * @param string $passwd
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?string $passwd = null)
{
    error_clear_last();
    if ($passwd !== null) {
        $safeResult = \cubrid_pconnect_with_url($conn_url, $userid, $passwd);
    } elseif ($userid !== null) {
        $safeResult = \cubrid_pconnect_with_url($conn_url, $userid);
    } else {
        $safeResult = \cubrid_pconnect_with_url($conn_url);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $host
 * @param int $port
 * @param string $dbname
 * @param string $userid
 * @param string $passwd
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_pconnect(string $host, int $port, string $dbname, ?string $userid = null, ?string $passwd = null)
{
    error_clear_last();
    if ($passwd !== null) {
        $safeResult = \cubrid_pconnect($host, $port, $dbname, $userid, $passwd);
    } elseif ($userid !== null) {
        $safeResult = \cubrid_pconnect($host, $port, $dbname, $userid);
    } else {
        $safeResult = \cubrid_pconnect($host, $port, $dbname);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @param string $prepare_stmt
 * @param int $option
 * @return resource
 * @throws CubridException
 *
 */
function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0)
{
    error_clear_last();
    $safeResult = \cubrid_prepare($conn_identifier, $prepare_stmt, $option);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr
 * @param mixed $value
 * @throws CubridException
 *
 */
function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value = null): void
{
    error_clear_last();
    if ($value !== null) {
        $safeResult = \cubrid_put($conn_identifier, $oid, $attr, $value);
    } elseif ($attr !== null) {
        $safeResult = \cubrid_put($conn_identifier, $oid, $attr);
    } else {
        $safeResult = \cubrid_put($conn_identifier, $oid);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @throws CubridException
 *
 */
function cubrid_rollback($conn_identifier): void
{
    error_clear_last();
    $safeResult = \cubrid_rollback($conn_identifier);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param int $schema_type
 * @param string $class_name
 * @param string $attr_name
 * @return array
 * @throws CubridException
 *
 */
function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = null, ?string $attr_name = null): array
{
    error_clear_last();
    if ($attr_name !== null) {
        $safeResult = \cubrid_schema($conn_identifier, $schema_type, $class_name, $attr_name);
    } elseif ($class_name !== null) {
        $safeResult = \cubrid_schema($conn_identifier, $schema_type, $class_name);
    } else {
        $safeResult = \cubrid_schema($conn_identifier, $schema_type);
    }
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @param int $index
 * @throws CubridException
 *
 */
function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $index): void
{
    error_clear_last();
    $safeResult = \cubrid_seq_drop($conn_identifier, $oid, $attr_name, $index);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @param int $index
 * @param string $seq_element
 * @throws CubridException
 *
 */
function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void
{
    error_clear_last();
    $safeResult = \cubrid_seq_insert($conn_identifier, $oid, $attr_name, $index, $seq_element);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @param int $index
 * @param string $seq_element
 * @throws CubridException
 *
 */
function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void
{
    error_clear_last();
    $safeResult = \cubrid_seq_put($conn_identifier, $oid, $attr_name, $index, $seq_element);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @param string $set_element
 * @throws CubridException
 *
 */
function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string $set_element): void
{
    error_clear_last();
    $safeResult = \cubrid_set_add($conn_identifier, $oid, $attr_name, $set_element);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param bool $mode
 * @throws CubridException
 *
 */
function cubrid_set_autocommit($conn_identifier, bool $mode): void
{
    error_clear_last();
    $safeResult = \cubrid_set_autocommit($conn_identifier, $mode);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param int $param_type
 * @param int $param_value
 * @throws CubridException
 *
 */
function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_value): void
{
    error_clear_last();
    $safeResult = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $conn_identifier
 * @param string $oid
 * @param string $attr_name
 * @param string $set_element
 * @throws CubridException
 *
 */
function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, string $set_element): void
{
    error_clear_last();
    $safeResult = \cubrid_set_drop($conn_identifier, $oid, $attr_name, $set_element);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}


/**
 * @param resource $req_identifier
 * @param int $timeout
 * @throws CubridException
 *
 */
function cubrid_set_query_timeout($req_identifier, int $timeout): void
{
    error_clear_last();
    $safeResult = \cubrid_set_query_timeout($req_identifier, $timeout);
    if ($safeResult === false) {
        throw CubridException::createFromPhpError();
    }
}
PK       ! GJU&  U&    ftp.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FtpException;

/**
 * @param \FTP\Connection $ftp
 * @param int $size
 * @param null|string $response
 * @throws FtpException
 *
 */
function ftp_alloc(\FTP\Connection $ftp, int $size, ?string &$response = null): void
{
    error_clear_last();
    $safeResult = \ftp_alloc($ftp, $size, $response);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $remote_filename
 * @param string $local_filename
 * @param FTP_ASCII|FTP_BINARY $mode
 * @throws FtpException
 *
 */
function ftp_append(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): void
{
    error_clear_last();
    $safeResult = \ftp_append($ftp, $remote_filename, $local_filename, $mode);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @throws FtpException
 *
 */
function ftp_cdup(\FTP\Connection $ftp): void
{
    error_clear_last();
    $safeResult = \ftp_cdup($ftp);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $directory
 * @throws FtpException
 *
 */
function ftp_chdir(\FTP\Connection $ftp, string $directory): void
{
    error_clear_last();
    $safeResult = \ftp_chdir($ftp, $directory);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param int $permissions
 * @param string $filename
 * @return int
 * @throws FtpException
 *
 */
function ftp_chmod(\FTP\Connection $ftp, int $permissions, string $filename): int
{
    error_clear_last();
    $safeResult = \ftp_chmod($ftp, $permissions, $filename);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @throws FtpException
 *
 */
function ftp_close(\FTP\Connection $ftp): void
{
    error_clear_last();
    $safeResult = \ftp_close($ftp);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param string $hostname
 * @param int $port
 * @param int $timeout
 * @return \FTP\Connection
 * @throws FtpException
 *
 */
function ftp_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\Connection
{
    error_clear_last();
    $safeResult = \ftp_connect($hostname, $port, $timeout);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param string $filename
 * @throws FtpException
 *
 */
function ftp_delete(\FTP\Connection $ftp, string $filename): void
{
    error_clear_last();
    $safeResult = \ftp_delete($ftp, $filename);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param resource $stream
 * @param string $remote_filename
 * @param FTP_ASCII|FTP_BINARY $mode
 * @param int $offset
 * @throws FtpException
 *
 */
function ftp_fget(\FTP\Connection $ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
    error_clear_last();
    $safeResult = \ftp_fget($ftp, $stream, $remote_filename, $mode, $offset);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $remote_filename
 * @param resource $stream
 * @param FTP_ASCII|FTP_BINARY $mode
 * @param int $offset
 * @throws FtpException
 *
 */
function ftp_fput(\FTP\Connection $ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): void
{
    error_clear_last();
    $safeResult = \ftp_fput($ftp, $remote_filename, $stream, $mode, $offset);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $local_filename
 * @param string $remote_filename
 * @param FTP_ASCII|FTP_BINARY $mode
 * @param int $offset
 * @throws FtpException
 *
 */
function ftp_get(\FTP\Connection $ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
    error_clear_last();
    $safeResult = \ftp_get($ftp, $local_filename, $remote_filename, $mode, $offset);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $username
 * @param string $password
 * @throws FtpException
 *
 */
function ftp_login(\FTP\Connection $ftp, string $username, string $password): void
{
    error_clear_last();
    $safeResult = \ftp_login($ftp, $username, $password);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $directory
 * @return string
 * @throws FtpException
 *
 */
function ftp_mkdir(\FTP\Connection $ftp, string $directory): string
{
    error_clear_last();
    $safeResult = \ftp_mkdir($ftp, $directory);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param string $directory
 * @return array
 * @throws FtpException
 *
 */
function ftp_mlsd(\FTP\Connection $ftp, string $directory): array
{
    error_clear_last();
    $safeResult = \ftp_mlsd($ftp, $directory);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param string $remote_filename
 * @param string $local_filename
 * @param FTP_ASCII|FTP_BINARY $mode
 * @param int $offset
 * @return int
 * @throws FtpException
 *
 */
function ftp_nb_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int
{
    error_clear_last();
    $safeResult = \ftp_nb_put($ftp, $remote_filename, $local_filename, $mode, $offset);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param string $directory
 * @return array
 * @throws FtpException
 *
 */
function ftp_nlist(\FTP\Connection $ftp, string $directory): array
{
    error_clear_last();
    $safeResult = \ftp_nlist($ftp, $directory);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param bool $enable
 * @throws FtpException
 *
 */
function ftp_pasv(\FTP\Connection $ftp, bool $enable): void
{
    error_clear_last();
    $safeResult = \ftp_pasv($ftp, $enable);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $remote_filename
 * @param string $local_filename
 * @param FTP_ASCII|FTP_BINARY $mode
 * @param int $offset
 * @throws FtpException
 *
 */
function ftp_put(\FTP\Connection $ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): void
{
    error_clear_last();
    $safeResult = \ftp_put($ftp, $remote_filename, $local_filename, $mode, $offset);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @return string
 * @throws FtpException
 *
 */
function ftp_pwd(\FTP\Connection $ftp): string
{
    error_clear_last();
    $safeResult = \ftp_pwd($ftp);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @param string $from
 * @param string $to
 * @throws FtpException
 *
 */
function ftp_rename(\FTP\Connection $ftp, string $from, string $to): void
{
    error_clear_last();
    $safeResult = \ftp_rename($ftp, $from, $to);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $directory
 * @throws FtpException
 *
 */
function ftp_rmdir(\FTP\Connection $ftp, string $directory): void
{
    error_clear_last();
    $safeResult = \ftp_rmdir($ftp, $directory);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $command
 * @throws FtpException
 *
 */
function ftp_site(\FTP\Connection $ftp, string $command): void
{
    error_clear_last();
    $safeResult = \ftp_site($ftp, $command);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
}


/**
 * @param \FTP\Connection $ftp
 * @param string $filename
 * @return int
 * @throws FtpException
 *
 */
function ftp_size(\FTP\Connection $ftp, string $filename): int
{
    error_clear_last();
    $safeResult = \ftp_size($ftp, $filename);
    if ($safeResult === -1) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $hostname
 * @param int $port
 * @param int $timeout
 * @return \FTP\Connection
 * @throws FtpException
 *
 */
function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90): \FTP\Connection
{
    error_clear_last();
    $safeResult = \ftp_ssl_connect($hostname, $port, $timeout);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \FTP\Connection $ftp
 * @return string
 * @throws FtpException
 *
 */
function ftp_systype(\FTP\Connection $ftp): string
{
    error_clear_last();
    $safeResult = \ftp_systype($ftp);
    if ($safeResult === false) {
        throw FtpException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! 8MA  A    ldap.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\LdapException;

/**
 * @param string $value
 * @return string
 * @throws LdapException
 *
 */
function ldap_8859_to_t61(string $value): string
{
    error_clear_last();
    $safeResult = \ldap_8859_to_t61($value);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array $entry
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_add($ldap, $dn, $entry, $controls);
    } else {
        $safeResult = \ldap_add($ldap, $dn, $entry);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param null|string $dn
 * @param null|string $password
 * @throws LdapException
 *
 */
function ldap_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null): void
{
    error_clear_last();
    if ($password !== null) {
        $safeResult = \ldap_bind($ldap, $dn, $password);
    } elseif ($dn !== null) {
        $safeResult = \ldap_bind($ldap, $dn);
    } else {
        $safeResult = \ldap_bind($ldap);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param string $attribute
 * @param string $value
 * @param array|null $controls
 * @return bool
 * @throws LdapException
 *
 */
function ldap_compare(\LDAP\Connection $ldap, string $dn, string $attribute, string $value, ?array $controls = null): bool
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_compare($ldap, $dn, $attribute, $value, $controls);
    } else {
        $safeResult = \ldap_compare($ldap, $dn, $attribute, $value);
    }
    if ($safeResult === -1) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $link
 * @param resource $result
 * @param null|string $cookie
 * @param int|null $estimated
 * @throws LdapException
 *
 */
function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void
{
    error_clear_last();
    $safeResult = \ldap_control_paged_result_response($link, $result, $cookie, $estimated);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param resource $link
 * @param int $pagesize
 * @param bool $iscritical
 * @param string $cookie
 * @throws LdapException
 *
 */
function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void
{
    error_clear_last();
    $safeResult = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\Result $result
 * @return int
 * @throws LdapException
 *
 */
function ldap_count_entries(\LDAP\Connection $ldap, \LDAP\Result $result): int
{
    error_clear_last();
    $safeResult = \ldap_count_entries($ldap, $result);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_delete(\LDAP\Connection $ldap, string $dn, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_delete($ldap, $dn, $controls);
    } else {
        $safeResult = \ldap_delete($ldap, $dn);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param string $dn
 * @return string
 * @throws LdapException
 *
 */
function ldap_dn2ufn(string $dn): string
{
    error_clear_last();
    $safeResult = \ldap_dn2ufn($dn);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $user
 * @param string $old_password
 * @param string $new_password
 * @param array|null $controls
 * @return bool|string
 * @throws LdapException
 *
 */
function ldap_exop_passwd(\LDAP\Connection $ldap, string $user = "", string $old_password = "", string $new_password = "", ?array &$controls = null)
{
    error_clear_last();
    $safeResult = \ldap_exop_passwd($ldap, $user, $old_password, $new_password, $controls);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @return bool|string
 * @throws LdapException
 *
 */
function ldap_exop_whoami(\LDAP\Connection $ldap)
{
    error_clear_last();
    $safeResult = \ldap_exop_whoami($ldap);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $reqoid
 * @param null|string $reqdata
 * @param array|null $serverctrls
 * @param null|string $retdata
 * @param null|string $retoid
 * @return bool|resource
 * @throws LdapException
 *
 */
function ldap_exop(\LDAP\Connection $ldap, string $reqoid, ?string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null)
{
    error_clear_last();
    if ($retoid !== null) {
        $safeResult = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata, $retoid);
    } elseif ($retdata !== null) {
        $safeResult = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata);
    } elseif ($serverctrls !== null) {
        $safeResult = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls);
    } elseif ($reqdata !== null) {
        $safeResult = \ldap_exop($ldap, $reqoid, $reqdata);
    } else {
        $safeResult = \ldap_exop($ldap, $reqoid);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $dn
 * @param int $with_attrib
 * @return array
 * @throws LdapException
 *
 */
function ldap_explode_dn(string $dn, int $with_attrib): array
{
    error_clear_last();
    $safeResult = \ldap_explode_dn($dn, $with_attrib);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @return string
 * @throws LdapException
 *
 */
function ldap_first_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
{
    error_clear_last();
    $safeResult = \ldap_first_attribute($ldap, $entry);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\Result $result
 * @return \LDAP\ResultEntry
 * @throws LdapException
 *
 */
function ldap_first_entry(\LDAP\Connection $ldap, \LDAP\Result $result): \LDAP\ResultEntry
{
    error_clear_last();
    $safeResult = \ldap_first_entry($ldap, $result);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Result $result
 * @throws LdapException
 *
 */
function ldap_free_result(\LDAP\Result $result): void
{
    error_clear_last();
    $safeResult = \ldap_free_result($result);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @return array
 * @throws LdapException
 *
 */
function ldap_get_attributes(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): array
{
    error_clear_last();
    $safeResult = \ldap_get_attributes($ldap, $entry);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @return string
 * @throws LdapException
 *
 */
function ldap_get_dn(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
{
    error_clear_last();
    $safeResult = \ldap_get_dn($ldap, $entry);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\Result $result
 * @return array
 * @throws LdapException
 *
 */
function ldap_get_entries(\LDAP\Connection $ldap, \LDAP\Result $result): array
{
    error_clear_last();
    $safeResult = \ldap_get_entries($ldap, $result);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param int $option
 * @param mixed $value
 * @throws LdapException
 *
 */
function ldap_get_option(\LDAP\Connection $ldap, int $option, &$value = null): void
{
    error_clear_last();
    $safeResult = \ldap_get_option($ldap, $option, $value);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @param string $attribute
 * @return array
 * @throws LdapException
 *
 */
function ldap_get_values_len(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute): array
{
    error_clear_last();
    $safeResult = \ldap_get_values_len($ldap, $entry, $attribute);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @param string $attribute
 * @return array
 * @throws LdapException
 *
 */
function ldap_get_values(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry, string $attribute): array
{
    error_clear_last();
    $safeResult = \ldap_get_values($ldap, $entry, $attribute);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array $entry
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_mod_add(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_mod_add($ldap, $dn, $entry, $controls);
    } else {
        $safeResult = \ldap_mod_add($ldap, $dn, $entry);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array $entry
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_mod_del(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_mod_del($ldap, $dn, $entry, $controls);
    } else {
        $safeResult = \ldap_mod_del($ldap, $dn, $entry);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array $entry
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_mod_replace(\LDAP\Connection $ldap, string $dn, array $entry, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_mod_replace($ldap, $dn, $entry, $controls);
    } else {
        $safeResult = \ldap_mod_replace($ldap, $dn, $entry);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param array $modifications_info
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_modify_batch(\LDAP\Connection $ldap, string $dn, array $modifications_info, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info, $controls);
    } else {
        $safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\ResultEntry $entry
 * @return string
 * @throws LdapException
 *
 */
function ldap_next_attribute(\LDAP\Connection $ldap, \LDAP\ResultEntry $entry): string
{
    error_clear_last();
    $safeResult = \ldap_next_attribute($ldap, $entry);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\Result $result
 * @param null|string $response_data
 * @param null|string $response_oid
 * @throws LdapException
 *
 */
function ldap_parse_exop(\LDAP\Connection $ldap, \LDAP\Result $result, ?string &$response_data = null, ?string &$response_oid = null): void
{
    error_clear_last();
    $safeResult = \ldap_parse_exop($ldap, $result, $response_data, $response_oid);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param \LDAP\Result $result
 * @param int|null $error_code
 * @param null|string $matched_dn
 * @param null|string $error_message
 * @param array|null $referrals
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_parse_result(\LDAP\Connection $ldap, \LDAP\Result $result, ?int &$error_code, ?string &$matched_dn = null, ?string &$error_message = null, ?array &$referrals = null, ?array &$controls = null): void
{
    error_clear_last();
    $safeResult = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param string $dn
 * @param string $new_rdn
 * @param string $new_parent
 * @param bool $delete_old_rdn
 * @param array|null $controls
 * @throws LdapException
 *
 */
function ldap_rename(\LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): void
{
    error_clear_last();
    if ($controls !== null) {
        $safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn, $controls);
    } else {
        $safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @param null|string $dn
 * @param null|string $password
 * @param null|string $mech
 * @param null|string $realm
 * @param null|string $authc_id
 * @param null|string $authz_id
 * @param null|string $props
 * @throws LdapException
 *
 */
function ldap_sasl_bind(\LDAP\Connection $ldap, ?string $dn = null, ?string $password = null, ?string $mech = null, ?string $realm = null, ?string $authc_id = null, ?string $authz_id = null, ?string $props = null): void
{
    error_clear_last();
    if ($props !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id, $props);
    } elseif ($authz_id !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id);
    } elseif ($authc_id !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id);
    } elseif ($realm !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm);
    } elseif ($mech !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech);
    } elseif ($password !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn, $password);
    } elseif ($dn !== null) {
        $safeResult = \ldap_sasl_bind($ldap, $dn);
    } else {
        $safeResult = \ldap_sasl_bind($ldap);
    }
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param null|resource $ldap
 * @param int $option
 * @param mixed $value
 * @throws LdapException
 *
 */
function ldap_set_option($ldap, int $option, $value): void
{
    error_clear_last();
    $safeResult = \ldap_set_option($ldap, $option, $value);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}


/**
 * @param \LDAP\Connection $ldap
 * @throws LdapException
 *
 */
function ldap_unbind(\LDAP\Connection $ldap): void
{
    error_clear_last();
    $safeResult = \ldap_unbind($ldap);
    if ($safeResult === false) {
        throw LdapException::createFromPhpError();
    }
}
PK       ! "`  `    network.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\NetworkException;

/**
 * @throws NetworkException
 *
 */
function closelog(): void
{
    error_clear_last();
    $safeResult = \closelog();
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
}


/**
 * @param string $hostname
 * @param int $type
 * @param array|null $authoritative_name_servers
 * @param array|null $additional_records
 * @param bool $raw
 * @return list
 * @throws NetworkException
 *
 */
function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authoritative_name_servers = null, ?array &$additional_records = null, bool $raw = false): array
{
    error_clear_last();
    $safeResult = \dns_get_record($hostname, $type, $authoritative_name_servers, $additional_records, $raw);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $hostname
 * @param int $port
 * @param int|null $error_code
 * @param null|string $error_message
 * @param float|null $timeout
 * @return resource
 * @throws NetworkException
 *
 */
function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, ?float $timeout = null)
{
    error_clear_last();
    if ($timeout !== null) {
        $safeResult = \fsockopen($hostname, $port, $error_code, $error_message, $timeout);
    } else {
        $safeResult = \fsockopen($hostname, $port, $error_code, $error_message);
    }
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return string
 * @throws NetworkException
 *
 */
function gethostname(): string
{
    error_clear_last();
    $safeResult = \gethostname();
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $protocol
 * @return int
 * @throws NetworkException
 *
 */
function getprotobyname(string $protocol): int
{
    error_clear_last();
    $safeResult = \getprotobyname($protocol);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $protocol
 * @return string
 * @throws NetworkException
 *
 */
function getprotobynumber(int $protocol): string
{
    error_clear_last();
    $safeResult = \getprotobynumber($protocol);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $port
 * @param string $protocol
 * @return string
 * @throws NetworkException
 *
 */
function getservbyport(int $port, string $protocol): string
{
    error_clear_last();
    $safeResult = \getservbyport($port, $protocol);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param callable $callback
 * @throws NetworkException
 *
 */
function header_register_callback(callable $callback): void
{
    error_clear_last();
    $safeResult = \header_register_callback($callback);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
}


/**
 * @param string $ip
 * @return string
 * @throws NetworkException
 *
 */
function inet_ntop(string $ip): string
{
    error_clear_last();
    $safeResult = \inet_ntop($ip);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ip
 * @return string
 * @throws NetworkException
 *
 */
function inet_pton(string $ip): string
{
    error_clear_last();
    $safeResult = \inet_pton($ip);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $ip
 * @return string
 * @throws NetworkException
 *
 */
function long2ip(int $ip): string
{
    error_clear_last();
    $safeResult = \long2ip($ip);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $prefix
 * @param int $flags
 * @param int $facility
 * @throws NetworkException
 *
 */
function openlog(string $prefix, int $flags, int $facility): void
{
    error_clear_last();
    $safeResult = \openlog($prefix, $flags, $facility);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
}


/**
 * @param string $hostname
 * @param int $port
 * @param int|null $error_code
 * @param null|string $error_message
 * @param float|null $timeout
 * @return resource
 * @throws NetworkException
 *
 */
function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ?string &$error_message = null, ?float $timeout = null)
{
    error_clear_last();
    if ($timeout !== null) {
        $safeResult = \pfsockopen($hostname, $port, $error_code, $error_message, $timeout);
    } else {
        $safeResult = \pfsockopen($hostname, $port, $error_code, $error_message);
    }
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $priority
 * @param string $message
 * @throws NetworkException
 *
 */
function syslog(int $priority, string $message): void
{
    error_clear_last();
    $safeResult = \syslog($priority, $message);
    if ($safeResult === false) {
        throw NetworkException::createFromPhpError();
    }
}
PK       ! s      calendar.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\CalendarException;

/**
 * @param int|null $timestamp
 * @return int
 * @throws CalendarException
 *
 */
function unixtojd(?int $timestamp = null): int
{
    error_clear_last();
    if ($timestamp !== null) {
        $safeResult = \unixtojd($timestamp);
    } else {
        $safeResult = \unixtojd();
    }
    if ($safeResult === false) {
        throw CalendarException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! L >    	  shmop.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ShmopException;

/**
 * @param \Shmop $shmop
 * @throws ShmopException
 *
 */
function shmop_delete(\Shmop $shmop): void
{
    error_clear_last();
    $safeResult = \shmop_delete($shmop);
    if ($safeResult === false) {
        throw ShmopException::createFromPhpError();
    }
}


/**
 * @param \Shmop $shmop
 * @param int $offset
 * @param int $size
 * @return string
 * @throws ShmopException
 *
 */
function shmop_read(\Shmop $shmop, int $offset, int $size): string
{
    error_clear_last();
    $safeResult = \shmop_read($shmop, $offset, $size);
    if ($safeResult === false) {
        throw ShmopException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! UT(  T(    sockets.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SocketsException;

/**
 * @param \Socket $socket
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_accept(\Socket $socket): \Socket
{
    error_clear_last();
    $safeResult = \socket_accept($socket);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \AddressInfo $address
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_addrinfo_bind(\AddressInfo $address): \Socket
{
    error_clear_last();
    $safeResult = \socket_addrinfo_bind($address);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \AddressInfo $address
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_addrinfo_connect(\AddressInfo $address): \Socket
{
    error_clear_last();
    $safeResult = \socket_addrinfo_connect($address);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $host
 * @param mixed $service
 * @param array $hints
 * @return \AddressInfo[]
 * @throws SocketsException
 *
 */
function socket_addrinfo_lookup(string $host, $service = null, array $hints = []): array
{
    error_clear_last();
    if ($hints !== []) {
        $safeResult = \socket_addrinfo_lookup($host, $service, $hints);
    } elseif ($service !== null) {
        $safeResult = \socket_addrinfo_lookup($host, $service);
    } else {
        $safeResult = \socket_addrinfo_lookup($host);
    }
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param string $address
 * @param int $port
 * @throws SocketsException
 *
 */
function socket_bind(\Socket $socket, string $address, int $port = 0): void
{
    error_clear_last();
    $safeResult = \socket_bind($socket, $address, $port);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param string $address
 * @param int|null $port
 * @throws SocketsException
 *
 */
function socket_connect(\Socket $socket, string $address, ?int $port = null): void
{
    error_clear_last();
    if ($port !== null) {
        $safeResult = \socket_connect($socket, $address, $port);
    } else {
        $safeResult = \socket_connect($socket, $address);
    }
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param int $port
 * @param int $backlog
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_create_listen(int $port, int $backlog = 128): \Socket
{
    error_clear_last();
    $safeResult = \socket_create_listen($port, $backlog);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $domain
 * @param int $type
 * @param int $protocol
 * @param \Socket[]|null $pair
 * @throws SocketsException
 *
 */
function socket_create_pair(int $domain, int $type, int $protocol, ?array &$pair): void
{
    error_clear_last();
    $safeResult = \socket_create_pair($domain, $type, $protocol, $pair);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param int $domain
 * @param int $type
 * @param int $protocol
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_create(int $domain, int $type, int $protocol): \Socket
{
    error_clear_last();
    $safeResult = \socket_create($domain, $type, $protocol);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @return resource
 * @throws SocketsException
 *
 */
function socket_export_stream(\Socket $socket)
{
    error_clear_last();
    $safeResult = \socket_export_stream($socket);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param int $level
 * @param int $option
 * @return mixed
 * @throws SocketsException
 *
 */
function socket_get_option(\Socket $socket, int $level, int $option)
{
    error_clear_last();
    $safeResult = \socket_get_option($socket, $level, $option);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param null|string $address
 * @param int|null $port
 * @throws SocketsException
 *
 */
function socket_getpeername(\Socket $socket, ?string &$address, ?int &$port = null): void
{
    error_clear_last();
    $safeResult = \socket_getpeername($socket, $address, $port);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param null|string $address
 * @param int|null $port
 * @throws SocketsException
 *
 */
function socket_getsockname(\Socket $socket, ?string &$address, ?int &$port = null): void
{
    error_clear_last();
    $safeResult = \socket_getsockname($socket, $address, $port);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_import_stream($stream): \Socket
{
    error_clear_last();
    $safeResult = \socket_import_stream($stream);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param int $backlog
 * @throws SocketsException
 *
 */
function socket_listen(\Socket $socket, int $backlog = 0): void
{
    error_clear_last();
    $safeResult = \socket_listen($socket, $backlog);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param int $length
 * @param int $mode
 * @return string
 * @throws SocketsException
 *
 */
function socket_read(\Socket $socket, int $length, int $mode = PHP_BINARY_READ): string
{
    error_clear_last();
    $safeResult = \socket_read($socket, $length, $mode);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param string $data
 * @param int $length
 * @param int $flags
 * @return int
 * @throws SocketsException
 *
 */
function socket_send(\Socket $socket, string $data, int $length, int $flags): int
{
    error_clear_last();
    $safeResult = \socket_send($socket, $data, $length, $flags);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param array $message
 * @param int $flags
 * @return int
 * @throws SocketsException
 *
 */
function socket_sendmsg(\Socket $socket, array $message, int $flags = 0): int
{
    error_clear_last();
    $safeResult = \socket_sendmsg($socket, $message, $flags);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @param string $data
 * @param int $length
 * @param int $flags
 * @param string $address
 * @param int|null $port
 * @return int
 * @throws SocketsException
 *
 */
function socket_sendto(\Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null): int
{
    error_clear_last();
    if ($port !== null) {
        $safeResult = \socket_sendto($socket, $data, $length, $flags, $address, $port);
    } else {
        $safeResult = \socket_sendto($socket, $data, $length, $flags, $address);
    }
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \Socket $socket
 * @throws SocketsException
 *
 */
function socket_set_block(\Socket $socket): void
{
    error_clear_last();
    $safeResult = \socket_set_block($socket);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @throws SocketsException
 *
 */
function socket_set_nonblock(\Socket $socket): void
{
    error_clear_last();
    $safeResult = \socket_set_nonblock($socket);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param int $level
 * @param int $option
 * @param array|int|string $value
 * @throws SocketsException
 *
 */
function socket_set_option(\Socket $socket, int $level, int $option, $value): void
{
    error_clear_last();
    $safeResult = \socket_set_option($socket, $level, $option, $value);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param int $mode
 * @throws SocketsException
 *
 */
function socket_shutdown(\Socket $socket, int $mode = 2): void
{
    error_clear_last();
    $safeResult = \socket_shutdown($socket, $mode);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}


/**
 * @param \Socket $socket
 * @param int $process_id
 * @return string
 * @throws SocketsException
 *
 */
function socket_wsaprotocol_info_export(\Socket $socket, int $process_id): string
{
    error_clear_last();
    $safeResult = \socket_wsaprotocol_info_export($socket, $process_id);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $info_id
 * @return \Socket
 * @throws SocketsException
 *
 */
function socket_wsaprotocol_info_import(string $info_id): \Socket
{
    error_clear_last();
    $safeResult = \socket_wsaprotocol_info_import($info_id);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $info_id
 * @throws SocketsException
 *
 */
function socket_wsaprotocol_info_release(string $info_id): void
{
    error_clear_last();
    $safeResult = \socket_wsaprotocol_info_release($info_id);
    if ($safeResult === false) {
        throw SocketsException::createFromPhpError();
    }
}
PK       ! /~GI  GI    filesystem.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FilesystemException;

/**
 * @param string $filename
 * @param int|string $group
 * @throws FilesystemException
 *
 */
function chgrp(string $filename, $group): void
{
    error_clear_last();
    $safeResult = \chgrp($filename, $group);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param int $permissions
 * @throws FilesystemException
 *
 */
function chmod(string $filename, int $permissions): void
{
    error_clear_last();
    $safeResult = \chmod($filename, $permissions);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param int|string $user
 * @throws FilesystemException
 *
 */
function chown(string $filename, $user): void
{
    error_clear_last();
    $safeResult = \chown($filename, $user);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $source
 * @param string $dest
 * @param resource $context
 * @throws FilesystemException
 *
 */
function copy(string $source, string $dest, $context = null): void
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \copy($source, $dest, $context);
    } else {
        $safeResult = \copy($source, $dest);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $directory
 * @return float
 * @throws FilesystemException
 *
 */
function disk_free_space(string $directory): float
{
    error_clear_last();
    $safeResult = \disk_free_space($directory);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $directory
 * @return float
 * @throws FilesystemException
 *
 */
function disk_total_space(string $directory): float
{
    error_clear_last();
    $safeResult = \disk_total_space($directory);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @throws FilesystemException
 *
 */
function fclose($stream): void
{
    error_clear_last();
    $safeResult = \fclose($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @throws FilesystemException
 *
 */
function fdatasync($stream): void
{
    error_clear_last();
    $safeResult = \fdatasync($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @throws FilesystemException
 *
 */
function fflush($stream): void
{
    error_clear_last();
    $safeResult = \fflush($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param bool $use_include_path
 * @param null|resource $context
 * @param int $offset
 * @param 0|positive-int $length
 * @return string
 * @throws FilesystemException
 *
 */
function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, ?int $length = null): string
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \file_get_contents($filename, $use_include_path, $context, $offset, $length);
    } elseif ($offset !== 0) {
        $safeResult = \file_get_contents($filename, $use_include_path, $context, $offset);
    } elseif ($context !== null) {
        $safeResult = \file_get_contents($filename, $use_include_path, $context);
    } else {
        $safeResult = \file_get_contents($filename, $use_include_path);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param mixed $data
 * @param int $flags
 * @param null|resource $context
 * @return 0|positive-int
 * @throws FilesystemException
 *
 */
function file_put_contents(string $filename, $data, int $flags = 0, $context = null): int
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \file_put_contents($filename, $data, $flags, $context);
    } else {
        $safeResult = \file_put_contents($filename, $data, $flags);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param int-mask $flags
 * @param resource $context
 * @return list
 * @throws FilesystemException
 *
 */
function file(string $filename, int $flags = 0, $context = null): array
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \file($filename, $flags, $context);
    } else {
        $safeResult = \file($filename, $flags);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function fileatime(string $filename): int
{
    error_clear_last();
    $safeResult = \fileatime($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function filectime(string $filename): int
{
    error_clear_last();
    $safeResult = \filectime($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function fileinode(string $filename): int
{
    error_clear_last();
    $safeResult = \fileinode($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function filemtime(string $filename): int
{
    error_clear_last();
    $safeResult = \filemtime($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function fileowner(string $filename): int
{
    error_clear_last();
    $safeResult = \fileowner($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return int
 * @throws FilesystemException
 *
 */
function fileperms(string $filename): int
{
    error_clear_last();
    $safeResult = \fileperms($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return 0|positive-int
 * @throws FilesystemException
 *
 */
function filesize(string $filename): int
{
    error_clear_last();
    $safeResult = \filesize($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return string
 * @throws FilesystemException
 *
 */
function filetype(string $filename): string
{
    error_clear_last();
    $safeResult = \filetype($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param int-mask $operation
 * @param 0|1|null $would_block
 * @throws FilesystemException
 *
 */
function flock($stream, int $operation, ?int &$would_block = null): void
{
    error_clear_last();
    $safeResult = \flock($stream, $operation, $would_block);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param string $mode
 * @param bool $use_include_path
 * @param null|resource $context
 * @return resource
 * @throws FilesystemException
 *
 */
function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null)
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \fopen($filename, $mode, $use_include_path, $context);
    } else {
        $safeResult = \fopen($filename, $mode, $use_include_path);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param positive-int $length
 * @return string
 * @throws FilesystemException
 *
 */
function fread($stream, int $length): string
{
    error_clear_last();
    $safeResult = \fread($stream, $length);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @return array
 * @throws FilesystemException
 *
 */
function fstat($stream): array
{
    error_clear_last();
    $safeResult = \fstat($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @throws FilesystemException
 *
 */
function fsync($stream): void
{
    error_clear_last();
    $safeResult = \fsync($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @return int
 * @throws FilesystemException
 *
 */
function ftell($stream): int
{
    error_clear_last();
    $safeResult = \ftell($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param 0|positive-int $size
 * @throws FilesystemException
 *
 */
function ftruncate($stream, int $size): void
{
    error_clear_last();
    $safeResult = \ftruncate($stream, $size);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param resource $handle
 * @param string $string
 * @param 0|positive-int $length
 * @return 0|positive-int
 * @throws FilesystemException
 *
 */
function fwrite($handle, string $string, ?int $length = null): int
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \fwrite($handle, $string, $length);
    } else {
        $safeResult = \fwrite($handle, $string);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param int $flags
 * @return list
 * @throws FilesystemException
 *
 */
function glob(string $pattern, int $flags = 0): array
{
    error_clear_last();
    $safeResult = \glob($pattern, $flags);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param int|string $group
 * @throws FilesystemException
 *
 */
function lchgrp(string $filename, $group): void
{
    error_clear_last();
    $safeResult = \lchgrp($filename, $group);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param int|string $user
 * @throws FilesystemException
 *
 */
function lchown(string $filename, $user): void
{
    error_clear_last();
    $safeResult = \lchown($filename, $user);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $target
 * @param string $link
 * @throws FilesystemException
 *
 */
function link(string $target, string $link): void
{
    error_clear_last();
    $safeResult = \link($target, $link);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @return array
 * @throws FilesystemException
 *
 */
function lstat(string $filename): array
{
    error_clear_last();
    $safeResult = \lstat($filename);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $directory
 * @param int $permissions
 * @param bool $recursive
 * @param resource $context
 * @throws FilesystemException
 *
 */
function mkdir(string $directory, int $permissions = 0777, bool $recursive = false, $context = null): void
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \mkdir($directory, $permissions, $recursive, $context);
    } else {
        $safeResult = \mkdir($directory, $permissions, $recursive);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param bool $process_sections
 * @param int $scanner_mode
 * @return array
 * @throws FilesystemException
 *
 */
function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array
{
    error_clear_last();
    $safeResult = \parse_ini_file($filename, $process_sections, $scanner_mode);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ini_string
 * @param bool $process_sections
 * @param int $scanner_mode
 * @return array
 * @throws FilesystemException
 *
 */
function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array
{
    error_clear_last();
    $safeResult = \parse_ini_string($ini_string, $process_sections, $scanner_mode);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $handle
 * @return int
 * @throws FilesystemException
 *
 */
function pclose($handle): int
{
    error_clear_last();
    $safeResult = \pclose($handle);
    if ($safeResult === -1) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $command
 * @param string $mode
 * @return resource
 * @throws FilesystemException
 *
 */
function popen(string $command, string $mode)
{
    error_clear_last();
    $safeResult = \popen($command, $mode);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param bool $use_include_path
 * @param resource $context
 * @return 0|positive-int
 * @throws FilesystemException
 *
 */
function readfile(string $filename, bool $use_include_path = false, $context = null): int
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \readfile($filename, $use_include_path, $context);
    } else {
        $safeResult = \readfile($filename, $use_include_path);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @return string
 * @throws FilesystemException
 *
 */
function readlink(string $path): string
{
    error_clear_last();
    $safeResult = \readlink($path);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @return non-empty-string
 * @throws FilesystemException
 *
 */
function realpath(string $path): string
{
    error_clear_last();
    $safeResult = \realpath($path);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $oldname
 * @param string $newname
 * @param resource $context
 * @throws FilesystemException
 *
 */
function rename(string $oldname, string $newname, $context = null): void
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \rename($oldname, $newname, $context);
    } else {
        $safeResult = \rename($oldname, $newname);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @throws FilesystemException
 *
 */
function rewind($stream): void
{
    error_clear_last();
    $safeResult = \rewind($stream);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $directory
 * @param resource $context
 * @throws FilesystemException
 *
 */
function rmdir(string $directory, $context = null): void
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \rmdir($directory, $context);
    } else {
        $safeResult = \rmdir($directory);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $target
 * @param string $link
 * @throws FilesystemException
 *
 */
function symlink(string $target, string $link): void
{
    error_clear_last();
    $safeResult = \symlink($target, $link);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $directory
 * @param string $prefix
 * @return non-falsy-string
 * @throws FilesystemException
 *
 */
function tempnam(string $directory, string $prefix): string
{
    error_clear_last();
    $safeResult = \tempnam($directory, $prefix);
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return resource
 * @throws FilesystemException
 *
 */
function tmpfile()
{
    error_clear_last();
    $safeResult = \tmpfile();
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param int $time
 * @param int $atime
 * @throws FilesystemException
 *
 */
function touch(string $filename, ?int $time = null, ?int $atime = null): void
{
    error_clear_last();
    if ($atime !== null) {
        $safeResult = \touch($filename, $time, $atime);
    } elseif ($time !== null) {
        $safeResult = \touch($filename, $time);
    } else {
        $safeResult = \touch($filename);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param resource $context
 * @throws FilesystemException
 *
 */
function unlink(string $filename, $context = null): void
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \unlink($filename, $context);
    } else {
        $safeResult = \unlink($filename);
    }
    if ($safeResult === false) {
        throw FilesystemException::createFromPhpError();
    }
}
PK       ! M5Y  5Y    ps.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PsException;

/**
 * @param resource $psdoc
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $filename
 * @throws PsException
 *
 */
function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename): void
{
    error_clear_last();
    $safeResult = \ps_add_launchlink($psdoc, $llx, $lly, $urx, $ury, $filename);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param int $page
 * @param string $dest
 * @throws PsException
 *
 */
function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury, int $page, string $dest): void
{
    error_clear_last();
    $safeResult = \ps_add_locallink($psdoc, $llx, $lly, $urx, $ury, $page, $dest);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $contents
 * @param string $title
 * @param string $icon
 * @param int $open
 * @throws PsException
 *
 */
function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void
{
    error_clear_last();
    $safeResult = \ps_add_note($psdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $filename
 * @param int $page
 * @param string $dest
 * @throws PsException
 *
 */
function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename, int $page, string $dest): void
{
    error_clear_last();
    $safeResult = \ps_add_pdflink($psdoc, $llx, $lly, $urx, $ury, $filename, $page, $dest);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $llx
 * @param float $lly
 * @param float $urx
 * @param float $ury
 * @param string $url
 * @throws PsException
 *
 */
function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, string $url): void
{
    error_clear_last();
    $safeResult = \ps_add_weblink($psdoc, $llx, $lly, $urx, $ury, $url);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @param float $radius
 * @param float $alpha
 * @param float $beta
 * @throws PsException
 *
 */
function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void
{
    error_clear_last();
    $safeResult = \ps_arc($psdoc, $x, $y, $radius, $alpha, $beta);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @param float $radius
 * @param float $alpha
 * @param float $beta
 * @throws PsException
 *
 */
function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void
{
    error_clear_last();
    $safeResult = \ps_arcn($psdoc, $x, $y, $radius, $alpha, $beta);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $width
 * @param float $height
 * @throws PsException
 *
 */
function ps_begin_page($psdoc, float $width, float $height): void
{
    error_clear_last();
    $safeResult = \ps_begin_page($psdoc, $width, $height);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $width
 * @param float $height
 * @param float $xstep
 * @param float $ystep
 * @param int $painttype
 * @return int
 * @throws PsException
 *
 */
function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, float $ystep, int $painttype): int
{
    error_clear_last();
    $safeResult = \ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param float $width
 * @param float $height
 * @return int
 * @throws PsException
 *
 */
function ps_begin_template($psdoc, float $width, float $height): int
{
    error_clear_last();
    $safeResult = \ps_begin_template($psdoc, $width, $height);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @param float $radius
 * @throws PsException
 *
 */
function ps_circle($psdoc, float $x, float $y, float $radius): void
{
    error_clear_last();
    $safeResult = \ps_circle($psdoc, $x, $y, $radius);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_clip($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_clip($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $imageid
 * @throws PsException
 *
 */
function ps_close_image($psdoc, int $imageid): void
{
    error_clear_last();
    $safeResult = \ps_close_image($psdoc, $imageid);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_close($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_close($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_closepath_stroke($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_closepath_stroke($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_closepath($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_closepath($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $text
 * @throws PsException
 *
 */
function ps_continue_text($psdoc, string $text): void
{
    error_clear_last();
    $safeResult = \ps_continue_text($psdoc, $text);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x1
 * @param float $y1
 * @param float $x2
 * @param float $y2
 * @param float $x3
 * @param float $y3
 * @throws PsException
 *
 */
function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void
{
    error_clear_last();
    $safeResult = \ps_curveto($psdoc, $x1, $y1, $x2, $y2, $x3, $y3);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_delete($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_delete($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_end_page($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_end_page($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_end_pattern($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_end_pattern($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_end_template($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_end_template($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_fill_stroke($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_fill_stroke($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_fill($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_fill($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $name
 * @param float $modifier
 * @return string
 * @throws PsException
 *
 */
function ps_get_parameter($psdoc, string $name, ?float $modifier = null): string
{
    error_clear_last();
    if ($modifier !== null) {
        $safeResult = \ps_get_parameter($psdoc, $name, $modifier);
    } else {
        $safeResult = \ps_get_parameter($psdoc, $name);
    }
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param string $text
 * @return array
 * @throws PsException
 *
 */
function ps_hyphenate($psdoc, string $text): array
{
    error_clear_last();
    $safeResult = \ps_hyphenate($psdoc, $text);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param string $file
 * @throws PsException
 *
 */
function ps_include_file($psdoc, string $file): void
{
    error_clear_last();
    $safeResult = \ps_include_file($psdoc, $file);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_lineto($psdoc, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_lineto($psdoc, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_moveto($psdoc, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_moveto($psdoc, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @return resource
 * @throws PsException
 *
 */
function ps_new()
{
    error_clear_last();
    $safeResult = \ps_new();
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param string $filename
 * @throws PsException
 *
 */
function ps_open_file($psdoc, ?string $filename = null): void
{
    error_clear_last();
    if ($filename !== null) {
        $safeResult = \ps_open_file($psdoc, $filename);
    } else {
        $safeResult = \ps_open_file($psdoc);
    }
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $imageid
 * @param float $x
 * @param float $y
 * @param float $scale
 * @throws PsException
 *
 */
function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): void
{
    error_clear_last();
    $safeResult = \ps_place_image($psdoc, $imageid, $x, $y, $scale);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @param float $width
 * @param float $height
 * @throws PsException
 *
 */
function ps_rect($psdoc, float $x, float $y, float $width, float $height): void
{
    error_clear_last();
    $safeResult = \ps_rect($psdoc, $x, $y, $width, $height);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_restore($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_restore($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $rot
 * @throws PsException
 *
 */
function ps_rotate($psdoc, float $rot): void
{
    error_clear_last();
    $safeResult = \ps_rotate($psdoc, $rot);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_save($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_save($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_scale($psdoc, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_scale($psdoc, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $red
 * @param float $green
 * @param float $blue
 * @throws PsException
 *
 */
function ps_set_border_color($psdoc, float $red, float $green, float $blue): void
{
    error_clear_last();
    $safeResult = \ps_set_border_color($psdoc, $red, $green, $blue);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $black
 * @param float $white
 * @throws PsException
 *
 */
function ps_set_border_dash($psdoc, float $black, float $white): void
{
    error_clear_last();
    $safeResult = \ps_set_border_dash($psdoc, $black, $white);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $style
 * @param float $width
 * @throws PsException
 *
 */
function ps_set_border_style($psdoc, string $style, float $width): void
{
    error_clear_last();
    $safeResult = \ps_set_border_style($psdoc, $style, $width);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $p
 * @param string $key
 * @param string $val
 * @throws PsException
 *
 */
function ps_set_info($p, string $key, string $val): void
{
    error_clear_last();
    $safeResult = \ps_set_info($p, $key, $val);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $name
 * @param string $value
 * @throws PsException
 *
 */
function ps_set_parameter($psdoc, string $name, string $value): void
{
    error_clear_last();
    $safeResult = \ps_set_parameter($psdoc, $name, $value);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_set_text_pos($psdoc, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_set_text_pos($psdoc, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $name
 * @param float $value
 * @throws PsException
 *
 */
function ps_set_value($psdoc, string $name, float $value): void
{
    error_clear_last();
    $safeResult = \ps_set_value($psdoc, $name, $value);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $type
 * @param string $colorspace
 * @param float $c1
 * @param float $c2
 * @param float $c3
 * @param float $c4
 * @throws PsException
 *
 */
function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float $c2, float $c3, float $c4): void
{
    error_clear_last();
    $safeResult = \ps_setcolor($psdoc, $type, $colorspace, $c1, $c2, $c3, $c4);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $on
 * @param float $off
 * @throws PsException
 *
 */
function ps_setdash($psdoc, float $on, float $off): void
{
    error_clear_last();
    $safeResult = \ps_setdash($psdoc, $on, $off);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $value
 * @throws PsException
 *
 */
function ps_setflat($psdoc, float $value): void
{
    error_clear_last();
    $safeResult = \ps_setflat($psdoc, $value);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $fontid
 * @param float $size
 * @throws PsException
 *
 */
function ps_setfont($psdoc, int $fontid, float $size): void
{
    error_clear_last();
    $safeResult = \ps_setfont($psdoc, $fontid, $size);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $gray
 * @throws PsException
 *
 */
function ps_setgray($psdoc, float $gray): void
{
    error_clear_last();
    $safeResult = \ps_setgray($psdoc, $gray);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $type
 * @throws PsException
 *
 */
function ps_setlinecap($psdoc, int $type): void
{
    error_clear_last();
    $safeResult = \ps_setlinecap($psdoc, $type);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $type
 * @throws PsException
 *
 */
function ps_setlinejoin($psdoc, int $type): void
{
    error_clear_last();
    $safeResult = \ps_setlinejoin($psdoc, $type);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $width
 * @throws PsException
 *
 */
function ps_setlinewidth($psdoc, float $width): void
{
    error_clear_last();
    $safeResult = \ps_setlinewidth($psdoc, $width);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $value
 * @throws PsException
 *
 */
function ps_setmiterlimit($psdoc, float $value): void
{
    error_clear_last();
    $safeResult = \ps_setmiterlimit($psdoc, $value);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $mode
 * @throws PsException
 *
 */
function ps_setoverprintmode($psdoc, int $mode): void
{
    error_clear_last();
    $safeResult = \ps_setoverprintmode($psdoc, $mode);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $arr
 * @throws PsException
 *
 */
function ps_setpolydash($psdoc, float $arr): void
{
    error_clear_last();
    $safeResult = \ps_setpolydash($psdoc, $arr);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $shadingid
 * @param string $optlist
 * @return int
 * @throws PsException
 *
 */
function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int
{
    error_clear_last();
    $safeResult = \ps_shading_pattern($psdoc, $shadingid, $optlist);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param string $type
 * @param float $x0
 * @param float $y0
 * @param float $x1
 * @param float $y1
 * @param float $c1
 * @param float $c2
 * @param float $c3
 * @param float $c4
 * @param string $optlist
 * @return int
 * @throws PsException
 *
 */
function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float $y1, float $c1, float $c2, float $c3, float $c4, string $optlist): int
{
    error_clear_last();
    $safeResult = \ps_shading($psdoc, $type, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $psdoc
 * @param int $shadingid
 * @throws PsException
 *
 */
function ps_shfill($psdoc, int $shadingid): void
{
    error_clear_last();
    $safeResult = \ps_shfill($psdoc, $shadingid);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $text
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_show_xy($psdoc, string $text, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_show_xy($psdoc, $text, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $text
 * @param int $len
 * @param float $xcoor
 * @param float $ycoor
 * @throws PsException
 *
 */
function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor): void
{
    error_clear_last();
    $safeResult = \ps_show_xy2($psdoc, $text, $len, $xcoor, $ycoor);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $text
 * @throws PsException
 *
 */
function ps_show($psdoc, string $text): void
{
    error_clear_last();
    $safeResult = \ps_show($psdoc, $text);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param string $text
 * @param int $len
 * @throws PsException
 *
 */
function ps_show2($psdoc, string $text, int $len): void
{
    error_clear_last();
    $safeResult = \ps_show2($psdoc, $text, $len);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @throws PsException
 *
 */
function ps_stroke($psdoc): void
{
    error_clear_last();
    $safeResult = \ps_stroke($psdoc);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param int $ord
 * @throws PsException
 *
 */
function ps_symbol($psdoc, int $ord): void
{
    error_clear_last();
    $safeResult = \ps_symbol($psdoc, $ord);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}


/**
 * @param resource $psdoc
 * @param float $x
 * @param float $y
 * @throws PsException
 *
 */
function ps_translate($psdoc, float $x, float $y): void
{
    error_clear_last();
    $safeResult = \ps_translate($psdoc, $x, $y);
    if ($safeResult === false) {
        throw PsException::createFromPhpError();
    }
}
PK       ! "	-  	-    ssh2.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\Ssh2Exception;

/**
 * @param resource $session
 * @param string $username
 * @throws Ssh2Exception
 *
 */
function ssh2_auth_agent($session, string $username): void
{
    error_clear_last();
    $safeResult = \ssh2_auth_agent($session, $username);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $username
 * @param string $hostname
 * @param string $pubkeyfile
 * @param string $privkeyfile
 * @param string $passphrase
 * @param string $local_username
 * @throws Ssh2Exception
 *
 */
function ssh2_auth_hostbased_file($session, string $username, string $hostname, string $pubkeyfile, string $privkeyfile, ?string $passphrase = null, ?string $local_username = null): void
{
    error_clear_last();
    if ($local_username !== null) {
        $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase, $local_username);
    } elseif ($passphrase !== null) {
        $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase);
    } else {
        $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $username
 * @param string $password
 * @throws Ssh2Exception
 *
 */
function ssh2_auth_password($session, string $username, string $password): void
{
    error_clear_last();
    $safeResult = \ssh2_auth_password($session, $username, $password);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $username
 * @param string $pubkeyfile
 * @param string $privkeyfile
 * @param string $passphrase
 * @throws Ssh2Exception
 *
 */
function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, string $privkeyfile, ?string $passphrase = null): void
{
    error_clear_last();
    if ($passphrase !== null) {
        $safeResult = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase);
    } else {
        $safeResult = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param string $host
 * @param int $port
 * @param array $methods
 * @param array $callbacks
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_connect(string $host, int $port = 22, ?array $methods = null, ?array $callbacks = null)
{
    error_clear_last();
    if ($callbacks !== null) {
        $safeResult = \ssh2_connect($host, $port, $methods, $callbacks);
    } elseif ($methods !== null) {
        $safeResult = \ssh2_connect($host, $port, $methods);
    } else {
        $safeResult = \ssh2_connect($host, $port);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $session
 * @throws Ssh2Exception
 *
 */
function ssh2_disconnect($session): void
{
    error_clear_last();
    $safeResult = \ssh2_disconnect($session);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $command
 * @param string $pty
 * @param array $env
 * @param int $width
 * @param int $height
 * @param int $width_height_type
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_exec($session, string $command, ?string $pty = null, ?array $env = null, int $width = 80, int $height = 25, int $width_height_type = SSH2_TERM_UNIT_CHARS)
{
    error_clear_last();
    if ($width_height_type !== SSH2_TERM_UNIT_CHARS) {
        $safeResult = \ssh2_exec($session, $command, $pty, $env, $width, $height, $width_height_type);
    } elseif ($height !== 25) {
        $safeResult = \ssh2_exec($session, $command, $pty, $env, $width, $height);
    } elseif ($width !== 80) {
        $safeResult = \ssh2_exec($session, $command, $pty, $env, $width);
    } elseif ($env !== null) {
        $safeResult = \ssh2_exec($session, $command, $pty, $env);
    } elseif ($pty !== null) {
        $safeResult = \ssh2_exec($session, $command, $pty);
    } else {
        $safeResult = \ssh2_exec($session, $command);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $listener
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_forward_accept($listener)
{
    error_clear_last();
    $safeResult = \ssh2_forward_accept($listener);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $session
 * @param int $port
 * @param string $host
 * @param int $max_connections
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_forward_listen($session, int $port, ?string $host = null, int $max_connections = 16)
{
    error_clear_last();
    if ($max_connections !== 16) {
        $safeResult = \ssh2_forward_listen($session, $port, $host, $max_connections);
    } elseif ($host !== null) {
        $safeResult = \ssh2_forward_listen($session, $port, $host);
    } else {
        $safeResult = \ssh2_forward_listen($session, $port);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $pkey
 * @param string $algoname
 * @param string $blob
 * @param bool $overwrite
 * @param array $attributes
 * @throws Ssh2Exception
 *
 */
function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwrite = false, ?array $attributes = null): void
{
    error_clear_last();
    if ($attributes !== null) {
        $safeResult = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite, $attributes);
    } else {
        $safeResult = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_publickey_init($session)
{
    error_clear_last();
    $safeResult = \ssh2_publickey_init($session);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $pkey
 * @param string $algoname
 * @param string $blob
 * @throws Ssh2Exception
 *
 */
function ssh2_publickey_remove($pkey, string $algoname, string $blob): void
{
    error_clear_last();
    $safeResult = \ssh2_publickey_remove($pkey, $algoname, $blob);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $remote_file
 * @param string $local_file
 * @throws Ssh2Exception
 *
 */
function ssh2_scp_recv($session, string $remote_file, string $local_file): void
{
    error_clear_last();
    $safeResult = \ssh2_scp_recv($session, $remote_file, $local_file);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @param string $local_file
 * @param string $remote_file
 * @param int $create_mode
 * @throws Ssh2Exception
 *
 */
function ssh2_scp_send($session, string $local_file, string $remote_file, int $create_mode = 0644): void
{
    error_clear_last();
    $safeResult = \ssh2_scp_send($session, $local_file, $remote_file, $create_mode);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $channel
 * @throws Ssh2Exception
 *
 */
function ssh2_send_eof($channel): void
{
    error_clear_last();
    $safeResult = \ssh2_send_eof($channel);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $filename
 * @param int $mode
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_chmod($sftp, string $filename, int $mode): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_chmod($sftp, $filename, $mode);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $dirname
 * @param int $mode
 * @param bool $recursive
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursive = false): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_mkdir($sftp, $dirname, $mode, $recursive);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $from
 * @param string $to
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_rename($sftp, string $from, string $to): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_rename($sftp, $from, $to);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $dirname
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_rmdir($sftp, string $dirname): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_rmdir($sftp, $dirname);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $target
 * @param string $link
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_symlink($sftp, string $target, string $link): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_symlink($sftp, $target, $link);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $sftp
 * @param string $filename
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp_unlink($sftp, string $filename): void
{
    error_clear_last();
    $safeResult = \ssh2_sftp_unlink($sftp, $filename);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
}


/**
 * @param resource $session
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_sftp($session)
{
    error_clear_last();
    $safeResult = \ssh2_sftp($session);
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $session
 * @param string $term_type
 * @param array|null $env
 * @param int $width
 * @param int $height
 * @param int $width_height_type
 * @return resource
 * @throws Ssh2Exception
 *
 */
function ssh2_shell($session, string $term_type = "vanilla", ?array $env = null, int $width = 80, int $height = 25, int $width_height_type = SSH2_TERM_UNIT_CHARS)
{
    error_clear_last();
    if ($width_height_type !== SSH2_TERM_UNIT_CHARS) {
        $safeResult = \ssh2_shell($session, $term_type, $env, $width, $height, $width_height_type);
    } elseif ($height !== 25) {
        $safeResult = \ssh2_shell($session, $term_type, $env, $width, $height);
    } elseif ($width !== 80) {
        $safeResult = \ssh2_shell($session, $term_type, $env, $width);
    } elseif ($env !== null) {
        $safeResult = \ssh2_shell($session, $term_type, $env);
    } else {
        $safeResult = \ssh2_shell($session, $term_type);
    }
    if ($safeResult === false) {
        throw Ssh2Exception::createFromPhpError();
    }
    return $safeResult;
}
PK       ! x@&  &    mbstring.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\MbstringException;

/**
 * @param int $codepoint
 * @param null|string $encoding
 * @return string
 * @throws MbstringException
 *
 */
function mb_chr(int $codepoint, ?string $encoding = null): string
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_chr($codepoint, $encoding);
    } else {
        $safeResult = \mb_chr($codepoint);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array|string $string
 * @param string $to_encoding
 * @param mixed $from_encoding
 * @return array|string
 * @throws MbstringException
 *
 */
function mb_convert_encoding($string, string $to_encoding, $from_encoding = null)
{
    error_clear_last();
    if ($from_encoding !== null) {
        $safeResult = \mb_convert_encoding($string, $to_encoding, $from_encoding);
    } else {
        $safeResult = \mb_convert_encoding($string, $to_encoding);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $to_encoding
 * @param array|string $from_encoding
 * @param array|object|string $var
 * @param array|object|string $vars
 * @return string
 * @throws MbstringException
 *
 */
function mb_convert_variables(string $to_encoding, $from_encoding, &$var, ...$vars): string
{
    error_clear_last();
    $safeResult = \mb_convert_variables($to_encoding, $from_encoding, $var, ...$vars);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param non-empty-list|non-falsy-string|null $encoding
 * @return bool|list
 * @throws MbstringException
 *
 */
function mb_detect_order($encoding = null)
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_detect_order($encoding);
    } else {
        $safeResult = \mb_detect_order();
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $encoding
 * @return list
 * @throws MbstringException
 *
 */
function mb_encoding_aliases(string $encoding): array
{
    error_clear_last();
    $safeResult = \mb_encoding_aliases($encoding);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param callable(array):string $callback
 * @param string $string
 * @param null|string $options
 * @return null|string
 * @throws MbstringException
 *
 */
function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, ?string $options = null): ?string
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \mb_ereg_replace_callback($pattern, $callback, $string, $options);
    } else {
        $safeResult = \mb_ereg_replace_callback($pattern, $callback, $string);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $pattern
 * @param string $replacement
 * @param string $string
 * @param null|string $options
 * @return null|string
 * @throws MbstringException
 *
 */
function mb_ereg_replace(string $pattern, string $replacement, string $string, ?string $options = null): ?string
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \mb_ereg_replace($pattern, $replacement, $string, $options);
    } else {
        $safeResult = \mb_ereg_replace($pattern, $replacement, $string);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return array
 * @throws MbstringException
 *
 */
function mb_ereg_search_getregs(): array
{
    error_clear_last();
    $safeResult = \mb_ereg_search_getregs();
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @param null|string $pattern
 * @param null|string $options
 * @throws MbstringException
 *
 */
function mb_ereg_search_init(string $string, ?string $pattern = null, ?string $options = null): void
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \mb_ereg_search_init($string, $pattern, $options);
    } elseif ($pattern !== null) {
        $safeResult = \mb_ereg_search_init($string, $pattern);
    } else {
        $safeResult = \mb_ereg_search_init($string);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
}


/**
 * @param null|string $pattern
 * @param null|string $options
 * @return array
 * @throws MbstringException
 *
 */
function mb_ereg_search_regs(?string $pattern = null, ?string $options = null): array
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \mb_ereg_search_regs($pattern, $options);
    } elseif ($pattern !== null) {
        $safeResult = \mb_ereg_search_regs($pattern);
    } else {
        $safeResult = \mb_ereg_search_regs();
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $offset
 * @throws MbstringException
 *
 */
function mb_ereg_search_setpos(int $offset): void
{
    error_clear_last();
    $safeResult = \mb_ereg_search_setpos($offset);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
}


/**
 * @param string $pattern
 * @param string $replacement
 * @param string $string
 * @param null|string $options
 * @return string
 * @throws MbstringException
 *
 */
function mb_eregi_replace(string $pattern, string $replacement, string $string, ?string $options = null): string
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \mb_eregi_replace($pattern, $replacement, $string, $options);
    } else {
        $safeResult = \mb_eregi_replace($pattern, $replacement, $string);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $type
 * @return mixed
 * @throws MbstringException
 *
 */
function mb_get_info(string $type = "all")
{
    error_clear_last();
    $safeResult = \mb_get_info($type);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $encoding
 * @return bool|string
 * @throws MbstringException
 *
 */
function mb_http_output(?string $encoding = null)
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_http_output($encoding);
    } else {
        $safeResult = \mb_http_output();
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $encoding
 * @return bool|string
 * @throws MbstringException
 *
 */
function mb_internal_encoding(?string $encoding = null)
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_internal_encoding($encoding);
    } else {
        $safeResult = \mb_internal_encoding();
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @param null|string $encoding
 * @return int
 * @throws MbstringException
 *
 */
function mb_ord(string $string, ?string $encoding = null): int
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_ord($string, $encoding);
    } else {
        $safeResult = \mb_ord($string);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @param array|null $result
 * @throws MbstringException
 *
 */
function mb_parse_str(string $string, ?array &$result): void
{
    error_clear_last();
    $safeResult = \mb_parse_str($string, $result);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
}


/**
 * @param null|string $encoding
 * @return bool|string
 * @throws MbstringException
 *
 */
function mb_regex_encoding(?string $encoding = null)
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \mb_regex_encoding($encoding);
    } else {
        $safeResult = \mb_regex_encoding();
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $to
 * @param string $subject
 * @param string $message
 * @param array|null|string $additional_headers
 * @param null|string $additional_params
 * @throws MbstringException
 *
 */
function mb_send_mail(string $to, string $subject, string $message, $additional_headers = [], ?string $additional_params = null): void
{
    error_clear_last();
    if ($additional_params !== null) {
        $safeResult = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_params);
    } else {
        $safeResult = \mb_send_mail($to, $subject, $message, $additional_headers);
    }
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
}


/**
 * @param string $pattern
 * @param string $string
 * @param int $limit
 * @return list
 * @throws MbstringException
 *
 */
function mb_split(string $pattern, string $string, int $limit = -1): array
{
    error_clear_last();
    $safeResult = \mb_split($pattern, $string, $limit);
    if ($safeResult === false) {
        throw MbstringException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! 2Z
  
    yaz.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\YazException;

/**
 * @param resource $id
 * @param string $query
 * @param array|null $result
 * @throws YazException
 *
 */
function yaz_ccl_parse($id, string $query, ?array &$result): void
{
    error_clear_last();
    $safeResult = \yaz_ccl_parse($id, $query, $result);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param resource $id
 * @throws YazException
 *
 */
function yaz_close($id): void
{
    error_clear_last();
    $safeResult = \yaz_close($id);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param string $zurl
 * @param mixed $options
 * @return mixed
 * @throws YazException
 *
 */
function yaz_connect(string $zurl, $options = null)
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \yaz_connect($zurl, $options);
    } else {
        $safeResult = \yaz_connect($zurl);
    }
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $id
 * @param string $databases
 * @throws YazException
 *
 */
function yaz_database($id, string $databases): void
{
    error_clear_last();
    $safeResult = \yaz_database($id, $databases);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param resource $id
 * @param string $elementset
 * @throws YazException
 *
 */
function yaz_element($id, string $elementset): void
{
    error_clear_last();
    $safeResult = \yaz_element($id, $elementset);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param resource $id
 * @throws YazException
 *
 */
function yaz_present($id): void
{
    error_clear_last();
    $safeResult = \yaz_present($id);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param resource $id
 * @param string $type
 * @param string $query
 * @throws YazException
 *
 */
function yaz_search($id, string $type, string $query): void
{
    error_clear_last();
    $safeResult = \yaz_search($id, $type, $query);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
}


/**
 * @param array $options
 * @return mixed
 * @throws YazException
 *
 */
function yaz_wait(?array &$options = null)
{
    error_clear_last();
    $safeResult = \yaz_wait($options);
    if ($safeResult === false) {
        throw YazException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! Lᥜ      session.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SessionException;

/**
 * @throws SessionException
 *
 */
function session_abort(): void
{
    error_clear_last();
    $safeResult = \session_abort();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @param int|null $value
 * @return int
 * @throws SessionException
 *
 */
function session_cache_expire(?int $value = null): int
{
    error_clear_last();
    if ($value !== null) {
        $safeResult = \session_cache_expire($value);
    } else {
        $safeResult = \session_cache_expire();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $value
 * @return string
 * @throws SessionException
 *
 */
function session_cache_limiter(?string $value = null): string
{
    error_clear_last();
    if ($value !== null) {
        $safeResult = \session_cache_limiter($value);
    } else {
        $safeResult = \session_cache_limiter();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $prefix
 * @return string
 * @throws SessionException
 *
 */
function session_create_id(string $prefix = ""): string
{
    error_clear_last();
    $safeResult = \session_create_id($prefix);
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @throws SessionException
 *
 */
function session_decode(string $data): void
{
    error_clear_last();
    $safeResult = \session_decode($data);
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @throws SessionException
 *
 */
function session_destroy(): void
{
    error_clear_last();
    $safeResult = \session_destroy();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @return string
 * @throws SessionException
 *
 */
function session_encode(): string
{
    error_clear_last();
    $safeResult = \session_encode();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws SessionException
 *
 */
function session_gc(): int
{
    error_clear_last();
    $safeResult = \session_gc();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $id
 * @return string
 * @throws SessionException
 *
 */
function session_id(?string $id = null): string
{
    error_clear_last();
    if ($id !== null) {
        $safeResult = \session_id($id);
    } else {
        $safeResult = \session_id();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $module
 * @return string
 * @throws SessionException
 *
 */
function session_module_name(?string $module = null): string
{
    error_clear_last();
    if ($module !== null) {
        $safeResult = \session_module_name($module);
    } else {
        $safeResult = \session_module_name();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|string $name
 * @return non-falsy-string
 * @throws SessionException
 *
 */
function session_name(?string $name = null): string
{
    error_clear_last();
    if ($name !== null) {
        $safeResult = \session_name($name);
    } else {
        $safeResult = \session_name();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param bool $delete_old_session
 * @throws SessionException
 *
 */
function session_regenerate_id(bool $delete_old_session = false): void
{
    error_clear_last();
    $safeResult = \session_regenerate_id($delete_old_session);
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @throws SessionException
 *
 */
function session_reset(): void
{
    error_clear_last();
    $safeResult = \session_reset();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @param null|string $path
 * @return string
 * @throws SessionException
 *
 */
function session_save_path(?string $path = null): string
{
    error_clear_last();
    if ($path !== null) {
        $safeResult = \session_save_path($path);
    } else {
        $safeResult = \session_save_path();
    }
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $options
 * @throws SessionException
 *
 */
function session_start(array $options = []): void
{
    error_clear_last();
    $safeResult = \session_start($options);
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @throws SessionException
 *
 */
function session_unset(): void
{
    error_clear_last();
    $safeResult = \session_unset();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}


/**
 * @throws SessionException
 *
 */
function session_write_close(): void
{
    error_clear_last();
    $safeResult = \session_write_close();
    if ($safeResult === false) {
        throw SessionException::createFromPhpError();
    }
}
PK       ! ZͶ    	  posix.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PosixException;

/**
 * @param string $filename
 * @param int $flags
 * @throws PosixException
 *
 */
function posix_access(string $filename, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \posix_access($filename, $flags);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $group_id
 * @return array{name: string, passwd: string, gid: int, members: list}
 * @throws PosixException
 *
 */
function posix_getgrgid(int $group_id): array
{
    error_clear_last();
    $safeResult = \posix_getgrgid($group_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $name
 * @return array{name: string, passwd: string, gid: int, members: list}
 * @throws PosixException
 *
 */
function posix_getgrnam(string $name): array
{
    error_clear_last();
    $safeResult = \posix_getgrnam($name);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return list
 * @throws PosixException
 *
 */
function posix_getgroups(): array
{
    error_clear_last();
    $safeResult = \posix_getgroups();
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return string
 * @throws PosixException
 *
 */
function posix_getlogin(): string
{
    error_clear_last();
    $safeResult = \posix_getlogin();
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $user_id
 * @return array{name: string, passwd: string, uid: int, gid: int, gecos: string, dir: string, shell: string}
 * @throws PosixException
 *
 */
function posix_getpwuid(int $user_id): array
{
    error_clear_last();
    $safeResult = \posix_getpwuid($user_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return array
 * @throws PosixException
 *
 */
function posix_getrlimit(): array
{
    error_clear_last();
    $safeResult = \posix_getrlimit();
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $process_id
 * @return int
 * @throws PosixException
 *
 */
function posix_getsid(int $process_id): int
{
    error_clear_last();
    $safeResult = \posix_getsid($process_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $username
 * @param int $group_id
 * @throws PosixException
 *
 */
function posix_initgroups(string $username, int $group_id): void
{
    error_clear_last();
    $safeResult = \posix_initgroups($username, $group_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $process_id
 * @param int $signal
 * @throws PosixException
 *
 */
function posix_kill(int $process_id, int $signal): void
{
    error_clear_last();
    $safeResult = \posix_kill($process_id, $signal);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param int $permissions
 * @throws PosixException
 *
 */
function posix_mkfifo(string $filename, int $permissions): void
{
    error_clear_last();
    $safeResult = \posix_mkfifo($filename, $permissions);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param int $flags
 * @param int $major
 * @param int $minor
 * @throws PosixException
 *
 */
function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): void
{
    error_clear_last();
    $safeResult = \posix_mknod($filename, $flags, $major, $minor);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $group_id
 * @throws PosixException
 *
 */
function posix_setegid(int $group_id): void
{
    error_clear_last();
    $safeResult = \posix_setegid($group_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $user_id
 * @throws PosixException
 *
 */
function posix_seteuid(int $user_id): void
{
    error_clear_last();
    $safeResult = \posix_seteuid($user_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $group_id
 * @throws PosixException
 *
 */
function posix_setgid(int $group_id): void
{
    error_clear_last();
    $safeResult = \posix_setgid($group_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $process_id
 * @param int $process_group_id
 * @throws PosixException
 *
 */
function posix_setpgid(int $process_id, int $process_group_id): void
{
    error_clear_last();
    $safeResult = \posix_setpgid($process_id, $process_group_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @param int $resource
 * @param int $soft_limit
 * @param int $hard_limit
 * @throws PosixException
 *
 */
function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void
{
    error_clear_last();
    $safeResult = \posix_setrlimit($resource, $soft_limit, $hard_limit);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @return int
 * @throws PosixException
 *
 */
function posix_setsid(): int
{
    error_clear_last();
    $safeResult = \posix_setsid();
    if ($safeResult === -1) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $user_id
 * @throws PosixException
 *
 */
function posix_setuid(int $user_id): void
{
    error_clear_last();
    $safeResult = \posix_setuid($user_id);
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
}


/**
 * @return array
 * @throws PosixException
 *
 */
function posix_times(): array
{
    error_clear_last();
    $safeResult = \posix_times();
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return array
 * @throws PosixException
 *
 */
function posix_uname(): array
{
    error_clear_last();
    $safeResult = \posix_uname();
    if ($safeResult === false) {
        throw PosixException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! ߻      inotify.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\InotifyException;

/**
 * @return resource
 * @throws InotifyException
 *
 */
function inotify_init()
{
    error_clear_last();
    $safeResult = \inotify_init();
    if ($safeResult === false) {
        throw InotifyException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $inotify_instance
 * @param int $watch_descriptor
 * @throws InotifyException
 *
 */
function inotify_rm_watch($inotify_instance, int $watch_descriptor): void
{
    error_clear_last();
    $safeResult = \inotify_rm_watch($inotify_instance, $watch_descriptor);
    if ($safeResult === false) {
        throw InotifyException::createFromPhpError();
    }
}
PK       ! %'aw
  w
    exec.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ExecException;

/**
 * @param string $command
 * @param array|null $output
 * @param int|null $result_code
 * @return string
 * @throws ExecException
 *
 */
function exec(string $command, ?array &$output = null, ?int &$result_code = null): string
{
    error_clear_last();
    $safeResult = \exec($command, $output, $result_code);
    if ($safeResult === false) {
        throw ExecException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $process
 * @return int
 * @throws ExecException
 *
 */
function proc_close($process): int
{
    error_clear_last();
    $safeResult = \proc_close($process);
    if ($safeResult === -1) {
        throw ExecException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $priority
 * @throws ExecException
 *
 */
function proc_nice(int $priority): void
{
    error_clear_last();
    $safeResult = \proc_nice($priority);
    if ($safeResult === false) {
        throw ExecException::createFromPhpError();
    }
}


/**
 * @param string $cmd
 * @param array $descriptorspec
 * @param null|resource[] $pipes
 * @param null|string $cwd
 * @param array|null $env
 * @param array|null $other_options
 * @return resource
 * @throws ExecException
 *
 */
function proc_open(string $cmd, array $descriptorspec, ?array &$pipes, ?string $cwd = null, ?array $env = null, ?array $other_options = null)
{
    error_clear_last();
    if ($other_options !== null) {
        $safeResult = \proc_open($cmd, $descriptorspec, $pipes, $cwd, $env, $other_options);
    } elseif ($env !== null) {
        $safeResult = \proc_open($cmd, $descriptorspec, $pipes, $cwd, $env);
    } elseif ($cwd !== null) {
        $safeResult = \proc_open($cmd, $descriptorspec, $pipes, $cwd);
    } else {
        $safeResult = \proc_open($cmd, $descriptorspec, $pipes);
    }
    if ($safeResult === false) {
        throw ExecException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $command
 * @return null|string
 * @throws ExecException
 *
 */
function shell_exec(string $command): ?string
{
    error_clear_last();
    $safeResult = \shell_exec($command);
    if ($safeResult === false) {
        throw ExecException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $command
 * @param int|null $result_code
 * @return string
 * @throws ExecException
 *
 */
function system(string $command, ?int &$result_code = null): string
{
    error_clear_last();
    $safeResult = \system($command, $result_code);
    if ($safeResult === false) {
        throw ExecException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! 5*^3  ^3  	  ibase.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\IbaseException;

/**
 * @param resource $blob_handle
 * @throws IbaseException
 *
 */
function fbird_blob_cancel($blob_handle): void
{
    error_clear_last();
    $safeResult = \fbird_blob_cancel($blob_handle);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name
 * @param string $middle_name
 * @param string $last_name
 * @throws IbaseException
 *
 */
function ibase_add_user($service_handle, string $user_name, string $password, ?string $first_name = null, ?string $middle_name = null, ?string $last_name = null): void
{
    error_clear_last();
    if ($last_name !== null) {
        $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name);
    } elseif ($middle_name !== null) {
        $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name);
    } elseif ($first_name !== null) {
        $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name);
    } else {
        $safeResult = \ibase_add_user($service_handle, $user_name, $password);
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $service_handle
 * @param string $source_db
 * @param string $dest_file
 * @param int $options
 * @param bool $verbose
 * @return mixed
 * @throws IbaseException
 *
 */
function ibase_backup($service_handle, string $source_db, string $dest_file, int $options = 0, bool $verbose = false)
{
    error_clear_last();
    $safeResult = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $blob_handle
 * @throws IbaseException
 *
 */
function ibase_blob_cancel($blob_handle): void
{
    error_clear_last();
    $safeResult = \ibase_blob_cancel($blob_handle);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param null|resource $link_identifier
 * @return resource
 * @throws IbaseException
 *
 */
function ibase_blob_create($link_identifier = null)
{
    error_clear_last();
    if ($link_identifier !== null) {
        $safeResult = \ibase_blob_create($link_identifier);
    } else {
        $safeResult = \ibase_blob_create();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $blob_handle
 * @param int $len
 * @return string
 * @throws IbaseException
 *
 */
function ibase_blob_get($blob_handle, int $len): string
{
    error_clear_last();
    $safeResult = \ibase_blob_get($blob_handle, $len);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $connection_id
 * @throws IbaseException
 *
 */
function ibase_close($connection_id = null): void
{
    error_clear_last();
    if ($connection_id !== null) {
        $safeResult = \ibase_close($connection_id);
    } else {
        $safeResult = \ibase_close();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param null|resource $link_or_trans_identifier
 * @throws IbaseException
 *
 */
function ibase_commit_ret($link_or_trans_identifier = null): void
{
    error_clear_last();
    if ($link_or_trans_identifier !== null) {
        $safeResult = \ibase_commit_ret($link_or_trans_identifier);
    } else {
        $safeResult = \ibase_commit_ret();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param null|resource $link_or_trans_identifier
 * @throws IbaseException
 *
 */
function ibase_commit($link_or_trans_identifier = null): void
{
    error_clear_last();
    if ($link_or_trans_identifier !== null) {
        $safeResult = \ibase_commit($link_or_trans_identifier);
    } else {
        $safeResult = \ibase_commit();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param string $database
 * @param string $username
 * @param string $password
 * @param string $charset
 * @param int $buffers
 * @param int $dialect
 * @param string $role
 * @param int $sync
 * @return resource
 * @throws IbaseException
 *
 */
function ibase_connect(?string $database = null, ?string $username = null, ?string $password = null, ?string $charset = null, ?int $buffers = null, ?int $dialect = null, ?string $role = null, ?int $sync = null)
{
    error_clear_last();
    if ($sync !== null) {
        $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync);
    } elseif ($role !== null) {
        $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role);
    } elseif ($dialect !== null) {
        $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect);
    } elseif ($buffers !== null) {
        $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers);
    } elseif ($charset !== null) {
        $safeResult = \ibase_connect($database, $username, $password, $charset);
    } elseif ($password !== null) {
        $safeResult = \ibase_connect($database, $username, $password);
    } elseif ($username !== null) {
        $safeResult = \ibase_connect($database, $username);
    } elseif ($database !== null) {
        $safeResult = \ibase_connect($database);
    } else {
        $safeResult = \ibase_connect();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $service_handle
 * @param string $user_name
 * @throws IbaseException
 *
 */
function ibase_delete_user($service_handle, string $user_name): void
{
    error_clear_last();
    $safeResult = \ibase_delete_user($service_handle, $user_name);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param null|resource $connection
 * @throws IbaseException
 *
 */
function ibase_drop_db($connection = null): void
{
    error_clear_last();
    if ($connection !== null) {
        $safeResult = \ibase_drop_db($connection);
    } else {
        $safeResult = \ibase_drop_db();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $event
 * @throws IbaseException
 *
 */
function ibase_free_event_handler($event): void
{
    error_clear_last();
    $safeResult = \ibase_free_event_handler($event);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $query
 * @throws IbaseException
 *
 */
function ibase_free_query($query): void
{
    error_clear_last();
    $safeResult = \ibase_free_query($query);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $result_identifier
 * @throws IbaseException
 *
 */
function ibase_free_result($result_identifier): void
{
    error_clear_last();
    $safeResult = \ibase_free_result($result_identifier);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $service_handle
 * @param string $db
 * @param int $action
 * @param int $argument
 * @throws IbaseException
 *
 */
function ibase_maintain_db($service_handle, string $db, int $action, int $argument = 0): void
{
    error_clear_last();
    $safeResult = \ibase_maintain_db($service_handle, $db, $action, $argument);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $service_handle
 * @param string $user_name
 * @param string $password
 * @param string $first_name
 * @param string $middle_name
 * @param string $last_name
 * @throws IbaseException
 *
 */
function ibase_modify_user($service_handle, string $user_name, string $password, ?string $first_name = null, ?string $middle_name = null, ?string $last_name = null): void
{
    error_clear_last();
    if ($last_name !== null) {
        $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name);
    } elseif ($middle_name !== null) {
        $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name);
    } elseif ($first_name !== null) {
        $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name);
    } else {
        $safeResult = \ibase_modify_user($service_handle, $user_name, $password);
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param resource $result
 * @param string $name
 * @throws IbaseException
 *
 */
function ibase_name_result($result, string $name): void
{
    error_clear_last();
    $safeResult = \ibase_name_result($result, $name);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param string $database
 * @param string $username
 * @param string $password
 * @param string $charset
 * @param int $buffers
 * @param int $dialect
 * @param string $role
 * @param int $sync
 * @return resource
 * @throws IbaseException
 *
 */
function ibase_pconnect(?string $database = null, ?string $username = null, ?string $password = null, ?string $charset = null, ?int $buffers = null, ?int $dialect = null, ?string $role = null, ?int $sync = null)
{
    error_clear_last();
    if ($sync !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync);
    } elseif ($role !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role);
    } elseif ($dialect !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect);
    } elseif ($buffers !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers);
    } elseif ($charset !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password, $charset);
    } elseif ($password !== null) {
        $safeResult = \ibase_pconnect($database, $username, $password);
    } elseif ($username !== null) {
        $safeResult = \ibase_pconnect($database, $username);
    } elseif ($database !== null) {
        $safeResult = \ibase_pconnect($database);
    } else {
        $safeResult = \ibase_pconnect();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $service_handle
 * @param string $source_file
 * @param string $dest_db
 * @param int $options
 * @param bool $verbose
 * @return mixed
 * @throws IbaseException
 *
 */
function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false)
{
    error_clear_last();
    $safeResult = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param null|resource $link_or_trans_identifier
 * @throws IbaseException
 *
 */
function ibase_rollback_ret($link_or_trans_identifier = null): void
{
    error_clear_last();
    if ($link_or_trans_identifier !== null) {
        $safeResult = \ibase_rollback_ret($link_or_trans_identifier);
    } else {
        $safeResult = \ibase_rollback_ret();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param null|resource $link_or_trans_identifier
 * @throws IbaseException
 *
 */
function ibase_rollback($link_or_trans_identifier = null): void
{
    error_clear_last();
    if ($link_or_trans_identifier !== null) {
        $safeResult = \ibase_rollback($link_or_trans_identifier);
    } else {
        $safeResult = \ibase_rollback();
    }
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}


/**
 * @param string $host
 * @param string $dba_username
 * @param string $dba_password
 * @return resource
 * @throws IbaseException
 *
 */
function ibase_service_attach(string $host, string $dba_username, string $dba_password)
{
    error_clear_last();
    $safeResult = \ibase_service_attach($host, $dba_username, $dba_password);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $service_handle
 * @throws IbaseException
 *
 */
function ibase_service_detach($service_handle): void
{
    error_clear_last();
    $safeResult = \ibase_service_detach($service_handle);
    if ($safeResult === false) {
        throw IbaseException::createFromPhpError();
    }
}
PK       ! ;    
  pspell.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\PspellException;

/**
 * @param int $dictionary
 * @param string $word
 * @throws PspellException
 *
 */
function pspell_add_to_personal(int $dictionary, string $word): void
{
    error_clear_last();
    $safeResult = \pspell_add_to_personal($dictionary, $word);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $dictionary
 * @param string $word
 * @throws PspellException
 *
 */
function pspell_add_to_session(int $dictionary, string $word): void
{
    error_clear_last();
    $safeResult = \pspell_add_to_session($dictionary, $word);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $dictionary
 * @throws PspellException
 *
 */
function pspell_clear_session(int $dictionary): void
{
    error_clear_last();
    $safeResult = \pspell_clear_session($dictionary);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param string $language
 * @param string $spelling
 * @param string $jargon
 * @param string $encoding
 * @return int
 * @throws PspellException
 *
 */
function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = ""): int
{
    error_clear_last();
    $safeResult = \pspell_config_create($language, $spelling, $jargon, $encoding);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $config
 * @param string $directory
 * @throws PspellException
 *
 */
function pspell_config_data_dir(int $config, string $directory): void
{
    error_clear_last();
    $safeResult = \pspell_config_data_dir($config, $directory);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param string $directory
 * @throws PspellException
 *
 */
function pspell_config_dict_dir(int $config, string $directory): void
{
    error_clear_last();
    $safeResult = \pspell_config_dict_dir($config, $directory);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param int $min_length
 * @throws PspellException
 *
 */
function pspell_config_ignore(int $config, int $min_length): void
{
    error_clear_last();
    $safeResult = \pspell_config_ignore($config, $min_length);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param int $mode
 * @throws PspellException
 *
 */
function pspell_config_mode(int $config, int $mode): void
{
    error_clear_last();
    $safeResult = \pspell_config_mode($config, $mode);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param string $filename
 * @throws PspellException
 *
 */
function pspell_config_personal(int $config, string $filename): void
{
    error_clear_last();
    $safeResult = \pspell_config_personal($config, $filename);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param string $filename
 * @throws PspellException
 *
 */
function pspell_config_repl(int $config, string $filename): void
{
    error_clear_last();
    $safeResult = \pspell_config_repl($config, $filename);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param bool $allow
 * @throws PspellException
 *
 */
function pspell_config_runtogether(int $config, bool $allow): void
{
    error_clear_last();
    $safeResult = \pspell_config_runtogether($config, $allow);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @param bool $save
 * @throws PspellException
 *
 */
function pspell_config_save_repl(int $config, bool $save): void
{
    error_clear_last();
    $safeResult = \pspell_config_save_repl($config, $save);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $config
 * @return int
 * @throws PspellException
 *
 */
function pspell_new_config(int $config): int
{
    error_clear_last();
    $safeResult = \pspell_new_config($config);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param string $language
 * @param string $spelling
 * @param string $jargon
 * @param string $encoding
 * @param int $mode
 * @return int
 * @throws PspellException
 *
 */
function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
{
    error_clear_last();
    $safeResult = \pspell_new_personal($filename, $language, $spelling, $jargon, $encoding, $mode);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $language
 * @param string $spelling
 * @param string $jargon
 * @param string $encoding
 * @param int $mode
 * @return int
 * @throws PspellException
 *
 */
function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int
{
    error_clear_last();
    $safeResult = \pspell_new($language, $spelling, $jargon, $encoding, $mode);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $dictionary
 * @throws PspellException
 *
 */
function pspell_save_wordlist(int $dictionary): void
{
    error_clear_last();
    $safeResult = \pspell_save_wordlist($dictionary);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}


/**
 * @param int $dictionary
 * @param string $misspelled
 * @param string $correct
 * @throws PspellException
 *
 */
function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): void
{
    error_clear_last();
    $safeResult = \pspell_store_replacement($dictionary, $misspelled, $correct);
    if ($safeResult === false) {
        throw PspellException::createFromPhpError();
    }
}
PK       ! "e

  

    com.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ComException;

/**
 * @return string
 * @throws ComException
 *
 */
function com_create_guid(): string
{
    error_clear_last();
    $safeResult = \com_create_guid();
    if ($safeResult === false) {
        throw ComException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param object $variant
 * @param object $sink_object
 * @param mixed $sink_interface
 * @throws ComException
 *
 */
function com_event_sink(object $variant, object $sink_object, $sink_interface = null): void
{
    error_clear_last();
    if ($sink_interface !== null) {
        $safeResult = \com_event_sink($variant, $sink_object, $sink_interface);
    } else {
        $safeResult = \com_event_sink($variant, $sink_object);
    }
    if ($safeResult === false) {
        throw ComException::createFromPhpError();
    }
}


/**
 * @param string $typelib
 * @param bool $case_insensitive
 * @throws ComException
 *
 */
function com_load_typelib(string $typelib, bool $case_insensitive = true): void
{
    error_clear_last();
    $safeResult = \com_load_typelib($typelib, $case_insensitive);
    if ($safeResult === false) {
        throw ComException::createFromPhpError();
    }
}


/**
 * @param object $variant
 * @param null|string $dispatch_interface
 * @param bool $display_sink
 * @throws ComException
 *
 */
function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, bool $display_sink = false): void
{
    error_clear_last();
    if ($display_sink !== false) {
        $safeResult = \com_print_typeinfo($variant, $dispatch_interface, $display_sink);
    } elseif ($dispatch_interface !== null) {
        $safeResult = \com_print_typeinfo($variant, $dispatch_interface);
    } else {
        $safeResult = \com_print_typeinfo($variant);
    }
    if ($safeResult === false) {
        throw ComException::createFromPhpError();
    }
}


/**
 * @param object $variant
 * @return int
 * @throws ComException
 *
 */
function variant_date_to_timestamp(object $variant): int
{
    error_clear_last();
    $safeResult = \variant_date_to_timestamp($variant);
    if ($safeResult === null) {
        throw ComException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $value
 * @param int $decimals
 * @return mixed
 * @throws ComException
 *
 */
function variant_round($value, int $decimals)
{
    error_clear_last();
    $safeResult = \variant_round($value, $decimals);
    if ($safeResult === null) {
        throw ComException::createFromPhpError();
    }
    return $safeResult;
}
PK       !       gettext.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\GettextException;

/**
 * @param string $domain
 * @param string $directory
 * @return string
 * @throws GettextException
 *
 */
function bindtextdomain(string $domain, string $directory): string
{
    error_clear_last();
    $safeResult = \bindtextdomain($domain, $directory);
    if ($safeResult === false) {
        throw GettextException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! n  n    misc.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\MiscException;

/**
 * @param string $constant_name
 * @param mixed $value
 * @param bool $case_insensitive
 * @throws MiscException
 *
 */
function define(string $constant_name, $value, bool $case_insensitive = false): void
{
    error_clear_last();
    $safeResult = \define($constant_name, $value, $case_insensitive);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param bool $return
 * @return bool|string
 * @throws MiscException
 *
 */
function highlight_file(string $filename, bool $return = false)
{
    error_clear_last();
    $safeResult = \highlight_file($filename, $return);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @param bool $return
 * @return bool|string
 * @throws MiscException
 *
 */
function highlight_string(string $string, bool $return = false)
{
    error_clear_last();
    $safeResult = \highlight_string($string, $return);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param bool $as_number
 * @return array{0:int,1:int}|float|int
 * @throws MiscException
 *
 */
function hrtime(bool $as_number = false)
{
    error_clear_last();
    $safeResult = \hrtime($as_number);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $format
 * @param mixed $values
 * @return string
 * @throws MiscException
 *
 */
function pack(string $format, ...$values): string
{
    error_clear_last();
    if ($values !== []) {
        $safeResult = \pack($format, ...$values);
    } else {
        $safeResult = \pack($format);
    }
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int|string $in_codepage
 * @param int|string $out_codepage
 * @param string $subject
 * @return string
 * @throws MiscException
 *
 */
function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): string
{
    error_clear_last();
    $safeResult = \sapi_windows_cp_conv($in_codepage, $out_codepage, $subject);
    if ($safeResult === null) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $codepage
 * @throws MiscException
 *
 */
function sapi_windows_cp_set(int $codepage): void
{
    error_clear_last();
    $safeResult = \sapi_windows_cp_set($codepage);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param int $event
 * @param int $pid
 * @throws MiscException
 *
 */
function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void
{
    error_clear_last();
    $safeResult = \sapi_windows_generate_ctrl_event($event, $pid);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param callable|null $handler
 * @param bool $add
 * @throws MiscException
 *
 */
function sapi_windows_set_ctrl_handler(?callable $handler, bool $add = true): void
{
    error_clear_last();
    $safeResult = \sapi_windows_set_ctrl_handler($handler, $add);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @param bool|null $enable
 * @throws MiscException
 *
 */
function sapi_windows_vt100_support($stream, ?bool $enable = null): void
{
    error_clear_last();
    if ($enable !== null) {
        $safeResult = \sapi_windows_vt100_support($stream, $enable);
    } else {
        $safeResult = \sapi_windows_vt100_support($stream);
    }
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param int $seconds
 * @return int
 * @throws MiscException
 *
 */
function sleep(int $seconds): int
{
    error_clear_last();
    $safeResult = \sleep($seconds);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $seconds
 * @param int $nanoseconds
 * @return array{seconds:0|positive-int,nanoseconds:0|positive-int}|bool
 * @throws MiscException
 *
 */
function time_nanosleep(int $seconds, int $nanoseconds)
{
    error_clear_last();
    $safeResult = \time_nanosleep($seconds, $nanoseconds);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param float $timestamp
 * @throws MiscException
 *
 */
function time_sleep_until(float $timestamp): void
{
    error_clear_last();
    $safeResult = \time_sleep_until($timestamp);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
}


/**
 * @param string $format
 * @param string $string
 * @param int $offset
 * @return array
 * @throws MiscException
 *
 */
function unpack(string $format, string $string, int $offset = 0): array
{
    error_clear_last();
    $safeResult = \unpack($format, $string, $offset);
    if ($safeResult === false) {
        throw MiscException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! (*      lzf.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\LzfException;

/**
 * @param string $data
 * @return string
 * @throws LzfException
 *
 */
function lzf_compress(string $data): string
{
    error_clear_last();
    $safeResult = \lzf_compress($data);
    if ($safeResult === false) {
        throw LzfException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @return string
 * @throws LzfException
 *
 */
function lzf_decompress(string $data): string
{
    error_clear_last();
    $safeResult = \lzf_decompress($data);
    if ($safeResult === false) {
        throw LzfException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! B]  ]  
  mysqli.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\MysqliException;

/**
 * @return array
 * @throws MysqliException
 *
 */
function mysqli_get_client_stats(): array
{
    error_clear_last();
    $safeResult = \mysqli_get_client_stats();
    if ($safeResult === false) {
        throw MysqliException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! ݙ)W      xml.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\XmlException;

/**
 * @param \XMLParser $parser
 * @throws XmlException
 *
 */
function xml_parser_free(\XMLParser $parser): void
{
    error_clear_last();
    $safeResult = \xml_parser_free($parser);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_character_data_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_character_data_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_default_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_default_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $start_handler
 * @param callable $end_handler
 * @throws XmlException
 *
 */
function xml_set_element_handler(\XMLParser $parser, callable $start_handler, callable $end_handler): void
{
    error_clear_last();
    $safeResult = \xml_set_element_handler($parser, $start_handler, $end_handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_end_namespace_decl_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_end_namespace_decl_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_external_entity_ref_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_external_entity_ref_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_notation_decl_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_notation_decl_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param object $object
 * @throws XmlException
 *
 */
function xml_set_object(\XMLParser $parser, object $object): void
{
    error_clear_last();
    $safeResult = \xml_set_object($parser, $object);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_processing_instruction_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_processing_instruction_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_start_namespace_decl_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_start_namespace_decl_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}


/**
 * @param \XMLParser $parser
 * @param callable $handler
 * @throws XmlException
 *
 */
function xml_set_unparsed_entity_decl_handler(\XMLParser $parser, callable $handler): void
{
    error_clear_last();
    $safeResult = \xml_set_unparsed_entity_decl_handler($parser, $handler);
    if ($safeResult === false) {
        throw XmlException::createFromPhpError();
    }
}
PK       !     	  image.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ImageException;

/**
 * @param string $filename
 * @param array|null $image_info
 * @return array{0: 0|positive-int, 1: 0|positive-int, 2: int, 3: string, mime: string, channels: int, bits: int}|null
 * @throws ImageException
 *
 */
function getimagesize(string $filename, ?array &$image_info = null): ?array
{
    error_clear_last();
    $safeResult = \getimagesize($filename, $image_info);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $image_type
 * @param bool $include_dot
 * @return string
 * @throws ImageException
 *
 */
function image_type_to_extension(int $image_type, bool $include_dot = true): string
{
    error_clear_last();
    $safeResult = \image_type_to_extension($image_type, $include_dot);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param array $affine
 * @param array|null $clip
 * @return \GdImage
 * @throws ImageException
 *
 */
function imageaffine(\GdImage $image, array $affine, ?array $clip = null): \GdImage
{
    error_clear_last();
    if ($clip !== null) {
        $safeResult = \imageaffine($image, $affine, $clip);
    } else {
        $safeResult = \imageaffine($image, $affine);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $matrix1
 * @param array $matrix2
 * @return array{0:float,1:float,2:float,3:float,4:float,5:float}
 * @throws ImageException
 *
 */
function imageaffinematrixconcat(array $matrix1, array $matrix2): array
{
    error_clear_last();
    $safeResult = \imageaffinematrixconcat($matrix1, $matrix2);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $type
 * @param array|float $options
 * @return array{0:float,1:float,2:float,3:float,4:float,5:float}
 * @throws ImageException
 *
 */
function imageaffinematrixget(int $type, $options): array
{
    error_clear_last();
    $safeResult = \imageaffinematrixget($type, $options);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param bool $enable
 * @throws ImageException
 *
 */
function imagealphablending(\GdImage $image, bool $enable): void
{
    error_clear_last();
    $safeResult = \imagealphablending($image, $enable);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param bool $enable
 * @throws ImageException
 *
 */
function imageantialias(\GdImage $image, bool $enable): void
{
    error_clear_last();
    $safeResult = \imageantialias($image, $enable);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $center_x
 * @param int $center_y
 * @param int $width
 * @param int $height
 * @param int $start_angle
 * @param int $end_angle
 * @param int $color
 * @throws ImageException
 *
 */
function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): void
{
    error_clear_last();
    $safeResult = \imagearc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int $quality
 * @param int $speed
 * @throws ImageException
 *
 */
function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed = -1): void
{
    error_clear_last();
    if ($speed !== -1) {
        $safeResult = \imageavif($image, $file, $quality, $speed);
    } elseif ($quality !== -1) {
        $safeResult = \imageavif($image, $file, $quality);
    } elseif ($file !== null) {
        $safeResult = \imageavif($image, $file);
    } else {
        $safeResult = \imageavif($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param bool $compressed
 * @throws ImageException
 *
 */
function imagebmp(\GdImage $image, $file = null, bool $compressed = true): void
{
    error_clear_last();
    if ($compressed !== true) {
        $safeResult = \imagebmp($image, $file, $compressed);
    } elseif ($file !== null) {
        $safeResult = \imagebmp($image, $file);
    } else {
        $safeResult = \imagebmp($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $font
 * @param int $x
 * @param int $y
 * @param string $char
 * @param int $color
 * @throws ImageException
 *
 */
function imagechar(\GdImage $image, int $font, int $x, int $y, string $char, int $color): void
{
    error_clear_last();
    $safeResult = \imagechar($image, $font, $x, $y, $char, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $font
 * @param int $x
 * @param int $y
 * @param string $char
 * @param int $color
 * @throws ImageException
 *
 */
function imagecharup(\GdImage $image, int $font, int $x, int $y, string $char, int $color): void
{
    error_clear_last();
    $safeResult = \imagecharup($image, $font, $x, $y, $char, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x
 * @param int $y
 * @return int
 * @throws ImageException
 *
 */
function imagecolorat(\GdImage $image, int $x, int $y): int
{
    error_clear_last();
    $safeResult = \imagecolorat($image, $x, $y);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param int $color
 * @throws ImageException
 *
 */
function imagecolordeallocate(\GdImage $image, int $color): void
{
    error_clear_last();
    $safeResult = \imagecolordeallocate($image, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image1
 * @param \GdImage $image2
 * @throws ImageException
 *
 */
function imagecolormatch(\GdImage $image1, \GdImage $image2): void
{
    error_clear_last();
    $safeResult = \imagecolormatch($image1, $image2);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $color
 * @param int $red
 * @param int $green
 * @param int $blue
 * @param int $alpha
 * @throws ImageException
 *
 */
function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0): void
{
    error_clear_last();
    $safeResult = \imagecolorset($image, $color, $red, $green, $blue, $alpha);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $color
 * @return array{red: int, green: int, blue: int, alpha: int}
 * @throws ImageException
 *
 */
function imagecolorsforindex(\GdImage $image, int $color): array
{
    error_clear_last();
    $safeResult = \imagecolorsforindex($image, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param array $matrix
 * @param float $divisor
 * @param float $offset
 * @throws ImageException
 *
 */
function imageconvolution(\GdImage $image, array $matrix, float $divisor, float $offset): void
{
    error_clear_last();
    $safeResult = \imageconvolution($image, $matrix, $divisor, $offset);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $dst_image
 * @param \GdImage $src_image
 * @param int $dst_x
 * @param int $dst_y
 * @param int $src_x
 * @param int $src_y
 * @param int $src_width
 * @param int $src_height
 * @throws ImageException
 *
 */
function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): void
{
    error_clear_last();
    $safeResult = \imagecopy($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $dst_image
 * @param \GdImage $src_image
 * @param int $dst_x
 * @param int $dst_y
 * @param int $src_x
 * @param int $src_y
 * @param int $src_width
 * @param int $src_height
 * @param int $pct
 * @throws ImageException
 *
 */
function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void
{
    error_clear_last();
    $safeResult = \imagecopymerge($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $dst_image
 * @param \GdImage $src_image
 * @param int $dst_x
 * @param int $dst_y
 * @param int $src_x
 * @param int $src_y
 * @param int $src_width
 * @param int $src_height
 * @param int $pct
 * @throws ImageException
 *
 */
function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void
{
    error_clear_last();
    $safeResult = \imagecopymergegray($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $dst_image
 * @param \GdImage $src_image
 * @param int $dst_x
 * @param int $dst_y
 * @param int $src_x
 * @param int $src_y
 * @param int $dst_width
 * @param int $dst_height
 * @param int $src_width
 * @param int $src_height
 * @throws ImageException
 *
 */
function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void
{
    error_clear_last();
    $safeResult = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $dst_image
 * @param \GdImage $src_image
 * @param int $dst_x
 * @param int $dst_y
 * @param int $src_x
 * @param int $src_y
 * @param int $dst_width
 * @param int $dst_height
 * @param int $src_width
 * @param int $src_height
 * @throws ImageException
 *
 */
function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void
{
    error_clear_last();
    $safeResult = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param int $width
 * @param int $height
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreate(int $width, int $height): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreate($width, $height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromavif(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromavif($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefrombmp(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefrombmp($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromgd(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromgd($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromgd2(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromgd2($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param int $x
 * @param int $y
 * @param int $width
 * @param int $height
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromgd2part($filename, $x, $y, $width, $height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromgif(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromgif($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromjpeg(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromjpeg($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefrompng(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefrompng($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromstring(string $data): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromstring($data);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromtga(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromtga($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromwbmp(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromwbmp($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromwebp(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromwebp($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromxbm(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromxbm($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatefromxpm(string $filename): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatefromxpm($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $width
 * @param int $height
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecreatetruecolor(int $width, int $height): \GdImage
{
    error_clear_last();
    $safeResult = \imagecreatetruecolor($width, $height);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param array $rectangle
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecrop(\GdImage $image, array $rectangle): \GdImage
{
    error_clear_last();
    $safeResult = \imagecrop($image, $rectangle);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param int $mode
 * @param float $threshold
 * @param int $color
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagecropauto(\GdImage $image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1): \GdImage
{
    error_clear_last();
    $safeResult = \imagecropauto($image, $mode, $threshold, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param int $x1
 * @param int $y1
 * @param int $x2
 * @param int $y2
 * @param int $color
 * @throws ImageException
 *
 */
function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): void
{
    error_clear_last();
    $safeResult = \imagedashedline($image, $x1, $y1, $x2, $y2, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @throws ImageException
 *
 */
function imagedestroy(\GdImage $image): void
{
    error_clear_last();
    $safeResult = \imagedestroy($image);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $center_x
 * @param int $center_y
 * @param int $width
 * @param int $height
 * @param int $color
 * @throws ImageException
 *
 */
function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): void
{
    error_clear_last();
    $safeResult = \imageellipse($image, $center_x, $center_y, $width, $height, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x
 * @param int $y
 * @param int $color
 * @throws ImageException
 *
 */
function imagefill(\GdImage $image, int $x, int $y, int $color): void
{
    error_clear_last();
    $safeResult = \imagefill($image, $x, $y, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $center_x
 * @param int $center_y
 * @param int $width
 * @param int $height
 * @param int $start_angle
 * @param int $end_angle
 * @param int $color
 * @param int $style
 * @throws ImageException
 *
 */
function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): void
{
    error_clear_last();
    $safeResult = \imagefilledarc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color, $style);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $center_x
 * @param int $center_y
 * @param int $width
 * @param int $height
 * @param int $color
 * @throws ImageException
 *
 */
function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color): void
{
    error_clear_last();
    $safeResult = \imagefilledellipse($image, $center_x, $center_y, $width, $height, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x1
 * @param int $y1
 * @param int $x2
 * @param int $y2
 * @param int $color
 * @throws ImageException
 *
 */
function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): void
{
    error_clear_last();
    $safeResult = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x
 * @param int $y
 * @param int $border_color
 * @param int $color
 * @throws ImageException
 *
 */
function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, int $color): void
{
    error_clear_last();
    $safeResult = \imagefilltoborder($image, $x, $y, $border_color, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $filter
 * @param int $args
 * @throws ImageException
 *
 */
function imagefilter(\GdImage $image, int $filter, int ...$args): void
{
    error_clear_last();
    if ($args !== []) {
        $safeResult = \imagefilter($image, $filter, ...$args);
    } else {
        $safeResult = \imagefilter($image, $filter);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $mode
 * @throws ImageException
 *
 */
function imageflip(\GdImage $image, int $mode): void
{
    error_clear_last();
    $safeResult = \imageflip($image, $mode);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param float $size
 * @param float $angle
 * @param string $font_filename
 * @param string $string
 * @param array $options
 * @return array
 * @throws ImageException
 *
 */
function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array
{
    error_clear_last();
    $safeResult = \imageftbbox($size, $angle, $font_filename, $string, $options);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param float $size
 * @param float $angle
 * @param int $x
 * @param int $y
 * @param int $color
 * @param string $font_filename
 * @param string $text
 * @param array $options
 * @return array
 * @throws ImageException
 *
 */
function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array
{
    error_clear_last();
    $safeResult = \imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param float $input_gamma
 * @param float $output_gamma
 * @throws ImageException
 *
 */
function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_gamma): void
{
    error_clear_last();
    $safeResult = \imagegammacorrect($image, $input_gamma, $output_gamma);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @throws ImageException
 *
 */
function imagegd(\GdImage $image, $file = null): void
{
    error_clear_last();
    if ($file !== null) {
        $safeResult = \imagegd($image, $file);
    } else {
        $safeResult = \imagegd($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int $chunk_size
 * @param int $mode
 * @throws ImageException
 *
 */
function imagegd2(\GdImage $image, $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): void
{
    error_clear_last();
    if ($mode !== IMG_GD2_RAW) {
        $safeResult = \imagegd2($image, $file, $chunk_size, $mode);
    } elseif ($chunk_size !== 128) {
        $safeResult = \imagegd2($image, $file, $chunk_size);
    } elseif ($file !== null) {
        $safeResult = \imagegd2($image, $file);
    } else {
        $safeResult = \imagegd2($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @throws ImageException
 *
 */
function imagegif(\GdImage $image, $file = null): void
{
    error_clear_last();
    if ($file !== null) {
        $safeResult = \imagegif($image, $file);
    } else {
        $safeResult = \imagegif($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagegrabscreen(): \GdImage
{
    error_clear_last();
    $safeResult = \imagegrabscreen();
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $handle
 * @param bool $client_area
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagegrabwindow(int $handle, bool $client_area = false): \GdImage
{
    error_clear_last();
    $safeResult = \imagegrabwindow($handle, $client_area);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int $quality
 * @throws ImageException
 *
 */
function imagejpeg(\GdImage $image, $file = null, int $quality = -1): void
{
    error_clear_last();
    if ($quality !== -1) {
        $safeResult = \imagejpeg($image, $file, $quality);
    } elseif ($file !== null) {
        $safeResult = \imagejpeg($image, $file);
    } else {
        $safeResult = \imagejpeg($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $effect
 * @throws ImageException
 *
 */
function imagelayereffect(\GdImage $image, int $effect): void
{
    error_clear_last();
    $safeResult = \imagelayereffect($image, $effect);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x1
 * @param int $y1
 * @param int $x2
 * @param int $y2
 * @param int $color
 * @throws ImageException
 *
 */
function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): void
{
    error_clear_last();
    $safeResult = \imageline($image, $x1, $y1, $x2, $y2, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @return int
 * @throws ImageException
 *
 */
function imageloadfont(string $filename): int
{
    error_clear_last();
    $safeResult = \imageloadfont($filename);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int $quality
 * @param int $filters
 * @throws ImageException
 *
 */
function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters = -1): void
{
    error_clear_last();
    if ($filters !== -1) {
        $safeResult = \imagepng($image, $file, $quality, $filters);
    } elseif ($quality !== -1) {
        $safeResult = \imagepng($image, $file, $quality);
    } elseif ($file !== null) {
        $safeResult = \imagepng($image, $file);
    } else {
        $safeResult = \imagepng($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x1
 * @param int $y1
 * @param int $x2
 * @param int $y2
 * @param int $color
 * @throws ImageException
 *
 */
function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color): void
{
    error_clear_last();
    $safeResult = \imagerectangle($image, $x1, $y1, $x2, $y2, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int|null $resolution_x
 * @param int|null $resolution_y
 * @return mixed
 * @throws ImageException
 *
 */
function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null)
{
    error_clear_last();
    if ($resolution_y !== null) {
        $safeResult = \imageresolution($image, $resolution_x, $resolution_y);
    } elseif ($resolution_x !== null) {
        $safeResult = \imageresolution($image, $resolution_x);
    } else {
        $safeResult = \imageresolution($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param float $angle
 * @param int $background_color
 * @param bool $ignore_transparent
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagerotate(\GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false): \GdImage
{
    error_clear_last();
    $safeResult = \imagerotate($image, $angle, $background_color, $ignore_transparent);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param bool $enable
 * @throws ImageException
 *
 */
function imagesavealpha(\GdImage $image, bool $enable): void
{
    error_clear_last();
    $safeResult = \imagesavealpha($image, $enable);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $width
 * @param int $height
 * @param int $mode
 * @return \GdImage
 * @throws ImageException
 *
 */
function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED): \GdImage
{
    error_clear_last();
    $safeResult = \imagescale($image, $width, $height, $mode);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param \GdImage $brush
 * @throws ImageException
 *
 */
function imagesetbrush(\GdImage $image, \GdImage $brush): void
{
    error_clear_last();
    $safeResult = \imagesetbrush($image, $brush);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x1
 * @param int $y1
 * @param int $x2
 * @param int $y2
 * @throws ImageException
 *
 */
function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2): void
{
    error_clear_last();
    $safeResult = \imagesetclip($image, $x1, $y1, $x2, $y2);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $method
 * @throws ImageException
 *
 */
function imagesetinterpolation(\GdImage $image, int $method = IMG_BILINEAR_FIXED): void
{
    error_clear_last();
    $safeResult = \imagesetinterpolation($image, $method);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $x
 * @param int $y
 * @param int $color
 * @throws ImageException
 *
 */
function imagesetpixel(\GdImage $image, int $x, int $y, int $color): void
{
    error_clear_last();
    $safeResult = \imagesetpixel($image, $x, $y, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param array $style
 * @throws ImageException
 *
 */
function imagesetstyle(\GdImage $image, array $style): void
{
    error_clear_last();
    $safeResult = \imagesetstyle($image, $style);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $thickness
 * @throws ImageException
 *
 */
function imagesetthickness(\GdImage $image, int $thickness): void
{
    error_clear_last();
    $safeResult = \imagesetthickness($image, $thickness);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param \GdImage $tile
 * @throws ImageException
 *
 */
function imagesettile(\GdImage $image, \GdImage $tile): void
{
    error_clear_last();
    $safeResult = \imagesettile($image, $tile);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $font
 * @param int $x
 * @param int $y
 * @param string $string
 * @param int $color
 * @throws ImageException
 *
 */
function imagestring(\GdImage $image, int $font, int $x, int $y, string $string, int $color): void
{
    error_clear_last();
    $safeResult = \imagestring($image, $font, $x, $y, $string, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param int $font
 * @param int $x
 * @param int $y
 * @param string $string
 * @param int $color
 * @throws ImageException
 *
 */
function imagestringup(\GdImage $image, int $font, int $x, int $y, string $string, int $color): void
{
    error_clear_last();
    $safeResult = \imagestringup($image, $font, $x, $y, $string, $color);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @return int
 * @throws ImageException
 *
 */
function imagesx(\GdImage $image): int
{
    error_clear_last();
    $safeResult = \imagesx($image);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @return int
 * @throws ImageException
 *
 */
function imagesy(\GdImage $image): int
{
    error_clear_last();
    $safeResult = \imagesy($image);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param bool $dither
 * @param int $num_colors
 * @throws ImageException
 *
 */
function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors): void
{
    error_clear_last();
    $safeResult = \imagetruecolortopalette($image, $dither, $num_colors);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param float $size
 * @param float $angle
 * @param string $font_filename
 * @param string $string
 * @param array $options
 * @return array
 * @throws ImageException
 *
 */
function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array
{
    error_clear_last();
    $safeResult = \imagettfbbox($size, $angle, $font_filename, $string, $options);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param float $size
 * @param float $angle
 * @param int $x
 * @param int $y
 * @param int $color
 * @param string $font_filename
 * @param string $text
 * @param array $options
 * @return array
 * @throws ImageException
 *
 */
function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array
{
    error_clear_last();
    $safeResult = \imagettftext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int|null $foreground_color
 * @throws ImageException
 *
 */
function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null): void
{
    error_clear_last();
    if ($foreground_color !== null) {
        $safeResult = \imagewbmp($image, $file, $foreground_color);
    } elseif ($file !== null) {
        $safeResult = \imagewbmp($image, $file);
    } else {
        $safeResult = \imagewbmp($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $file
 * @param int $quality
 * @throws ImageException
 *
 */
function imagewebp(\GdImage $image, $file = null, int $quality = -1): void
{
    error_clear_last();
    if ($quality !== -1) {
        $safeResult = \imagewebp($image, $file, $quality);
    } elseif ($file !== null) {
        $safeResult = \imagewebp($image, $file);
    } else {
        $safeResult = \imagewebp($image);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param \GdImage $image
 * @param null|resource|string $filename
 * @param int|null $foreground_color
 * @throws ImageException
 *
 */
function imagexbm(\GdImage $image, $filename, ?int $foreground_color = null): void
{
    error_clear_last();
    if ($foreground_color !== null) {
        $safeResult = \imagexbm($image, $filename, $foreground_color);
    } else {
        $safeResult = \imagexbm($image, $filename);
    }
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
}


/**
 * @param string $iptc_data
 * @param string $filename
 * @param int $spool
 * @return bool|string
 * @throws ImageException
 *
 */
function iptcembed(string $iptc_data, string $filename, int $spool = 0)
{
    error_clear_last();
    $safeResult = \iptcembed($iptc_data, $filename, $spool);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $iptc_block
 * @return array
 * @throws ImageException
 *
 */
function iptcparse(string $iptc_block): array
{
    error_clear_last();
    $safeResult = \iptcparse($iptc_block);
    if ($safeResult === false) {
        throw ImageException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! E62  2    curl.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\CurlException;

/**
 * @param \CurlHandle $handle
 * @return \CurlHandle
 * @throws CurlException
 *
 */
function curl_copy_handle(\CurlHandle $handle): \CurlHandle
{
    error_clear_last();
    $safeResult = \curl_copy_handle($handle);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
    return $safeResult;
}


/**
 * @param \CurlHandle $handle
 * @param string $string
 * @return string
 * @throws CurlException
 *
 */
function curl_escape(\CurlHandle $handle, string $string): string
{
    error_clear_last();
    $safeResult = \curl_escape($handle, $string);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
    return $safeResult;
}


/**
 * @param \CurlHandle $handle
 * @return bool|string
 * @throws CurlException
 *
 */
function curl_exec(\CurlHandle $handle)
{
    error_clear_last();
    $safeResult = \curl_exec($handle);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
    return $safeResult;
}


/**
 * @param \CurlHandle $handle
 * @param int|null $option
 * @return mixed
 * @throws CurlException
 *
 */
function curl_getinfo(\CurlHandle $handle, ?int $option = null)
{
    error_clear_last();
    if ($option !== null) {
        $safeResult = \curl_getinfo($handle, $option);
    } else {
        $safeResult = \curl_getinfo($handle);
    }
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
    return $safeResult;
}


/**
 * @param null|string $url
 * @return \CurlHandle
 * @throws CurlException
 *
 */
function curl_init(?string $url = null): \CurlHandle
{
    error_clear_last();
    if ($url !== null) {
        $safeResult = \curl_init($url);
    } else {
        $safeResult = \curl_init();
    }
    if ($safeResult === false) {
        throw CurlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \CurlMultiHandle $multi_handle
 * @param int|null $queued_messages
 * @return array
 * @throws CurlException
 *
 */
function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array
{
    error_clear_last();
    $safeResult = \curl_multi_info_read($multi_handle, $queued_messages);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($multi_handle);
    }
    return $safeResult;
}


/**
 * @return \CurlMultiHandle
 * @throws CurlException
 *
 */
function curl_multi_init(): \CurlMultiHandle
{
    error_clear_last();
    $safeResult = \curl_multi_init();
    if ($safeResult === false) {
        throw CurlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \CurlMultiHandle $multi_handle
 * @param int $option
 * @param mixed $value
 * @throws CurlException
 *
 */
function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void
{
    error_clear_last();
    $safeResult = \curl_multi_setopt($multi_handle, $option, $value);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($multi_handle);
    }
}


/**
 * @param \CurlHandle $handle
 * @param int $option
 * @param mixed $value
 * @throws CurlException
 *
 */
function curl_setopt(\CurlHandle $handle, int $option, $value): void
{
    error_clear_last();
    $safeResult = \curl_setopt($handle, $option, $value);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
}


/**
 * @param \CurlShareHandle $share_handle
 * @return int
 * @throws CurlException
 *
 */
function curl_share_errno(\CurlShareHandle $share_handle): int
{
    error_clear_last();
    $safeResult = \curl_share_errno($share_handle);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($share_handle);
    }
    return $safeResult;
}


/**
 * @param \CurlShareHandle $share_handle
 * @param int $option
 * @param mixed $value
 * @throws CurlException
 *
 */
function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): void
{
    error_clear_last();
    $safeResult = \curl_share_setopt($share_handle, $option, $value);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($share_handle);
    }
}


/**
 * @param \CurlHandle $handle
 * @param string $string
 * @return string
 * @throws CurlException
 *
 */
function curl_unescape(\CurlHandle $handle, string $string): string
{
    error_clear_last();
    $safeResult = \curl_unescape($handle, $string);
    if ($safeResult === false) {
        throw CurlException::createFromPhpError($handle);
    }
    return $safeResult;
}
PK       ! r*Z  Z    apcu.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ApcuException;

/**
 * @param bool $limited
 * @return array
 * @throws ApcuException
 *
 */
function apcu_cache_info(bool $limited = false): array
{
    error_clear_last();
    $safeResult = \apcu_cache_info($limited);
    if ($safeResult === false) {
        throw ApcuException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $key
 * @param int $old
 * @param int $new
 * @throws ApcuException
 *
 */
function apcu_cas(string $key, int $old, int $new): void
{
    error_clear_last();
    $safeResult = \apcu_cas($key, $old, $new);
    if ($safeResult === false) {
        throw ApcuException::createFromPhpError();
    }
}


/**
 * @param string $key
 * @param int $step
 * @param bool|null $success
 * @param int $ttl
 * @return int
 * @throws ApcuException
 *
 */
function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int
{
    error_clear_last();
    $safeResult = \apcu_dec($key, $step, $success, $ttl);
    if ($safeResult === false) {
        throw ApcuException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $key
 * @param int $step
 * @param bool|null $success
 * @param int $ttl
 * @return int
 * @throws ApcuException
 *
 */
function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int
{
    error_clear_last();
    $safeResult = \apcu_inc($key, $step, $success, $ttl);
    if ($safeResult === false) {
        throw ApcuException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param bool $limited
 * @return array
 * @throws ApcuException
 *
 */
function apcu_sma_info(bool $limited = false): array
{
    error_clear_last();
    $safeResult = \apcu_sma_info($limited);
    if ($safeResult === false) {
        throw ApcuException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! [$[!  !    zlib.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ZlibException;

/**
 * @param \DeflateContext $context
 * @param string $data
 * @param int $flush_mode
 * @return string
 * @throws ZlibException
 *
 */
function deflate_add(\DeflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string
{
    error_clear_last();
    $safeResult = \deflate_add($context, $data, $flush_mode);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $encoding
 * @param array $options
 * @return \DeflateContext
 * @throws ZlibException
 *
 */
function deflate_init(int $encoding, array $options = []): \DeflateContext
{
    error_clear_last();
    $safeResult = \deflate_init($encoding, $options);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @throws ZlibException
 *
 */
function gzclose($stream): void
{
    error_clear_last();
    $safeResult = \gzclose($stream);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param int $level
 * @param int $encoding
 * @return string
 * @throws ZlibException
 *
 */
function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string
{
    error_clear_last();
    $safeResult = \gzcompress($data, $level, $encoding);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $max_length
 * @return string
 * @throws ZlibException
 *
 */
function gzdecode(string $data, int $max_length = 0): string
{
    error_clear_last();
    $safeResult = \gzdecode($data, $max_length);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $level
 * @param int $encoding
 * @return string
 * @throws ZlibException
 *
 */
function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string
{
    error_clear_last();
    $safeResult = \gzdeflate($data, $level, $encoding);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $level
 * @param int $encoding
 * @return string
 * @throws ZlibException
 *
 */
function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string
{
    error_clear_last();
    $safeResult = \gzencode($data, $level, $encoding);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param  $use_include_path
 * @return list
 * @throws ZlibException
 *
 */
function gzfile(string $filename, $use_include_path = 0): array
{
    error_clear_last();
    $safeResult = \gzfile($filename, $use_include_path);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param int|null $length
 * @return string
 * @throws ZlibException
 *
 */
function gzgets($stream, ?int $length = null): string
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \gzgets($stream, $length);
    } else {
        $safeResult = \gzgets($stream);
    }
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $max_length
 * @return string
 * @throws ZlibException
 *
 */
function gzinflate(string $data, int $max_length = 0): string
{
    error_clear_last();
    $safeResult = \gzinflate($data, $max_length);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param string $mode
 * @param  $use_include_path
 * @return resource
 * @throws ZlibException
 *
 */
function gzopen(string $filename, string $mode, $use_include_path = 0)
{
    error_clear_last();
    $safeResult = \gzopen($filename, $mode, $use_include_path);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @return int
 * @throws ZlibException
 *
 */
function gzpassthru($stream): int
{
    error_clear_last();
    $safeResult = \gzpassthru($stream);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param int $length
 * @return string
 * @throws ZlibException
 *
 */
function gzread($stream, int $length): string
{
    error_clear_last();
    $safeResult = \gzread($stream, $length);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @throws ZlibException
 *
 */
function gzrewind($stream): void
{
    error_clear_last();
    $safeResult = \gzrewind($stream);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @return int
 * @throws ZlibException
 *
 */
function gztell($stream): int
{
    error_clear_last();
    $safeResult = \gztell($stream);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $max_length
 * @return string
 * @throws ZlibException
 *
 */
function gzuncompress(string $data, int $max_length = 0): string
{
    error_clear_last();
    $safeResult = \gzuncompress($data, $max_length);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param string $data
 * @param int|null $length
 * @return int
 * @throws ZlibException
 *
 */
function gzwrite($stream, string $data, ?int $length = null): int
{
    error_clear_last();
    if ($length !== null) {
        $safeResult = \gzwrite($stream, $data, $length);
    } else {
        $safeResult = \gzwrite($stream, $data);
    }
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \InflateContext $context
 * @return int
 * @throws ZlibException
 *
 */
function inflate_get_read_len(\InflateContext $context): int
{
    error_clear_last();
    $safeResult = \inflate_get_read_len($context);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \InflateContext $context
 * @return int
 * @throws ZlibException
 *
 */
function inflate_get_status(\InflateContext $context): int
{
    error_clear_last();
    $safeResult = \inflate_get_status($context);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \InflateContext $context
 * @param string $data
 * @param int $flush_mode
 * @return string
 * @throws ZlibException
 *
 */
function inflate_add(\InflateContext $context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string
{
    error_clear_last();
    $safeResult = \inflate_add($context, $data, $flush_mode);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $encoding
 * @param array $options
 * @return \InflateContext
 * @throws ZlibException
 *
 */
function inflate_init(int $encoding, array $options = []): \InflateContext
{
    error_clear_last();
    $safeResult = \inflate_init($encoding, $options);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param  $use_include_path
 * @return 0|positive-int
 * @throws ZlibException
 *
 */
function readgzfile(string $filename, $use_include_path = 0): int
{
    error_clear_last();
    $safeResult = \readgzfile($filename, $use_include_path);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param int $max_length
 * @return string
 * @throws ZlibException
 *
 */
function zlib_decode(string $data, int $max_length = 0): string
{
    error_clear_last();
    $safeResult = \zlib_decode($data, $max_length);
    if ($safeResult === false) {
        throw ZlibException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! ` iUq  Uq    openssl.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\OpensslException;

/**
 * @param string $cipher_algo
 * @return int
 * @throws OpensslException
 *
 */
function openssl_cipher_iv_length(string $cipher_algo): int
{
    error_clear_last();
    $safeResult = \openssl_cipher_iv_length($cipher_algo);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|string $certificate
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key
 * @param int $encoding
 * @throws OpensslException
 *
 */
function openssl_cms_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null, int $encoding = OPENSSL_ENCODING_SMIME): void
{
    error_clear_last();
    if ($encoding !== OPENSSL_ENCODING_SMIME) {
        $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key, $encoding);
    } elseif ($private_key !== null) {
        $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key);
    } else {
        $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|array|string $certificate
 * @param array|null $headers
 * @param int $flags
 * @param int $encoding
 * @param int $cipher_algo
 * @throws OpensslException
 *
 */
function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_RC2_40): void
{
    error_clear_last();
    $safeResult = \openssl_cms_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $encoding, $cipher_algo);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param array $certificates
 * @throws OpensslException
 *
 */
function openssl_cms_read(string $input_filename, array &$certificates): void
{
    error_clear_last();
    $safeResult = \openssl_cms_read($input_filename, $certificates);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|string $certificate
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param array|null $headers
 * @param int $flags
 * @param int $encoding
 * @param null|string $untrusted_certificates_filename
 * @throws OpensslException
 *
 */
function openssl_cms_sign(string $input_filename, string $output_filename, $certificate, $private_key, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $untrusted_certificates_filename = null): void
{
    error_clear_last();
    if ($untrusted_certificates_filename !== null) {
        $safeResult = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding, $untrusted_certificates_filename);
    } else {
        $safeResult = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param int $flags
 * @param null|string $certificates
 * @param array $ca_info
 * @param null|string $untrusted_certificates_filename
 * @param null|string $content
 * @param null|string $pk7
 * @param null|string $sigfile
 * @param int $encoding
 * @throws OpensslException
 *
 */
function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $certificates = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME): void
{
    error_clear_last();
    if ($encoding !== OPENSSL_ENCODING_SMIME) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile, $encoding);
    } elseif ($sigfile !== null) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile);
    } elseif ($pk7 !== null) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7);
    } elseif ($content !== null) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content);
    } elseif ($untrusted_certificates_filename !== null) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename);
    } elseif ($ca_info !== []) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info);
    } elseif ($certificates !== null) {
        $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates);
    } else {
        $safeResult = \openssl_cms_verify($input_filename, $flags);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificateSigningRequest|string $csr
 * @param string $output_filename
 * @param bool $no_text
 * @throws OpensslException
 *
 */
function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text = true): void
{
    error_clear_last();
    $safeResult = \openssl_csr_export_to_file($csr, $output_filename, $no_text);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificateSigningRequest|string $csr
 * @param null|string $output
 * @param bool $no_text
 * @throws OpensslException
 *
 */
function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void
{
    error_clear_last();
    $safeResult = \openssl_csr_export($csr, $output, $no_text);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificateSigningRequest|string $csr
 * @param bool $short_names
 * @return \OpenSSLAsymmetricKey
 * @throws OpensslException
 *
 */
function openssl_csr_get_public_key($csr, bool $short_names = true): \OpenSSLAsymmetricKey
{
    error_clear_last();
    $safeResult = \openssl_csr_get_public_key($csr, $short_names);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificateSigningRequest|string $csr
 * @param bool $short_names
 * @return array
 * @throws OpensslException
 *
 */
function openssl_csr_get_subject($csr, bool $short_names = true): array
{
    error_clear_last();
    $safeResult = \openssl_csr_get_subject($csr, $short_names);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $distinguished_names
 * @param \OpenSSLAsymmetricKey $private_key
 * @param array|null $options
 * @param array|null $extra_attributes
 * @return \OpenSSLCertificateSigningRequest
 * @throws OpensslException
 *
 */
function openssl_csr_new(array $distinguished_names, \OpenSSLAsymmetricKey &$private_key, ?array $options = null, ?array $extra_attributes = null): \OpenSSLCertificateSigningRequest
{
    error_clear_last();
    if ($extra_attributes !== null) {
        $safeResult = \openssl_csr_new($distinguished_names, $private_key, $options, $extra_attributes);
    } elseif ($options !== null) {
        $safeResult = \openssl_csr_new($distinguished_names, $private_key, $options);
    } else {
        $safeResult = \openssl_csr_new($distinguished_names, $private_key);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificateSigningRequest|string $csr
 * @param \OpenSSLCertificate|null|string $ca_certificate
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param int $days
 * @param array|null $options
 * @param int $serial
 * @return \OpenSSLCertificate
 * @throws OpensslException
 *
 */
function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, ?array $options = null, int $serial = 0): \OpenSSLCertificate
{
    error_clear_last();
    if ($serial !== 0) {
        $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options, $serial);
    } elseif ($options !== null) {
        $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options);
    } else {
        $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param string $cipher_algo
 * @param string $passphrase
 * @param int $options
 * @param string $iv
 * @param string $tag
 * @param string $aad
 * @return string
 * @throws OpensslException
 *
 */
function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string
{
    error_clear_last();
    $safeResult = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag, $aad);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $public_key
 * @param \OpenSSLAsymmetricKey $private_key
 * @return string
 * @throws OpensslException
 *
 */
function openssl_dh_compute_key(string $public_key, \OpenSSLAsymmetricKey $private_key): string
{
    error_clear_last();
    $safeResult = \openssl_dh_compute_key($public_key, $private_key);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param string $digest_algo
 * @param bool $binary
 * @return string
 * @throws OpensslException
 *
 */
function openssl_digest(string $data, string $digest_algo, bool $binary = false): string
{
    error_clear_last();
    $safeResult = \openssl_digest($data, $digest_algo, $binary);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return list
 * @throws OpensslException
 *
 */
function openssl_get_curve_names(): array
{
    error_clear_last();
    $safeResult = \openssl_get_curve_names();
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param null|string $output
 * @param string $encrypted_key
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param string $cipher_algo
 * @param null|string $iv
 * @throws OpensslException
 *
 */
function openssl_open(string $data, ?string &$output, string $encrypted_key, $private_key, string $cipher_algo, ?string $iv = null): void
{
    error_clear_last();
    if ($iv !== null) {
        $safeResult = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo, $iv);
    } else {
        $safeResult = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $password
 * @param string $salt
 * @param int $key_length
 * @param int $iterations
 * @param string $digest_algo
 * @return string
 * @throws OpensslException
 *
 */
function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string
{
    error_clear_last();
    $safeResult = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algo);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param string $output_filename
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param string $passphrase
 * @param array $options
 * @throws OpensslException
 *
 */
function openssl_pkcs12_export_to_file($certificate, string $output_filename, $private_key, string $passphrase, array $options = []): void
{
    error_clear_last();
    $safeResult = \openssl_pkcs12_export_to_file($certificate, $output_filename, $private_key, $passphrase, $options);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param null|string $output
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param string $passphrase
 * @param array $options
 * @throws OpensslException
 *
 */
function openssl_pkcs12_export($certificate, ?string &$output, $private_key, string $passphrase, array $options = []): void
{
    error_clear_last();
    $safeResult = \openssl_pkcs12_export($certificate, $output, $private_key, $passphrase, $options);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $pkcs12
 * @param array|null $certificates
 * @param string $passphrase
 * @throws OpensslException
 *
 */
function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $passphrase): void
{
    error_clear_last();
    $safeResult = \openssl_pkcs12_read($pkcs12, $certificates, $passphrase);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|string $certificate
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|null|string $private_key
 * @throws OpensslException
 *
 */
function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null): void
{
    error_clear_last();
    if ($private_key !== null) {
        $safeResult = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate, $private_key);
    } else {
        $safeResult = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|array|string $certificate
 * @param array $headers
 * @param int $flags
 * @param int $cipher_algo
 * @throws OpensslException
 *
 */
function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_RC2_40): void
{
    error_clear_last();
    $safeResult = \openssl_pkcs7_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $cipher_algo);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param array|null $certificates
 * @throws OpensslException
 *
 */
function openssl_pkcs7_read(string $data, ?array &$certificates): void
{
    error_clear_last();
    $safeResult = \openssl_pkcs7_read($data, $certificates);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $input_filename
 * @param string $output_filename
 * @param \OpenSSLCertificate|string $certificate
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param array $headers
 * @param int $flags
 * @param null|string $untrusted_certificates_filename
 * @throws OpensslException
 *
 */
function openssl_pkcs7_sign(string $input_filename, string $output_filename, $certificate, $private_key, array $headers, int $flags = PKCS7_DETACHED, ?string $untrusted_certificates_filename = null): void
{
    error_clear_last();
    if ($untrusted_certificates_filename !== null) {
        $safeResult = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $untrusted_certificates_filename);
    } else {
        $safeResult = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param int $key_length
 * @return string
 * @throws OpensslException
 *
 */
function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): string
{
    error_clear_last();
    $safeResult = \openssl_pkey_derive($public_key, $private_key, $key_length);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key
 * @param string $output_filename
 * @param null|string $passphrase
 * @param array|null $options
 * @throws OpensslException
 *
 */
function openssl_pkey_export_to_file($key, string $output_filename, ?string $passphrase = null, ?array $options = null): void
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \openssl_pkey_export_to_file($key, $output_filename, $passphrase, $options);
    } elseif ($passphrase !== null) {
        $safeResult = \openssl_pkey_export_to_file($key, $output_filename, $passphrase);
    } else {
        $safeResult = \openssl_pkey_export_to_file($key, $output_filename);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $key
 * @param null|string $output
 * @param null|string $passphrase
 * @param array|null $options
 * @throws OpensslException
 *
 */
function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, ?array $options = null): void
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \openssl_pkey_export($key, $output, $passphrase, $options);
    } elseif ($passphrase !== null) {
        $safeResult = \openssl_pkey_export($key, $output, $passphrase);
    } else {
        $safeResult = \openssl_pkey_export($key, $output);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLAsymmetricKey $key
 * @return array
 * @throws OpensslException
 *
 */
function openssl_pkey_get_details(\OpenSSLAsymmetricKey $key): array
{
    error_clear_last();
    $safeResult = \openssl_pkey_get_details($key);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param null|string $passphrase
 * @return \OpenSSLAsymmetricKey
 * @throws OpensslException
 *
 */
function openssl_pkey_get_private($private_key, ?string $passphrase = null): \OpenSSLAsymmetricKey
{
    error_clear_last();
    if ($passphrase !== null) {
        $safeResult = \openssl_pkey_get_private($private_key, $passphrase);
    } else {
        $safeResult = \openssl_pkey_get_private($private_key);
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key
 * @return \OpenSSLAsymmetricKey
 * @throws OpensslException
 *
 */
function openssl_pkey_get_public($public_key): \OpenSSLAsymmetricKey
{
    error_clear_last();
    $safeResult = \openssl_pkey_get_public($public_key);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array|null $options
 * @return \OpenSSLAsymmetricKey
 * @throws OpensslException
 *
 */
function openssl_pkey_new(?array $options = null): \OpenSSLAsymmetricKey
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \openssl_pkey_new($options);
    } else {
        $safeResult = \openssl_pkey_new();
    }
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param null|string $decrypted_data
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param int $padding
 * @throws OpensslException
 *
 */
function openssl_private_decrypt(string $data, ?string &$decrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
    error_clear_last();
    $safeResult = \openssl_private_decrypt($data, $decrypted_data, $private_key, $padding);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param null|string $encrypted_data
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param int $padding
 * @throws OpensslException
 *
 */
function openssl_private_encrypt(string $data, ?string &$encrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
    error_clear_last();
    $safeResult = \openssl_private_encrypt($data, $encrypted_data, $private_key, $padding);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param null|string $decrypted_data
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key
 * @param int $padding
 * @throws OpensslException
 *
 */
function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
    error_clear_last();
    $safeResult = \openssl_public_decrypt($data, $decrypted_data, $public_key, $padding);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param null|string $encrypted_data
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key
 * @param int $padding
 * @throws OpensslException
 *
 */
function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void
{
    error_clear_last();
    $safeResult = \openssl_public_encrypt($data, $encrypted_data, $public_key, $padding);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param int $length
 * @param bool|null $strong_result
 * @return string
 * @throws OpensslException
 *
 */
function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): string
{
    error_clear_last();
    $safeResult = \openssl_random_pseudo_bytes($length, $strong_result);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param null|string $sealed_data
 * @param array|null $encrypted_keys
 * @param array $public_key
 * @param string $cipher_algo
 * @param null|string $iv
 * @return int
 * @throws OpensslException
 *
 */
function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_keys, array $public_key, string $cipher_algo, ?string &$iv = null): int
{
    error_clear_last();
    $safeResult = \openssl_seal($data, $sealed_data, $encrypted_keys, $public_key, $cipher_algo, $iv);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $data
 * @param null|string $signature
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key
 * @param int|string $algorithm
 * @throws OpensslException
 *
 */
function openssl_sign(string $data, ?string &$signature, $private_key, $algorithm = OPENSSL_ALGO_SHA1): void
{
    error_clear_last();
    $safeResult = \openssl_sign($data, $signature, $private_key, $algorithm);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $spki
 * @return null|string
 * @throws OpensslException
 *
 */
function openssl_spki_export_challenge(string $spki): ?string
{
    error_clear_last();
    $safeResult = \openssl_spki_export_challenge($spki);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $spki
 * @return null|string
 * @throws OpensslException
 *
 */
function openssl_spki_export(string $spki): ?string
{
    error_clear_last();
    $safeResult = \openssl_spki_export($spki);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLAsymmetricKey $private_key
 * @param string $challenge
 * @param int $digest_algo
 * @return null|string
 * @throws OpensslException
 *
 */
function openssl_spki_new(\OpenSSLAsymmetricKey $private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5): ?string
{
    error_clear_last();
    $safeResult = \openssl_spki_new($private_key, $challenge, $digest_algo);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $spki
 * @throws OpensslException
 *
 */
function openssl_spki_verify(string $spki): void
{
    error_clear_last();
    $safeResult = \openssl_spki_verify($spki);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param string $data
 * @param string $signature
 * @param \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $public_key
 * @param int|string $algorithm
 * @return -1|0|1
 * @throws OpensslException
 *
 */
function openssl_verify(string $data, string $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1): int
{
    error_clear_last();
    $safeResult = \openssl_verify($data, $signature, $public_key, $algorithm);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param int $purpose
 * @param array $ca_info
 * @param null|string $untrusted_certificates_file
 * @return bool|int
 * @throws OpensslException
 *
 */
function openssl_x509_checkpurpose($certificate, int $purpose, array $ca_info = [], ?string $untrusted_certificates_file = null)
{
    error_clear_last();
    if ($untrusted_certificates_file !== null) {
        $safeResult = \openssl_x509_checkpurpose($certificate, $purpose, $ca_info, $untrusted_certificates_file);
    } else {
        $safeResult = \openssl_x509_checkpurpose($certificate, $purpose, $ca_info);
    }
    if ($safeResult === -1) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param string $output_filename
 * @param bool $no_text
 * @throws OpensslException
 *
 */
function openssl_x509_export_to_file($certificate, string $output_filename, bool $no_text = true): void
{
    error_clear_last();
    $safeResult = \openssl_x509_export_to_file($certificate, $output_filename, $no_text);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param null|string $output
 * @param bool $no_text
 * @throws OpensslException
 *
 */
function openssl_x509_export($certificate, ?string &$output, bool $no_text = true): void
{
    error_clear_last();
    $safeResult = \openssl_x509_export($certificate, $output, $no_text);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @param string $digest_algo
 * @param bool $binary
 * @return string
 * @throws OpensslException
 *
 */
function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bool $binary = false): string
{
    error_clear_last();
    $safeResult = \openssl_x509_fingerprint($certificate, $digest_algo, $binary);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \OpenSSLCertificate|string $certificate
 * @return \OpenSSLCertificate
 * @throws OpensslException
 *
 */
function openssl_x509_read($certificate): \OpenSSLCertificate
{
    error_clear_last();
    $safeResult = \openssl_x509_read($certificate);
    if ($safeResult === false) {
        throw OpensslException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! )ZOs  s  
  ssdeep.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SsdeepException;

/**
 * @param string $signature1
 * @param string $signature2
 * @return int
 * @throws SsdeepException
 *
 */
function ssdeep_fuzzy_compare(string $signature1, string $signature2): int
{
    error_clear_last();
    $safeResult = \ssdeep_fuzzy_compare($signature1, $signature2);
    if ($safeResult === false) {
        throw SsdeepException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $file_name
 * @return string
 * @throws SsdeepException
 *
 */
function ssdeep_fuzzy_hash_filename(string $file_name): string
{
    error_clear_last();
    $safeResult = \ssdeep_fuzzy_hash_filename($file_name);
    if ($safeResult === false) {
        throw SsdeepException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $to_hash
 * @return string
 * @throws SsdeepException
 *
 */
function ssdeep_fuzzy_hash(string $to_hash): string
{
    error_clear_last();
    $safeResult = \ssdeep_fuzzy_hash($to_hash);
    if ($safeResult === false) {
        throw SsdeepException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! @Ze  e    sem.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SemException;

/**
 * @param int $key
 * @param int $permissions
 * @return \SysvMessageQueue
 * @throws SemException
 *
 */
function msg_get_queue(int $key, int $permissions = 0666): \SysvMessageQueue
{
    error_clear_last();
    $safeResult = \msg_get_queue($key, $permissions);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $key
 * @throws SemException
 *
 */
function msg_queue_exists(int $key): void
{
    error_clear_last();
    $safeResult = \msg_queue_exists($key);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvMessageQueue $queue
 * @param int $desired_message_type
 * @param int|null $received_message_type
 * @param int $max_message_size
 * @param mixed $message
 * @param bool $unserialize
 * @param int $flags
 * @param int|null $error_code
 * @throws SemException
 *
 */
function msg_receive(\SysvMessageQueue $queue, int $desired_message_type, ?int &$received_message_type, int $max_message_size, &$message, bool $unserialize = true, int $flags = 0, ?int &$error_code = null): void
{
    error_clear_last();
    $safeResult = \msg_receive($queue, $desired_message_type, $received_message_type, $max_message_size, $message, $unserialize, $flags, $error_code);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvMessageQueue $queue
 * @throws SemException
 *
 */
function msg_remove_queue(\SysvMessageQueue $queue): void
{
    error_clear_last();
    $safeResult = \msg_remove_queue($queue);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvMessageQueue $queue
 * @param int $message_type
 * @param mixed $message
 * @param bool $serialize
 * @param bool $blocking
 * @param int|null $error_code
 * @throws SemException
 *
 */
function msg_send(\SysvMessageQueue $queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, ?int &$error_code = null): void
{
    error_clear_last();
    $safeResult = \msg_send($queue, $message_type, $message, $serialize, $blocking, $error_code);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvMessageQueue $queue
 * @param array $data
 * @throws SemException
 *
 */
function msg_set_queue(\SysvMessageQueue $queue, array $data): void
{
    error_clear_last();
    $safeResult = \msg_set_queue($queue, $data);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvMessageQueue $queue
 * @return array
 * @throws SemException
 *
 */
function msg_stat_queue(\SysvMessageQueue $queue): array
{
    error_clear_last();
    $safeResult = \msg_stat_queue($queue);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \SysvSemaphore $semaphore
 * @param bool $non_blocking
 * @throws SemException
 *
 */
function sem_acquire(\SysvSemaphore $semaphore, bool $non_blocking = false): void
{
    error_clear_last();
    $safeResult = \sem_acquire($semaphore, $non_blocking);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param int $key
 * @param int $max_acquire
 * @param int $permissions
 * @param bool $auto_release
 * @return \SysvSemaphore
 * @throws SemException
 *
 */
function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $auto_release = true): \SysvSemaphore
{
    error_clear_last();
    $safeResult = \sem_get($key, $max_acquire, $permissions, $auto_release);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \SysvSemaphore $semaphore
 * @throws SemException
 *
 */
function sem_release(\SysvSemaphore $semaphore): void
{
    error_clear_last();
    $safeResult = \sem_release($semaphore);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvSemaphore $semaphore
 * @throws SemException
 *
 */
function sem_remove(\SysvSemaphore $semaphore): void
{
    error_clear_last();
    $safeResult = \sem_remove($semaphore);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param int $key
 * @param int|null $size
 * @param int $permissions
 * @return \SysvSharedMemory
 * @throws SemException
 *
 */
function shm_attach(int $key, ?int $size = null, int $permissions = 0666): \SysvSharedMemory
{
    error_clear_last();
    if ($permissions !== 0666) {
        $safeResult = \shm_attach($key, $size, $permissions);
    } elseif ($size !== null) {
        $safeResult = \shm_attach($key, $size);
    } else {
        $safeResult = \shm_attach($key);
    }
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param \SysvSharedMemory $shm
 * @throws SemException
 *
 */
function shm_detach(\SysvSharedMemory $shm): void
{
    error_clear_last();
    $safeResult = \shm_detach($shm);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvSharedMemory $shm
 * @param int $key
 * @param mixed $value
 * @throws SemException
 *
 */
function shm_put_var(\SysvSharedMemory $shm, int $key, $value): void
{
    error_clear_last();
    $safeResult = \shm_put_var($shm, $key, $value);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvSharedMemory $shm
 * @param int $key
 * @throws SemException
 *
 */
function shm_remove_var(\SysvSharedMemory $shm, int $key): void
{
    error_clear_last();
    $safeResult = \shm_remove_var($shm, $key);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}


/**
 * @param \SysvSharedMemory $shm
 * @throws SemException
 *
 */
function shm_remove(\SysvSharedMemory $shm): void
{
    error_clear_last();
    $safeResult = \shm_remove($shm);
    if ($safeResult === false) {
        throw SemException::createFromPhpError();
    }
}
PK       ! 9FZI  I    eio.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\EioException;

/**
 * @param int $delay
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_busy($delay, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $mode
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_chmod($path, $mode, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $uid
 * @param int $gid
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_chown($path, $uid, $gid, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_close($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_close($fd, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param callable $execute
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_custom(callable $execute, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    $safeResult = \eio_custom($execute, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param mixed $fd2
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_dup2($fd, $fd2, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @throws EioException
 *
 */
function eio_event_loop(): void
{
    error_clear_last();
    $safeResult = \eio_event_loop();
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
}


/**
 * @param mixed $fd
 * @param int $mode
 * @param int $offset
 * @param int $length
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $mode
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_fchmod($fd, $mode, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $uid
 * @param int $gid
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_fchown($fd, $uid, $gid, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_fdatasync($fd, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fstat($fd, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    if ($data !== null) {
        $safeResult = \eio_fstat($fd, $pri, $callback, $data);
    } else {
        $safeResult = \eio_fstat($fd, $pri, $callback);
    }
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fstatvfs($fd, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    if ($data !== null) {
        $safeResult = \eio_fstatvfs($fd, $pri, $callback, $data);
    } else {
        $safeResult = \eio_fstatvfs($fd, $pri, $callback);
    }
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_fsync($fd, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $offset
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_ftruncate($fd, $offset, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param float $atime
 * @param float $mtime
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param callable $callback
 * @param null|string $data
 * @return resource
 * @throws EioException
 *
 */
function eio_grp(callable $callback, ?string $data = null)
{
    error_clear_last();
    $safeResult = \eio_grp($callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_lstat(string $path, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    $safeResult = \eio_lstat($path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $mode
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_mkdir($path, $mode, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $mode
 * @param int $dev
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_mknod($path, $mode, $dev, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_nop(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_nop($pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $offset
 * @param int $length
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_readahead($fd, $offset, $length, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $flags
 * @param int $pri
 * @param callable $callback
 * @param null|string $data
 * @return resource
 * @throws EioException
 *
 */
function eio_readdir(string $path, int $flags, int $pri, callable $callback, ?string $data = null)
{
    error_clear_last();
    $safeResult = \eio_readdir($path, $flags, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable $callback
 * @param null|string $data
 * @return resource
 * @throws EioException
 *
 */
function eio_readlink(string $path, int $pri, callable $callback, ?string $data = null)
{
    error_clear_last();
    $safeResult = \eio_readlink($path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param string $new_path
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_rename($path, $new_path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_rmdir($path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $offset
 * @param int $whence
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_seek($fd, $offset, $whence, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $out_fd
 * @param mixed $in_fd
 * @param int $offset
 * @param int $length
 * @param int $pri
 * @param callable $callback
 * @param string $data
 * @return resource
 * @throws EioException
 *
 */
function eio_sendfile($out_fd, $in_fd, int $offset, int $length, ?int $pri = null, ?callable $callback = null, ?string $data = null)
{
    error_clear_last();
    if ($data !== null) {
        $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback, $data);
    } elseif ($callback !== null) {
        $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback);
    } elseif ($pri !== null) {
        $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri);
    } else {
        $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length);
    }
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_stat(string $path, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    $safeResult = \eio_stat($path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_statvfs(string $path, int $pri, callable $callback, $data = null)
{
    error_clear_last();
    if ($data !== null) {
        $safeResult = \eio_statvfs($path, $pri, $callback, $data);
    } else {
        $safeResult = \eio_statvfs($path, $pri, $callback);
    }
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param string $new_path
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_symlink($path, $new_path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $offset
 * @param int $nbytes
 * @param int $flags
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_sync(int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_sync($pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_syncfs($fd, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $offset
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_truncate($path, $offset, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_unlink($path, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $path
 * @param float $atime
 * @param float $mtime
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_utime($path, $atime, $mtime, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param mixed $fd
 * @param string $str
 * @param int $length
 * @param int $offset
 * @param int $pri
 * @param callable|null $callback
 * @param mixed $data
 * @return resource
 * @throws EioException
 *
 */
function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, ?callable $callback = null, $data = null)
{
    error_clear_last();
    $safeResult = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data);
    if ($safeResult === false) {
        throw EioException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! a\    
  swoole.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SwooleException;

/**
 * @param string $hostname
 * @param callable $callback
 * @throws SwooleException
 *
 */
function swoole_async_dns_lookup(string $hostname, callable $callback): void
{
    error_clear_last();
    $safeResult = \swoole_async_dns_lookup($hostname, $callback);
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param string $callback
 * @throws SwooleException
 *
 */
function swoole_async_readfile(string $filename, string $callback): void
{
    error_clear_last();
    $safeResult = \swoole_async_readfile($filename, $callback);
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param string $content
 * @param int $offset
 * @param callable $callback
 * @throws SwooleException
 *
 */
function swoole_async_write(string $filename, string $content, ?int $offset = null, ?callable $callback = null): void
{
    error_clear_last();
    if ($callback !== null) {
        $safeResult = \swoole_async_write($filename, $content, $offset, $callback);
    } elseif ($offset !== null) {
        $safeResult = \swoole_async_write($filename, $content, $offset);
    } else {
        $safeResult = \swoole_async_write($filename, $content);
    }
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param string $content
 * @param callable $callback
 * @param int $flags
 * @throws SwooleException
 *
 */
function swoole_async_writefile(string $filename, string $content, ?callable $callback = null, int $flags = 0): void
{
    error_clear_last();
    if ($flags !== 0) {
        $safeResult = \swoole_async_writefile($filename, $content, $callback, $flags);
    } elseif ($callback !== null) {
        $safeResult = \swoole_async_writefile($filename, $content, $callback);
    } else {
        $safeResult = \swoole_async_writefile($filename, $content);
    }
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param callable $callback
 * @throws SwooleException
 *
 */
function swoole_event_defer(callable $callback): void
{
    error_clear_last();
    $safeResult = \swoole_event_defer($callback);
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param int $fd
 * @throws SwooleException
 *
 */
function swoole_event_del(int $fd): void
{
    error_clear_last();
    $safeResult = \swoole_event_del($fd);
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}


/**
 * @param int $fd
 * @param string $data
 * @throws SwooleException
 *
 */
function swoole_event_write(int $fd, string $data): void
{
    error_clear_last();
    $safeResult = \swoole_event_write($fd, $data);
    if ($safeResult === false) {
        throw SwooleException::createFromPhpError();
    }
}
PK       ! }	  	  
  apache.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ApacheException;

/**
 * @return string
 * @throws ApacheException
 *
 */
function apache_get_version(): string
{
    error_clear_last();
    $safeResult = \apache_get_version();
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $variable
 * @param bool $walk_to_top
 * @return string
 * @throws ApacheException
 *
 */
function apache_getenv(string $variable, bool $walk_to_top = false): string
{
    error_clear_last();
    $safeResult = \apache_getenv($variable, $walk_to_top);
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return object
 * @throws ApacheException
 *
 */
function apache_lookup_uri(string $filename): object
{
    error_clear_last();
    $safeResult = \apache_lookup_uri($filename);
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return array
 * @throws ApacheException
 *
 */
function apache_request_headers(): array
{
    error_clear_last();
    $safeResult = \apache_request_headers();
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return array
 * @throws ApacheException
 *
 */
function apache_response_headers(): array
{
    error_clear_last();
    $safeResult = \apache_response_headers();
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $variable
 * @param string $value
 * @param bool $walk_to_top
 * @throws ApacheException
 *
 */
function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void
{
    error_clear_last();
    $safeResult = \apache_setenv($variable, $value, $walk_to_top);
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
}


/**
 * @return array
 * @throws ApacheException
 *
 */
function getallheaders(): array
{
    error_clear_last();
    $safeResult = \getallheaders();
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $uri
 * @throws ApacheException
 *
 */
function virtual(string $uri): void
{
    error_clear_last();
    $safeResult = \virtual($uri);
    if ($safeResult === false) {
        throw ApacheException::createFromPhpError();
    }
}
PK       ! ҧ.AF
  F
  	  iconv.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\IconvException;

/**
 * @param string $type
 * @return mixed
 * @throws IconvException
 *
 */
function iconv_get_encoding(string $type = "all")
{
    error_clear_last();
    $safeResult = \iconv_get_encoding($type);
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $string
 * @param int $mode
 * @param null|string $encoding
 * @return string
 * @throws IconvException
 *
 */
function iconv_mime_decode(string $string, int $mode = 0, ?string $encoding = null): string
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \iconv_mime_decode($string, $mode, $encoding);
    } else {
        $safeResult = \iconv_mime_decode($string, $mode);
    }
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $field_name
 * @param string $field_value
 * @param array $options
 * @return string
 * @throws IconvException
 *
 */
function iconv_mime_encode(string $field_name, string $field_value, array $options = []): string
{
    error_clear_last();
    $safeResult = \iconv_mime_encode($field_name, $field_value, $options);
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $type
 * @param string $encoding
 * @throws IconvException
 *
 */
function iconv_set_encoding(string $type, string $encoding): void
{
    error_clear_last();
    $safeResult = \iconv_set_encoding($type, $encoding);
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
}


/**
 * @param string $string
 * @param null|string $encoding
 * @return 0|positive-int
 * @throws IconvException
 *
 */
function iconv_strlen(string $string, ?string $encoding = null): int
{
    error_clear_last();
    if ($encoding !== null) {
        $safeResult = \iconv_strlen($string, $encoding);
    } else {
        $safeResult = \iconv_strlen($string);
    }
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $from_encoding
 * @param string $to_encoding
 * @param string $string
 * @return string
 * @throws IconvException
 *
 */
function iconv(string $from_encoding, string $to_encoding, string $string): string
{
    error_clear_last();
    $safeResult = \iconv($from_encoding, $to_encoding, $string);
    if ($safeResult === false) {
        throw IconvException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! ݯ:  :  	  uodbc.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\UodbcException;

/**
 * @param resource $odbc
 * @param bool $enable
 * @return mixed
 * @throws UodbcException
 *
 */
function odbc_autocommit($odbc, bool $enable = false)
{
    error_clear_last();
    $safeResult = \odbc_autocommit($odbc, $enable);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $statement
 * @param int $mode
 * @throws UodbcException
 *
 */
function odbc_binmode(int $statement, int $mode): void
{
    error_clear_last();
    $safeResult = \odbc_binmode($statement, $mode);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param resource $odbc
 * @param string $catalog
 * @param string $schema
 * @param string $table
 * @param string $column
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_columnprivileges($odbc, string $catalog, string $schema, string $table, string $column)
{
    error_clear_last();
    $safeResult = \odbc_columnprivileges($odbc, $catalog, $schema, $table, $column);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param null|string $catalog
 * @param null|string $schema
 * @param null|string $table
 * @param null|string $column
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_columns($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $column = null)
{
    error_clear_last();
    if ($column !== null) {
        $safeResult = \odbc_columns($odbc, $catalog, $schema, $table, $column);
    } elseif ($table !== null) {
        $safeResult = \odbc_columns($odbc, $catalog, $schema, $table);
    } elseif ($schema !== null) {
        $safeResult = \odbc_columns($odbc, $catalog, $schema);
    } elseif ($catalog !== null) {
        $safeResult = \odbc_columns($odbc, $catalog);
    } else {
        $safeResult = \odbc_columns($odbc);
    }
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @throws UodbcException
 *
 */
function odbc_commit($odbc): void
{
    error_clear_last();
    $safeResult = \odbc_commit($odbc);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param string $dsn
 * @param string $user
 * @param string $password
 * @param int $cursor_option
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
{
    error_clear_last();
    $safeResult = \odbc_connect($dsn, $user, $password, $cursor_option);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @return string
 * @throws UodbcException
 *
 */
function odbc_cursor($statement): string
{
    error_clear_last();
    $safeResult = \odbc_cursor($statement);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param int $fetch_type
 * @return array
 * @throws UodbcException
 *
 */
function odbc_data_source($odbc, int $fetch_type): array
{
    error_clear_last();
    $safeResult = \odbc_data_source($odbc, $fetch_type);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $query
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_exec($odbc, string $query)
{
    error_clear_last();
    $safeResult = \odbc_exec($odbc, $query);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param array $params
 * @throws UodbcException
 *
 */
function odbc_execute($statement, array $params = []): void
{
    error_clear_last();
    $safeResult = \odbc_execute($statement, $params);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @param array|null $array
 * @param int $row
 * @return int
 * @throws UodbcException
 *
 */
function odbc_fetch_into($statement, ?array &$array, int $row = 0): int
{
    error_clear_last();
    $safeResult = \odbc_fetch_into($statement, $array, $row);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param int $field
 * @return int
 * @throws UodbcException
 *
 */
function odbc_field_len($statement, int $field): int
{
    error_clear_last();
    $safeResult = \odbc_field_len($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param int $field
 * @return string
 * @throws UodbcException
 *
 */
function odbc_field_name($statement, int $field): string
{
    error_clear_last();
    $safeResult = \odbc_field_name($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param string $field
 * @return int
 * @throws UodbcException
 *
 */
function odbc_field_num($statement, string $field): int
{
    error_clear_last();
    $safeResult = \odbc_field_num($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param int $field
 * @return int
 * @throws UodbcException
 *
 */
function odbc_field_scale($statement, int $field): int
{
    error_clear_last();
    $safeResult = \odbc_field_scale($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param int $field
 * @return string
 * @throws UodbcException
 *
 */
function odbc_field_type($statement, int $field): string
{
    error_clear_last();
    $safeResult = \odbc_field_type($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $pk_catalog
 * @param string $pk_schema
 * @param string $pk_table
 * @param string $fk_catalog
 * @param string $fk_schema
 * @param string $fk_table
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table)
{
    error_clear_last();
    $safeResult = \odbc_foreignkeys($odbc, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param int $data_type
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_gettypeinfo($odbc, int $data_type = 0)
{
    error_clear_last();
    $safeResult = \odbc_gettypeinfo($odbc, $data_type);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param int $length
 * @throws UodbcException
 *
 */
function odbc_longreadlen($statement, int $length): void
{
    error_clear_last();
    $safeResult = \odbc_longreadlen($statement, $length);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param resource $statement
 * @return int
 * @throws UodbcException
 *
 */
function odbc_num_fields($statement): int
{
    error_clear_last();
    $safeResult = \odbc_num_fields($statement);
    if ($safeResult === -1) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $dsn
 * @param string $user
 * @param string $password
 * @param int $cursor_option
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER)
{
    error_clear_last();
    $safeResult = \odbc_pconnect($dsn, $user, $password, $cursor_option);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $query
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_prepare($odbc, string $query)
{
    error_clear_last();
    $safeResult = \odbc_prepare($odbc, $query);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $catalog
 * @param string $schema
 * @param string $table
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_primarykeys($odbc, string $catalog, string $schema, string $table)
{
    error_clear_last();
    $safeResult = \odbc_primarykeys($odbc, $catalog, $schema, $table);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param  $odbc
 * @param null|string $catalog
 * @param null|string $schema
 * @param null|string $procedure
 * @param null|string $column
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_procedurecolumns($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null, ?string $column = null)
{
    error_clear_last();
    if ($column !== null) {
        $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure, $column);
    } elseif ($procedure !== null) {
        $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure);
    } elseif ($schema !== null) {
        $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema);
    } elseif ($catalog !== null) {
        $safeResult = \odbc_procedurecolumns($odbc, $catalog);
    } else {
        $safeResult = \odbc_procedurecolumns($odbc);
    }
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param  $odbc
 * @param null|string $catalog
 * @param null|string $schema
 * @param null|string $procedure
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_procedures($odbc, ?string $catalog = null, ?string $schema = null, ?string $procedure = null)
{
    error_clear_last();
    if ($procedure !== null) {
        $safeResult = \odbc_procedures($odbc, $catalog, $schema, $procedure);
    } elseif ($schema !== null) {
        $safeResult = \odbc_procedures($odbc, $catalog, $schema);
    } elseif ($catalog !== null) {
        $safeResult = \odbc_procedures($odbc, $catalog);
    } else {
        $safeResult = \odbc_procedures($odbc);
    }
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param string $format
 * @return int
 * @throws UodbcException
 *
 */
function odbc_result_all($statement, string $format = ""): int
{
    error_clear_last();
    $safeResult = \odbc_result_all($statement, $format);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $statement
 * @param mixed $field
 * @return mixed
 * @throws UodbcException
 *
 */
function odbc_result($statement, $field)
{
    error_clear_last();
    $safeResult = \odbc_result($statement, $field);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @throws UodbcException
 *
 */
function odbc_rollback($odbc): void
{
    error_clear_last();
    $safeResult = \odbc_rollback($odbc);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param resource $odbc
 * @param int $which
 * @param int $option
 * @param int $value
 * @throws UodbcException
 *
 */
function odbc_setoption($odbc, int $which, int $option, int $value): void
{
    error_clear_last();
    $safeResult = \odbc_setoption($odbc, $which, $option, $value);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
}


/**
 * @param resource $odbc
 * @param int $type
 * @param string $catalog
 * @param string $schema
 * @param string $table
 * @param int $scope
 * @param int $nullable
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable)
{
    error_clear_last();
    $safeResult = \odbc_specialcolumns($odbc, $type, $catalog, $schema, $table, $scope, $nullable);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $catalog
 * @param string $schema
 * @param string $table
 * @param int $unique
 * @param int $accuracy
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_statistics($odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy)
{
    error_clear_last();
    $safeResult = \odbc_statistics($odbc, $catalog, $schema, $table, $unique, $accuracy);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param string $catalog
 * @param string $schema
 * @param string $table
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_tableprivileges($odbc, string $catalog, string $schema, string $table)
{
    error_clear_last();
    $safeResult = \odbc_tableprivileges($odbc, $catalog, $schema, $table);
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $odbc
 * @param null|string $catalog
 * @param null|string $schema
 * @param null|string $table
 * @param null|string $types
 * @return resource
 * @throws UodbcException
 *
 */
function odbc_tables($odbc, ?string $catalog = null, ?string $schema = null, ?string $table = null, ?string $types = null)
{
    error_clear_last();
    if ($types !== null) {
        $safeResult = \odbc_tables($odbc, $catalog, $schema, $table, $types);
    } elseif ($table !== null) {
        $safeResult = \odbc_tables($odbc, $catalog, $schema, $table);
    } elseif ($schema !== null) {
        $safeResult = \odbc_tables($odbc, $catalog, $schema);
    } elseif ($catalog !== null) {
        $safeResult = \odbc_tables($odbc, $catalog);
    } else {
        $safeResult = \odbc_tables($odbc);
    }
    if ($safeResult === false) {
        throw UodbcException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! E$    
  sodium.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SodiumException;

/**
 * @param string $ciphertext
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ciphertext
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $message
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ciphertext
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $message
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ciphertext
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $message
 * @param string $additional_data
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $mac
 * @param string $message
 * @param string $key
 * @throws SodiumException
 *
 */
function sodium_crypto_auth_verify(string $mac, string $message, string $key): void
{
    error_clear_last();
    $safeResult = \sodium_crypto_auth_verify($mac, $message, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
}


/**
 * @param string $ciphertext
 * @param string $nonce
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_box_open($ciphertext, $nonce, $key_pair);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $ciphertext
 * @param string $key_pair
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_box_seal_open($ciphertext, $key_pair);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param non-empty-string $state
 * @param string $message
 * @throws SodiumException
 *
 */
function sodium_crypto_generichash_update(string &$state, string $message): void
{
    error_clear_last();
    $safeResult = \sodium_crypto_generichash_update($state, $message);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
}


/**
 * @param string $ciphertext
 * @param string $nonce
 * @param string $key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_secretbox_open($ciphertext, $nonce, $key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $signed_message
 * @param non-empty-string $public_key
 * @return string
 * @throws SodiumException
 *
 */
function sodium_crypto_sign_open(string $signed_message, string $public_key): string
{
    error_clear_last();
    $safeResult = \sodium_crypto_sign_open($signed_message, $public_key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param non-empty-string $signature
 * @param string $message
 * @param non-empty-string $public_key
 * @throws SodiumException
 *
 */
function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): void
{
    error_clear_last();
    $safeResult = \sodium_crypto_sign_verify_detached($signature, $message, $public_key);
    if ($safeResult === false) {
        throw SodiumException::createFromPhpError();
    }
}
PK       ! o  o    info.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\InfoException;

/**
 * @param int $what
 * @param mixed $value
 * @return mixed
 * @throws InfoException
 *
 */
function assert_options(int $what, $value = null)
{
    error_clear_last();
    if ($value !== null) {
        $safeResult = \assert_options($what, $value);
    } else {
        $safeResult = \assert_options($what);
    }
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $title
 * @throws InfoException
 *
 */
function cli_set_process_title(string $title): void
{
    error_clear_last();
    $safeResult = \cli_set_process_title($title);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}


/**
 * @param string $extension_filename
 * @throws InfoException
 *
 */
function dl(string $extension_filename): void
{
    error_clear_last();
    $safeResult = \dl($extension_filename);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}


/**
 * @param string $option
 * @return mixed
 * @throws InfoException
 *
 */
function get_cfg_var(string $option)
{
    error_clear_last();
    $safeResult = \get_cfg_var($option);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return string
 * @throws InfoException
 *
 */
function get_include_path(): string
{
    error_clear_last();
    $safeResult = \get_include_path();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws InfoException
 *
 */
function getlastmod(): int
{
    error_clear_last();
    $safeResult = \getlastmod();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws InfoException
 *
 */
function getmygid(): int
{
    error_clear_last();
    $safeResult = \getmygid();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws InfoException
 *
 */
function getmyinode(): int
{
    error_clear_last();
    $safeResult = \getmyinode();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws InfoException
 *
 */
function getmypid(): int
{
    error_clear_last();
    $safeResult = \getmypid();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return int
 * @throws InfoException
 *
 */
function getmyuid(): int
{
    error_clear_last();
    $safeResult = \getmyuid();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $short_options
 * @param array $long_options
 * @param int|null $rest_index
 * @return array|array|array
 * @throws InfoException
 *
 */
function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array
{
    error_clear_last();
    $safeResult = \getopt($short_options, $long_options, $rest_index);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $mode
 * @return array
 * @throws InfoException
 *
 */
function getrusage(int $mode = 0): array
{
    error_clear_last();
    $safeResult = \getrusage($mode);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $option
 * @return string
 * @throws InfoException
 *
 */
function ini_get(string $option): string
{
    error_clear_last();
    $safeResult = \ini_get($option);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $option
 * @param bool|float|int|null|string $value
 * @return string
 * @throws InfoException
 *
 */
function ini_set(string $option, $value): string
{
    error_clear_last();
    $safeResult = \ini_set($option, $value);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @return non-empty-string
 * @throws InfoException
 *
 */
function php_sapi_name(): string
{
    error_clear_last();
    $safeResult = \php_sapi_name();
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $flags
 * @throws InfoException
 *
 */
function phpcredits(int $flags = CREDITS_ALL): void
{
    error_clear_last();
    $safeResult = \phpcredits($flags);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}


/**
 * @param int $flags
 * @throws InfoException
 *
 */
function phpinfo(int $flags = INFO_ALL): void
{
    error_clear_last();
    $safeResult = \phpinfo($flags);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}


/**
 * @param string $assignment
 * @throws InfoException
 *
 */
function putenv(string $assignment): void
{
    error_clear_last();
    $safeResult = \putenv($assignment);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}


/**
 * @param string $include_path
 * @return string
 * @throws InfoException
 *
 */
function set_include_path(string $include_path): string
{
    error_clear_last();
    $safeResult = \set_include_path($include_path);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $seconds
 * @throws InfoException
 *
 */
function set_time_limit(int $seconds): void
{
    error_clear_last();
    $safeResult = \set_time_limit($seconds);
    if ($safeResult === false) {
        throw InfoException::createFromPhpError();
    }
}
PK       ! (
  
    outcontrol.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\OutcontrolException;

/**
 * @throws OutcontrolException
 *
 */
function ob_clean(): void
{
    error_clear_last();
    $safeResult = \ob_clean();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @throws OutcontrolException
 *
 */
function ob_end_clean(): void
{
    error_clear_last();
    $safeResult = \ob_end_clean();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @throws OutcontrolException
 *
 */
function ob_end_flush(): void
{
    error_clear_last();
    $safeResult = \ob_end_flush();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @throws OutcontrolException
 *
 */
function ob_flush(): void
{
    error_clear_last();
    $safeResult = \ob_flush();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @return string
 * @throws OutcontrolException
 *
 */
function ob_get_clean(): string
{
    error_clear_last();
    $safeResult = \ob_get_clean();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array|callable|null|string $callback
 * @param int $chunk_size
 * @param int $flags
 * @throws OutcontrolException
 *
 */
function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): void
{
    error_clear_last();
    if ($flags !== PHP_OUTPUT_HANDLER_STDFLAGS) {
        $safeResult = \ob_start($callback, $chunk_size, $flags);
    } elseif ($chunk_size !== 0) {
        $safeResult = \ob_start($callback, $chunk_size);
    } elseif ($callback !== null) {
        $safeResult = \ob_start($callback);
    } else {
        $safeResult = \ob_start();
    }
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @param string $name
 * @param string $value
 * @throws OutcontrolException
 *
 */
function output_add_rewrite_var(string $name, string $value): void
{
    error_clear_last();
    $safeResult = \output_add_rewrite_var($name, $value);
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}


/**
 * @throws OutcontrolException
 *
 */
function output_reset_rewrite_vars(): void
{
    error_clear_last();
    $safeResult = \output_reset_rewrite_vars();
    if ($safeResult === false) {
        throw OutcontrolException::createFromPhpError();
    }
}
PK       ! q߹    
  filter.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\FilterException;

/**
 * @param int $type
 * @param array|int $options
 * @param bool $add_empty
 * @return array|null
 * @throws FilterException
 *
 */
function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
{
    error_clear_last();
    $safeResult = \filter_input_array($type, $options, $add_empty);
    if ($safeResult === false) {
        throw FilterException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param array $array
 * @param mixed $options
 * @param bool $add_empty
 * @return array|null
 * @throws FilterException
 *
 */
function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_empty = true): ?array
{
    error_clear_last();
    $safeResult = \filter_var_array($array, $options, $add_empty);
    if ($safeResult === false) {
        throw FilterException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! "&  &    datetime.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\DatetimeException;

/**
 * @param string $format
 * @param string $datetime
 * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null
 * @throws DatetimeException
 *
 */
function date_parse_from_format(string $format, string $datetime): ?array
{
    error_clear_last();
    $safeResult = \date_parse_from_format($format, $datetime);
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $datetime
 * @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null
 * @throws DatetimeException
 *
 */
function date_parse(string $datetime): ?array
{
    error_clear_last();
    $safeResult = \date_parse($datetime);
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $timestamp
 * @param float $latitude
 * @param float $longitude
 * @return array{sunrise: int|bool,sunset: int|bool,transit: int|bool,civil_twilight_begin: int|bool,civil_twilight_end: int|bool,nautical_twilight_begin: int|bool,nautical_twilight_end: int|bool,astronomical_twilight_begin: int|bool,astronomical_twilight_end: int|bool}
 * @throws DatetimeException
 *
 */
function date_sun_info(int $timestamp, float $latitude, float $longitude): array
{
    error_clear_last();
    $safeResult = \date_sun_info($timestamp, $latitude, $longitude);
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $timestamp
 * @param int $returnFormat
 * @param float|null $latitude
 * @param float|null $longitude
 * @param float|null $zenith
 * @param float|null $utcOffset
 * @return mixed
 * @throws DatetimeException
 *
 */
function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null)
{
    error_clear_last();
    if ($utcOffset !== null) {
        $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
    } elseif ($zenith !== null) {
        $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith);
    } elseif ($longitude !== null) {
        $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude);
    } elseif ($latitude !== null) {
        $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude);
    } else {
        $safeResult = \date_sunrise($timestamp, $returnFormat);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $timestamp
 * @param int $returnFormat
 * @param float|null $latitude
 * @param float|null $longitude
 * @param float|null $zenith
 * @param float|null $utcOffset
 * @return mixed
 * @throws DatetimeException
 *
 */
function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, ?float $utcOffset = null)
{
    error_clear_last();
    if ($utcOffset !== null) {
        $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset);
    } elseif ($zenith !== null) {
        $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith);
    } elseif ($longitude !== null) {
        $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude);
    } elseif ($latitude !== null) {
        $safeResult = \date_sunset($timestamp, $returnFormat, $latitude);
    } else {
        $safeResult = \date_sunset($timestamp, $returnFormat);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $format
 * @param int|null $timestamp
 * @return string
 * @throws DatetimeException
 *
 */
function date(string $format, ?int $timestamp = null): string
{
    error_clear_last();
    if ($timestamp !== null) {
        $safeResult = \date($format, $timestamp);
    } else {
        $safeResult = \date($format);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $hour
 * @param int|null $minute
 * @param int|null $second
 * @param int|null $month
 * @param int|null $day
 * @param int|null $year
 * @return int
 * @throws DatetimeException
 *
 */
function gmmktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null): int
{
    error_clear_last();
    if ($year !== null) {
        $safeResult = \gmmktime($hour, $minute, $second, $month, $day, $year);
    } elseif ($day !== null) {
        $safeResult = \gmmktime($hour, $minute, $second, $month, $day);
    } elseif ($month !== null) {
        $safeResult = \gmmktime($hour, $minute, $second, $month);
    } elseif ($second !== null) {
        $safeResult = \gmmktime($hour, $minute, $second);
    } elseif ($minute !== null) {
        $safeResult = \gmmktime($hour, $minute);
    } else {
        $safeResult = \gmmktime($hour);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $format
 * @param int|null $timestamp
 * @return string
 * @throws DatetimeException
 *
 */
function gmstrftime(string $format, ?int $timestamp = null): string
{
    error_clear_last();
    if ($timestamp !== null) {
        $safeResult = \gmstrftime($format, $timestamp);
    } else {
        $safeResult = \gmstrftime($format);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $format
 * @param int|null $timestamp
 * @return int
 * @throws DatetimeException
 *
 */
function idate(string $format, ?int $timestamp = null): int
{
    error_clear_last();
    if ($timestamp !== null) {
        $safeResult = \idate($format, $timestamp);
    } else {
        $safeResult = \idate($format);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $hour
 * @param int|null $minute
 * @param int|null $second
 * @param int|null $month
 * @param int|null $day
 * @param int|null $year
 * @return int
 * @throws DatetimeException
 *
 */
function mktime(int $hour, ?int $minute = null, ?int $second = null, ?int $month = null, ?int $day = null, ?int $year = null): int
{
    error_clear_last();
    if ($year !== null) {
        $safeResult = \mktime($hour, $minute, $second, $month, $day, $year);
    } elseif ($day !== null) {
        $safeResult = \mktime($hour, $minute, $second, $month, $day);
    } elseif ($month !== null) {
        $safeResult = \mktime($hour, $minute, $second, $month);
    } elseif ($second !== null) {
        $safeResult = \mktime($hour, $minute, $second);
    } elseif ($minute !== null) {
        $safeResult = \mktime($hour, $minute);
    } else {
        $safeResult = \mktime($hour);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $format
 * @param int|null $timestamp
 * @return string
 * @throws DatetimeException
 *
 */
function strftime(string $format, ?int $timestamp = null): string
{
    error_clear_last();
    if ($timestamp !== null) {
        $safeResult = \strftime($format, $timestamp);
    } else {
        $safeResult = \strftime($format);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $timestamp
 * @param string $format
 * @return array
 * @throws DatetimeException
 *
 */
function strptime(string $timestamp, string $format): array
{
    error_clear_last();
    $safeResult = \strptime($timestamp, $format);
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $datetime
 * @param int|null $baseTimestamp
 * @return int
 * @throws DatetimeException
 *
 */
function strtotime(string $datetime, ?int $baseTimestamp = null): int
{
    error_clear_last();
    if ($baseTimestamp !== null) {
        $safeResult = \strtotime($datetime, $baseTimestamp);
    } else {
        $safeResult = \strtotime($datetime);
    }
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $abbr
 * @param int $utcOffset
 * @param int $isDST
 * @return string
 * @throws DatetimeException
 *
 */
function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string
{
    error_clear_last();
    $safeResult = \timezone_name_from_abbr($abbr, $utcOffset, $isDST);
    if ($safeResult === false) {
        throw DatetimeException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! K`  `  	  gnupg.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\GnupgException;

/**
 * @param resource $identifier
 * @param string $fingerprint
 * @param string $passphrase
 * @throws GnupgException
 *
 */
function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphrase): void
{
    error_clear_last();
    $safeResult = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @param string $fingerprint
 * @throws GnupgException
 *
 */
function gnupg_addencryptkey($identifier, string $fingerprint): void
{
    error_clear_last();
    $safeResult = \gnupg_addencryptkey($identifier, $fingerprint);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @param string $fingerprint
 * @param string $passphrase
 * @throws GnupgException
 *
 */
function gnupg_addsignkey($identifier, string $fingerprint, ?string $passphrase = null): void
{
    error_clear_last();
    if ($passphrase !== null) {
        $safeResult = \gnupg_addsignkey($identifier, $fingerprint, $passphrase);
    } else {
        $safeResult = \gnupg_addsignkey($identifier, $fingerprint);
    }
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @throws GnupgException
 *
 */
function gnupg_cleardecryptkeys($identifier): void
{
    error_clear_last();
    $safeResult = \gnupg_cleardecryptkeys($identifier);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @throws GnupgException
 *
 */
function gnupg_clearencryptkeys($identifier): void
{
    error_clear_last();
    $safeResult = \gnupg_clearencryptkeys($identifier);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @throws GnupgException
 *
 */
function gnupg_clearsignkeys($identifier): void
{
    error_clear_last();
    $safeResult = \gnupg_clearsignkeys($identifier);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @param int $armor
 * @throws GnupgException
 *
 */
function gnupg_setarmor($identifier, int $armor): void
{
    error_clear_last();
    $safeResult = \gnupg_setarmor($identifier, $armor);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}


/**
 * @param resource $identifier
 * @param int $signmode
 * @throws GnupgException
 *
 */
function gnupg_setsignmode($identifier, int $signmode): void
{
    error_clear_last();
    $safeResult = \gnupg_setsignmode($identifier, $signmode);
    if ($safeResult === false) {
        throw GnupgException::createFromPhpError();
    }
}
PK       ! 	'  '  
  stream.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\StreamException;

/**
 * @param resource $context
 * @param array $params
 * @throws StreamException
 *
 */
function stream_context_set_params($context, array $params): void
{
    error_clear_last();
    $safeResult = \stream_context_set_params($context, $params);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $from
 * @param resource $to
 * @param int|null $length
 * @param int $offset
 * @return int
 * @throws StreamException
 *
 */
function stream_copy_to_stream($from, $to, ?int $length = null, int $offset = 0): int
{
    error_clear_last();
    if ($offset !== 0) {
        $safeResult = \stream_copy_to_stream($from, $to, $length, $offset);
    } elseif ($length !== null) {
        $safeResult = \stream_copy_to_stream($from, $to, $length);
    } else {
        $safeResult = \stream_copy_to_stream($from, $to);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param string $filtername
 * @param int $read_write
 * @param mixed $params
 * @return resource
 * @throws StreamException
 *
 */
function stream_filter_append($stream, string $filtername, ?int $read_write = null, $params = null)
{
    error_clear_last();
    if ($params !== null) {
        $safeResult = \stream_filter_append($stream, $filtername, $read_write, $params);
    } elseif ($read_write !== null) {
        $safeResult = \stream_filter_append($stream, $filtername, $read_write);
    } else {
        $safeResult = \stream_filter_append($stream, $filtername);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param string $filtername
 * @param int $read_write
 * @param mixed $params
 * @return resource
 * @throws StreamException
 *
 */
function stream_filter_prepend($stream, string $filtername, ?int $read_write = null, $params = null)
{
    error_clear_last();
    if ($params !== null) {
        $safeResult = \stream_filter_prepend($stream, $filtername, $read_write, $params);
    } elseif ($read_write !== null) {
        $safeResult = \stream_filter_prepend($stream, $filtername, $read_write);
    } else {
        $safeResult = \stream_filter_prepend($stream, $filtername);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filter_name
 * @param string $class
 * @throws StreamException
 *
 */
function stream_filter_register(string $filter_name, string $class): void
{
    error_clear_last();
    $safeResult = \stream_filter_register($filter_name, $class);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $stream_filter
 * @throws StreamException
 *
 */
function stream_filter_remove($stream_filter): void
{
    error_clear_last();
    $safeResult = \stream_filter_remove($stream_filter);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $handle
 * @param int $maxlength
 * @param int $offset
 * @return string
 * @throws StreamException
 *
 */
function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): string
{
    error_clear_last();
    $safeResult = \stream_get_contents($handle, $maxlength, $offset);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $handle
 * @param int $length
 * @param string $ending
 * @return string
 * @throws StreamException
 *
 */
function stream_get_line($handle, int $length, string $ending = ""): string
{
    error_clear_last();
    $safeResult = \stream_get_line($handle, $length, $ending);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @throws StreamException
 *
 */
function stream_isatty($stream): void
{
    error_clear_last();
    $safeResult = \stream_isatty($stream);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @return string
 * @throws StreamException
 *
 */
function stream_resolve_include_path(string $filename): string
{
    error_clear_last();
    $safeResult = \stream_resolve_include_path($filename);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param bool $enable
 * @throws StreamException
 *
 */
function stream_set_blocking($stream, bool $enable): void
{
    error_clear_last();
    $safeResult = \stream_set_blocking($stream, $enable);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @param int $seconds
 * @param int $microseconds
 * @throws StreamException
 *
 */
function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void
{
    error_clear_last();
    $safeResult = \stream_set_timeout($stream, $seconds, $microseconds);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $server_socket
 * @param float $timeout
 * @param null|string $peername
 * @return resource
 * @throws StreamException
 *
 */
function stream_socket_accept($server_socket, ?float $timeout = null, ?string &$peername = null)
{
    error_clear_last();
    if ($peername !== null) {
        $safeResult = \stream_socket_accept($server_socket, $timeout, $peername);
    } elseif ($timeout !== null) {
        $safeResult = \stream_socket_accept($server_socket, $timeout);
    } else {
        $safeResult = \stream_socket_accept($server_socket);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $remote_socket
 * @param int|null $errno
 * @param null|string $errstr
 * @param float $timeout
 * @param int-mask $flags
 * @param resource $context
 * @return resource
 * @throws StreamException
 *
 */
function stream_socket_client(string $remote_socket, ?int &$errno = null, ?string &$errstr = null, ?float $timeout = null, int $flags = STREAM_CLIENT_CONNECT, $context = null)
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags, $context);
    } elseif ($flags !== STREAM_CLIENT_CONNECT) {
        $safeResult = \stream_socket_client($remote_socket, $errno, $errstr, $timeout, $flags);
    } elseif ($timeout !== null) {
        $safeResult = \stream_socket_client($remote_socket, $errno, $errstr, $timeout);
    } else {
        $safeResult = \stream_socket_client($remote_socket, $errno, $errstr);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $handle
 * @param bool $want_peer
 * @return string
 * @throws StreamException
 *
 */
function stream_socket_get_name($handle, bool $want_peer): string
{
    error_clear_last();
    $safeResult = \stream_socket_get_name($handle, $want_peer);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param int $domain
 * @param int $type
 * @param int $protocol
 * @return resource[]
 * @throws StreamException
 *
 */
function stream_socket_pair(int $domain, int $type, int $protocol): array
{
    error_clear_last();
    $safeResult = \stream_socket_pair($domain, $type, $protocol);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $local_socket
 * @param int|null $errno
 * @param null|string $errstr
 * @param int $flags
 * @param resource $context
 * @return resource
 * @throws StreamException
 *
 */
function stream_socket_server(string $local_socket, ?int &$errno = null, ?string &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null)
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \stream_socket_server($local_socket, $errno, $errstr, $flags, $context);
    } else {
        $safeResult = \stream_socket_server($local_socket, $errno, $errstr, $flags);
    }
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stream
 * @param int $mode
 * @throws StreamException
 *
 */
function stream_socket_shutdown($stream, int $mode): void
{
    error_clear_last();
    $safeResult = \stream_socket_shutdown($stream, $mode);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param resource $stream
 * @throws StreamException
 *
 */
function stream_supports_lock($stream): void
{
    error_clear_last();
    $safeResult = \stream_supports_lock($stream);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param string $protocol
 * @param string $class
 * @param int $flags
 * @throws StreamException
 *
 */
function stream_wrapper_register(string $protocol, string $class, int $flags = 0): void
{
    error_clear_last();
    $safeResult = \stream_wrapper_register($protocol, $class, $flags);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param string $protocol
 * @throws StreamException
 *
 */
function stream_wrapper_restore(string $protocol): void
{
    error_clear_last();
    $safeResult = \stream_wrapper_restore($protocol);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}


/**
 * @param string $protocol
 * @throws StreamException
 *
 */
function stream_wrapper_unregister(string $protocol): void
{
    error_clear_last();
    $safeResult = \stream_wrapper_unregister($protocol);
    if ($safeResult === false) {
        throw StreamException::createFromPhpError();
    }
}
PK       ! 'K  K    solr.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\SolrException;

/**
 * @return string
 * @throws SolrException
 *
 */
function solr_get_version(): string
{
    error_clear_last();
    $safeResult = \solr_get_version();
    if ($safeResult === false) {
        throw SolrException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! 5!  !  	  xdiff.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\XdiffException;

/**
 * @param string $old_file
 * @param string $new_file
 * @param string $dest
 * @throws XdiffException
 *
 */
function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void
{
    error_clear_last();
    $safeResult = \xdiff_file_bdiff($old_file, $new_file, $dest);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $file
 * @param string $patch
 * @param string $dest
 * @throws XdiffException
 *
 */
function xdiff_file_bpatch(string $file, string $patch, string $dest): void
{
    error_clear_last();
    $safeResult = \xdiff_file_bpatch($file, $patch, $dest);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $old_file
 * @param string $new_file
 * @param string $dest
 * @throws XdiffException
 *
 */
function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void
{
    error_clear_last();
    $safeResult = \xdiff_file_diff_binary($old_file, $new_file, $dest);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $old_file
 * @param string $new_file
 * @param string $dest
 * @param int $context
 * @param bool $minimal
 * @throws XdiffException
 *
 */
function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void
{
    error_clear_last();
    $safeResult = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $file
 * @param string $patch
 * @param string $dest
 * @throws XdiffException
 *
 */
function xdiff_file_patch_binary(string $file, string $patch, string $dest): void
{
    error_clear_last();
    $safeResult = \xdiff_file_patch_binary($file, $patch, $dest);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $old_file
 * @param string $new_file
 * @param string $dest
 * @throws XdiffException
 *
 */
function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void
{
    error_clear_last();
    $safeResult = \xdiff_file_rabdiff($old_file, $new_file, $dest);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
}


/**
 * @param string $str
 * @param string $patch
 * @return string
 * @throws XdiffException
 *
 */
function xdiff_string_bpatch(string $str, string $patch): string
{
    error_clear_last();
    $safeResult = \xdiff_string_bpatch($str, $patch);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $str
 * @param string $patch
 * @return string
 * @throws XdiffException
 *
 */
function xdiff_string_patch_binary(string $str, string $patch): string
{
    error_clear_last();
    $safeResult = \xdiff_string_patch_binary($str, $patch);
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $str
 * @param string $patch
 * @param int $flags
 * @param null|string $error
 * @return string
 * @throws XdiffException
 *
 */
function xdiff_string_patch(string $str, string $patch, ?int $flags = null, ?string &$error = null): string
{
    error_clear_last();
    if ($error !== null) {
        $safeResult = \xdiff_string_patch($str, $patch, $flags, $error);
    } elseif ($flags !== null) {
        $safeResult = \xdiff_string_patch($str, $patch, $flags);
    } else {
        $safeResult = \xdiff_string_patch($str, $patch);
    }
    if ($safeResult === false) {
        throw XdiffException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! GC      classobj.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\ClassobjException;

/**
 * @param string $class
 * @param string $alias
 * @param bool $autoload
 * @throws ClassobjException
 *
 */
function class_alias(string $class, string $alias, bool $autoload = true): void
{
    error_clear_last();
    $safeResult = \class_alias($class, $alias, $autoload);
    if ($safeResult === false) {
        throw ClassobjException::createFromPhpError();
    }
}
PK       ! ò-      yaml.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\YamlException;

/**
 * @param string $filename
 * @param int $pos
 * @param int|null $ndocs
 * @param array|null $callbacks
 * @return mixed
 * @throws YamlException
 *
 */
function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
{
    error_clear_last();
    if ($callbacks !== null) {
        $safeResult = \yaml_parse_file($filename, $pos, $ndocs, $callbacks);
    } else {
        $safeResult = \yaml_parse_file($filename, $pos, $ndocs);
    }
    if ($safeResult === false) {
        throw YamlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $url
 * @param int $pos
 * @param int|null $ndocs
 * @param array|null $callbacks
 * @return mixed
 * @throws YamlException
 *
 */
function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
{
    error_clear_last();
    if ($callbacks !== null) {
        $safeResult = \yaml_parse_url($url, $pos, $ndocs, $callbacks);
    } else {
        $safeResult = \yaml_parse_url($url, $pos, $ndocs);
    }
    if ($safeResult === false) {
        throw YamlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $input
 * @param int $pos
 * @param int|null $ndocs
 * @param array|null $callbacks
 * @return mixed
 * @throws YamlException
 *
 */
function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, ?array $callbacks = null)
{
    error_clear_last();
    if ($callbacks !== null) {
        $safeResult = \yaml_parse($input, $pos, $ndocs, $callbacks);
    } else {
        $safeResult = \yaml_parse($input, $pos, $ndocs);
    }
    if ($safeResult === false) {
        throw YamlException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! jY8  8    rrd.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\RrdException;

/**
 * @param string $filename
 * @param array $options
 * @throws RrdException
 *
 */
function rrd_create(string $filename, array $options): void
{
    error_clear_last();
    $safeResult = \rrd_create($filename, $options);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
}


/**
 * @param string $file
 * @param int $raaindex
 * @return int
 * @throws RrdException
 *
 */
function rrd_first(string $file, int $raaindex = 0): int
{
    error_clear_last();
    $safeResult = \rrd_first($file, $raaindex);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param array $options
 * @return array
 * @throws RrdException
 *
 */
function rrd_graph(string $filename, array $options): array
{
    error_clear_last();
    $safeResult = \rrd_graph($filename, $options);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return array
 * @throws RrdException
 *
 */
function rrd_info(string $filename): array
{
    error_clear_last();
    $safeResult = \rrd_info($filename);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @return array
 * @throws RrdException
 *
 */
function rrd_lastupdate(string $filename): array
{
    error_clear_last();
    $safeResult = \rrd_lastupdate($filename);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $xml_file
 * @param string $rrd_file
 * @param array $options
 * @throws RrdException
 *
 */
function rrd_restore(string $xml_file, string $rrd_file, ?array $options = null): void
{
    error_clear_last();
    if ($options !== null) {
        $safeResult = \rrd_restore($xml_file, $rrd_file, $options);
    } else {
        $safeResult = \rrd_restore($xml_file, $rrd_file);
    }
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param array $options
 * @throws RrdException
 *
 */
function rrd_tune(string $filename, array $options): void
{
    error_clear_last();
    $safeResult = \rrd_tune($filename, $options);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
}


/**
 * @param string $filename
 * @param array $options
 * @throws RrdException
 *
 */
function rrd_update(string $filename, array $options): void
{
    error_clear_last();
    $safeResult = \rrd_update($filename, $options);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
}


/**
 * @param array $options
 * @return array
 * @throws RrdException
 *
 */
function rrd_xport(array $options): array
{
    error_clear_last();
    $safeResult = \rrd_xport($options);
    if ($safeResult === false) {
        throw RrdException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! /      opcache.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\OpcacheException;

/**
 * @param string $filename
 * @throws OpcacheException
 *
 */
function opcache_compile_file(string $filename): void
{
    error_clear_last();
    $safeResult = \opcache_compile_file($filename);
    if ($safeResult === false) {
        throw OpcacheException::createFromPhpError();
    }
}


/**
 * @param bool $include_scripts
 * @return array
 * @throws OpcacheException
 *
 */
function opcache_get_status(bool $include_scripts = true): array
{
    error_clear_last();
    $safeResult = \opcache_get_status($include_scripts);
    if ($safeResult === false) {
        throw OpcacheException::createFromPhpError();
    }
    return $safeResult;
}
PK       ! U)r`  `    functionsList.phpnu Iw        <?php

return [
    'apache_getenv',
    'apache_get_version',
    'apache_lookup_uri',
    'apache_setenv',
    'apcu_cache_info',
    'apcu_cas',
    'apcu_dec',
    'apcu_fetch',
    'apcu_inc',
    'apcu_sma_info',
    'assert_options',
    'base64_decode',
    'bindtextdomain',
    'bzclose',
    'bzflush',
    'bzopen',
    'bzread',
    'bzwrite',
    'chdir',
    'chgrp',
    'chmod',
    'chown',
    'chroot',
    'class_alias',
    'class_implements',
    'class_parents',
    'class_uses',
    'cli_set_process_title',
    'closelog',
    'com_create_guid',
    'com_event_sink',
    'com_load_typelib',
    'com_print_typeinfo',
    'convert_uudecode',
    'copy',
    'cubrid_bind',
    'cubrid_column_names',
    'cubrid_column_types',
    'cubrid_col_size',
    'cubrid_commit',
    'cubrid_connect',
    'cubrid_connect_with_url',
    'cubrid_current_oid',
    'cubrid_disconnect',
    'cubrid_drop',
    'cubrid_free_result',
    'cubrid_get_charset',
    'cubrid_get_class_name',
    'cubrid_get_client_info',
    'cubrid_get_db_parameter',
    'cubrid_get_query_timeout',
    'cubrid_get_server_info',
    'cubrid_insert_id',
    'cubrid_lob2_bind',
    'cubrid_lob2_close',
    'cubrid_lob2_export',
    'cubrid_lob2_import',
    'cubrid_lob2_new',
    'cubrid_lob2_read',
    'cubrid_lob2_seek',
    'cubrid_lob2_seek64',
    'cubrid_lob2_size',
    'cubrid_lob2_size64',
    'cubrid_lob2_tell',
    'cubrid_lob2_tell64',
    'cubrid_lob2_write',
    'cubrid_lob_close',
    'cubrid_lob_export',
    'cubrid_lob_get',
    'cubrid_lob_send',
    'cubrid_lob_size',
    'cubrid_lock_read',
    'cubrid_lock_write',
    'cubrid_move_cursor',
    'cubrid_next_result',
    'cubrid_pconnect',
    'cubrid_pconnect_with_url',
    'cubrid_prepare',
    'cubrid_put',
    'cubrid_rollback',
    'cubrid_schema',
    'cubrid_seq_drop',
    'cubrid_seq_insert',
    'cubrid_seq_put',
    'cubrid_set_add',
    'cubrid_set_autocommit',
    'cubrid_set_db_parameter',
    'cubrid_set_drop',
    'cubrid_set_query_timeout',
    'curl_copy_handle',
    'curl_escape',
    'curl_exec',
    'curl_getinfo',
    'curl_init',
    'curl_multi_info_read',
    'curl_multi_init',
    'curl_multi_setopt',
    'curl_setopt',
    'curl_share_setopt',
    'curl_unescape',
    'date_parse_from_format',
    'date_sunrise',
    'date_sunset',
    'db2_autocommit',
    'db2_bind_param',
    'db2_client_info',
    'db2_close',
    'db2_commit',
    'db2_execute',
    'db2_free_result',
    'db2_free_stmt',
    'db2_get_option',
    'db2_pclose',
    'db2_rollback',
    'db2_server_info',
    'db2_set_option',
    'define',
    'deflate_add',
    'deflate_init',
    'dir',
    'disk_free_space',
    'disk_total_space',
    'dl',
    'dns_get_record',
    'eio_busy',
    'eio_chmod',
    'eio_chown',
    'eio_close',
    'eio_custom',
    'eio_dup2',
    'eio_event_loop',
    'eio_fallocate',
    'eio_fchmod',
    'eio_fchown',
    'eio_fdatasync',
    'eio_fstat',
    'eio_fstatvfs',
    'eio_fsync',
    'eio_ftruncate',
    'eio_futime',
    'eio_grp',
    'eio_lstat',
    'eio_mkdir',
    'eio_mknod',
    'eio_nop',
    'eio_readahead',
    'eio_readdir',
    'eio_readlink',
    'eio_rename',
    'eio_rmdir',
    'eio_seek',
    'eio_sendfile',
    'eio_stat',
    'eio_statvfs',
    'eio_symlink',
    'eio_sync',
    'eio_syncfs',
    'eio_sync_file_range',
    'eio_truncate',
    'eio_unlink',
    'eio_utime',
    'eio_write',
    'error_log',
    'exec',
    'fastcgi_finish_request',
    'fbird_blob_cancel',
    'fclose',
    'fdatasync',
    'fflush',
    'fgetcsv',
    'file',
    'fileatime',
    'filectime',
    'fileinode',
    'filemtime',
    'fileowner',
    'fileperms',
    'filesize',
    'filetype',
    'file_get_contents',
    'file_put_contents',
    'filter_input_array',
    'filter_var_array',
    'finfo_close',
    'finfo_open',
    'flock',
    'fopen',
    'fputcsv',
    'fread',
    'fsockopen',
    'fstat',
    'fsync',
    'ftell',
    'ftp_alloc',
    'ftp_append',
    'ftp_cdup',
    'ftp_chdir',
    'ftp_chmod',
    'ftp_close',
    'ftp_connect',
    'ftp_delete',
    'ftp_fget',
    'ftp_fput',
    'ftp_get',
    'ftp_login',
    'ftp_mkdir',
    'ftp_mlsd',
    'ftp_nb_put',
    'ftp_nlist',
    'ftp_pasv',
    'ftp_put',
    'ftp_pwd',
    'ftp_raw',
    'ftp_rename',
    'ftp_rmdir',
    'ftp_site',
    'ftp_size',
    'ftp_ssl_connect',
    'ftp_systype',
    'ftruncate',
    'fwrite',
    'getcwd',
    'gethostname',
    'getimagesize',
    'getlastmod',
    'getmygid',
    'getmyinode',
    'getmypid',
    'getmyuid',
    'getopt',
    'getprotobyname',
    'getprotobynumber',
    'getrusage',
    'getservbyport',
    'get_cfg_var',
    'get_headers',
    'get_include_path',
    'get_meta_tags',
    'glob',
    'gmmktime',
    'gmstrftime',
    'gnupg_adddecryptkey',
    'gnupg_addencryptkey',
    'gnupg_addsignkey',
    'gnupg_cleardecryptkeys',
    'gnupg_clearencryptkeys',
    'gnupg_clearsignkeys',
    'gnupg_setarmor',
    'gnupg_setsignmode',
    'gzclose',
    'gzcompress',
    'gzdecode',
    'gzdeflate',
    'gzencode',
    'gzfile',
    'gzgets',
    'gzinflate',
    'gzopen',
    'gzpassthru',
    'gzread',
    'gzrewind',
    'gztell',
    'gzuncompress',
    'gzwrite',
    'hash_file',
    'hash_hmac_file',
    'hash_update_file',
    'header_register_callback',
    'hex2bin',
    'highlight_file',
    'highlight_string',
    'hrtime',
    'ibase_add_user',
    'ibase_backup',
    'ibase_blob_cancel',
    'ibase_blob_create',
    'ibase_blob_get',
    'ibase_close',
    'ibase_commit',
    'ibase_commit_ret',
    'ibase_connect',
    'ibase_delete_user',
    'ibase_drop_db',
    'ibase_free_event_handler',
    'ibase_free_query',
    'ibase_free_result',
    'ibase_maintain_db',
    'ibase_modify_user',
    'ibase_name_result',
    'ibase_pconnect',
    'ibase_restore',
    'ibase_rollback',
    'ibase_rollback_ret',
    'ibase_service_attach',
    'ibase_service_detach',
    'iconv',
    'iconv_get_encoding',
    'iconv_mime_decode',
    'iconv_mime_encode',
    'iconv_set_encoding',
    'iconv_strlen',
    'idate',
    'imageaffine',
    'imageaffinematrixconcat',
    'imageaffinematrixget',
    'imagealphablending',
    'imageantialias',
    'imagearc',
    'imageavif',
    'imagebmp',
    'imagechar',
    'imagecharup',
    'imagecolorat',
    'imagecolordeallocate',
    'imagecolormatch',
    'imagecolorset',
    'imageconvolution',
    'imagecopy',
    'imagecopymerge',
    'imagecopymergegray',
    'imagecopyresampled',
    'imagecopyresized',
    'imagecreate',
    'imagecreatefromavif',
    'imagecreatefrombmp',
    'imagecreatefromgd',
    'imagecreatefromgd2',
    'imagecreatefromgd2part',
    'imagecreatefromgif',
    'imagecreatefromjpeg',
    'imagecreatefrompng',
    'imagecreatefromstring',
    'imagecreatefromtga',
    'imagecreatefromwbmp',
    'imagecreatefromwebp',
    'imagecreatefromxbm',
    'imagecreatefromxpm',
    'imagecreatetruecolor',
    'imagecrop',
    'imagecropauto',
    'imagedashedline',
    'imagedestroy',
    'imageellipse',
    'imagefill',
    'imagefilledarc',
    'imagefilledellipse',
    'imagefilledrectangle',
    'imagefilltoborder',
    'imagefilter',
    'imageflip',
    'imageftbbox',
    'imagefttext',
    'imagegammacorrect',
    'imagegd',
    'imagegd2',
    'imagegif',
    'imagegrabscreen',
    'imagegrabwindow',
    'imagejpeg',
    'imagelayereffect',
    'imageline',
    'imageloadfont',
    'imagepng',
    'imagerectangle',
    'imageresolution',
    'imagerotate',
    'imagesavealpha',
    'imagescale',
    'imagesetbrush',
    'imagesetclip',
    'imagesetinterpolation',
    'imagesetpixel',
    'imagesetstyle',
    'imagesetthickness',
    'imagesettile',
    'imagestring',
    'imagestringup',
    'imagetruecolortopalette',
    'imagettfbbox',
    'imagettftext',
    'imagewbmp',
    'imagewebp',
    'imagexbm',
    'image_type_to_extension',
    'imap_8bit',
    'imap_append',
    'imap_base64',
    'imap_binary',
    'imap_body',
    'imap_bodystruct',
    'imap_check',
    'imap_clearflag_full',
    'imap_close',
    'imap_createmailbox',
    'imap_deletemailbox',
    'imap_fetchbody',
    'imap_fetchheader',
    'imap_fetchmime',
    'imap_fetchstructure',
    'imap_fetch_overview',
    'imap_gc',
    'imap_getacl',
    'imap_getmailboxes',
    'imap_getsubscribed',
    'imap_headerinfo',
    'imap_headers',
    'imap_listscan',
    'imap_lsub',
    'imap_mail',
    'imap_mailboxmsginfo',
    'imap_mail_compose',
    'imap_mail_copy',
    'imap_mail_move',
    'imap_mime_header_decode',
    'imap_mutf7_to_utf8',
    'imap_num_msg',
    'imap_open',
    'imap_qprint',
    'imap_renamemailbox',
    'imap_rfc822_write_address',
    'imap_savebody',
    'imap_setacl',
    'imap_setflag_full',
    'imap_set_quota',
    'imap_sort',
    'imap_status',
    'imap_subscribe',
    'imap_thread',
    'imap_timeout',
    'imap_undelete',
    'imap_unsubscribe',
    'imap_utf8_to_mutf7',
    'inet_ntop',
    'inet_pton',
    'inflate_add',
    'inflate_get_read_len',
    'inflate_get_status',
    'inflate_init',
    'ini_get',
    'ini_set',
    'inotify_init',
    'inotify_rm_watch',
    'iptcembed',
    'iptcparse',
    'json_decode',
    'json_encode',
    'lchgrp',
    'lchown',
    'ldap_8859_to_t61',
    'ldap_add',
    'ldap_bind',
    'ldap_compare',
    'ldap_control_paged_result',
    'ldap_control_paged_result_response',
    'ldap_count_entries',
    'ldap_delete',
    'ldap_dn2ufn',
    'ldap_exop',
    'ldap_exop_passwd',
    'ldap_exop_whoami',
    'ldap_explode_dn',
    'ldap_first_attribute',
    'ldap_first_entry',
    'ldap_free_result',
    'ldap_get_attributes',
    'ldap_get_dn',
    'ldap_get_entries',
    'ldap_get_option',
    'ldap_get_values',
    'ldap_get_values_len',
    'ldap_modify_batch',
    'ldap_mod_add',
    'ldap_mod_del',
    'ldap_mod_replace',
    'ldap_next_attribute',
    'ldap_parse_exop',
    'ldap_parse_result',
    'ldap_rename',
    'ldap_sasl_bind',
    'ldap_set_option',
    'ldap_unbind',
    'libxml_set_external_entity_loader',
    'link',
    'lstat',
    'lzf_compress',
    'lzf_decompress',
    'mailparse_msg_extract_part_file',
    'mailparse_msg_free',
    'mailparse_msg_parse',
    'mailparse_msg_parse_file',
    'mailparse_stream_encode',
    'mb_chr',
    'mb_convert_encoding',
    'mb_convert_variables',
    'mb_detect_order',
    'mb_encoding_aliases',
    'mb_eregi_replace',
    'mb_ereg_replace',
    'mb_ereg_replace_callback',
    'mb_ereg_search_getregs',
    'mb_ereg_search_init',
    'mb_ereg_search_regs',
    'mb_ereg_search_setpos',
    'mb_get_info',
    'mb_http_output',
    'mb_internal_encoding',
    'mb_ord',
    'mb_parse_str',
    'mb_regex_encoding',
    'mb_send_mail',
    'mb_split',
    'md5_file',
    'mime_content_type',
    'mkdir',
    'mktime',
    'msg_get_queue',
    'msg_queue_exists',
    'msg_receive',
    'msg_remove_queue',
    'msg_send',
    'msg_set_queue',
    'msg_stat_queue',
    'mysql_close',
    'mysql_connect',
    'mysql_create_db',
    'mysql_data_seek',
    'mysql_db_name',
    'mysql_db_query',
    'mysql_drop_db',
    'mysql_fetch_lengths',
    'mysql_field_flags',
    'mysql_field_len',
    'mysql_field_name',
    'mysql_field_seek',
    'mysql_free_result',
    'mysql_get_host_info',
    'mysql_get_proto_info',
    'mysql_get_server_info',
    'mysql_info',
    'mysql_list_dbs',
    'mysql_list_fields',
    'mysql_list_processes',
    'mysql_list_tables',
    'mysql_num_fields',
    'mysql_num_rows',
    'mysql_query',
    'mysql_real_escape_string',
    'mysql_result',
    'mysql_select_db',
    'mysql_set_charset',
    'mysql_tablename',
    'mysql_thread_id',
    'mysql_unbuffered_query',
    'ob_clean',
    'ob_end_clean',
    'ob_end_flush',
    'ob_flush',
    'ob_get_clean',
    'ob_start',
    'oci_bind_array_by_name',
    'oci_bind_by_name',
    'oci_cancel',
    'oci_commit',
    'oci_connect',
    'oci_define_by_name',
    'oci_execute',
    'oci_field_name',
    'oci_field_precision',
    'oci_field_scale',
    'oci_field_size',
    'oci_field_type',
    'oci_field_type_raw',
    'oci_free_descriptor',
    'oci_free_statement',
    'oci_new_collection',
    'oci_new_connect',
    'oci_new_cursor',
    'oci_new_descriptor',
    'oci_num_rows',
    'oci_parse',
    'oci_pconnect',
    'oci_register_taf_callback',
    'oci_result',
    'oci_rollback',
    'oci_server_version',
    'oci_set_action',
    'oci_set_call_timeout',
    'oci_set_client_identifier',
    'oci_set_client_info',
    'oci_set_db_operation',
    'oci_set_edition',
    'oci_set_module_name',
    'oci_set_prefetch',
    'oci_statement_type',
    'oci_unregister_taf_callback',
    'odbc_autocommit',
    'odbc_binmode',
    'odbc_columnprivileges',
    'odbc_columns',
    'odbc_commit',
    'odbc_connect',
    'odbc_cursor',
    'odbc_data_source',
    'odbc_exec',
    'odbc_execute',
    'odbc_fetch_into',
    'odbc_field_len',
    'odbc_field_name',
    'odbc_field_num',
    'odbc_field_scale',
    'odbc_field_type',
    'odbc_foreignkeys',
    'odbc_gettypeinfo',
    'odbc_longreadlen',
    'odbc_num_fields',
    'odbc_pconnect',
    'odbc_prepare',
    'odbc_primarykeys',
    'odbc_procedurecolumns',
    'odbc_procedures',
    'odbc_result',
    'odbc_result_all',
    'odbc_rollback',
    'odbc_setoption',
    'odbc_specialcolumns',
    'odbc_statistics',
    'odbc_tableprivileges',
    'odbc_tables',
    'opcache_compile_file',
    'opcache_get_status',
    'opendir',
    'openlog',
    'openssl_cipher_iv_length',
    'openssl_cms_decrypt',
    'openssl_cms_encrypt',
    'openssl_cms_read',
    'openssl_cms_sign',
    'openssl_cms_verify',
    'openssl_csr_export',
    'openssl_csr_export_to_file',
    'openssl_csr_get_public_key',
    'openssl_csr_get_subject',
    'openssl_csr_new',
    'openssl_csr_sign',
    'openssl_decrypt',
    'openssl_dh_compute_key',
    'openssl_digest',
    'openssl_encrypt',
    'openssl_get_curve_names',
    'openssl_open',
    'openssl_pbkdf2',
    'openssl_pkcs7_decrypt',
    'openssl_pkcs7_encrypt',
    'openssl_pkcs7_read',
    'openssl_pkcs7_sign',
    'openssl_pkcs12_export',
    'openssl_pkcs12_export_to_file',
    'openssl_pkcs12_read',
    'openssl_pkey_derive',
    'openssl_pkey_export',
    'openssl_pkey_export_to_file',
    'openssl_pkey_get_details',
    'openssl_pkey_get_private',
    'openssl_pkey_get_public',
    'openssl_pkey_new',
    'openssl_private_decrypt',
    'openssl_private_encrypt',
    'openssl_public_decrypt',
    'openssl_public_encrypt',
    'openssl_seal',
    'openssl_sign',
    'openssl_spki_export',
    'openssl_spki_export_challenge',
    'openssl_spki_new',
    'openssl_spki_verify',
    'openssl_verify',
    'openssl_x509_checkpurpose',
    'openssl_x509_export',
    'openssl_x509_export_to_file',
    'openssl_x509_fingerprint',
    'openssl_x509_read',
    'output_add_rewrite_var',
    'output_reset_rewrite_vars',
    'parse_ini_file',
    'parse_ini_string',
    'parse_url',
    'passthru',
    'pclose',
    'pcntl_getpriority',
    'pcntl_setpriority',
    'pcntl_signal',
    'pcntl_signal_dispatch',
    'pcntl_sigprocmask',
    'pcntl_sigtimedwait',
    'pcntl_sigwaitinfo',
    'pfsockopen',
    'pg_cancel_query',
    'pg_connect',
    'pg_connection_reset',
    'pg_convert',
    'pg_copy_from',
    'pg_copy_to',
    'pg_delete',
    'pg_end_copy',
    'pg_execute',
    'pg_field_num',
    'pg_field_table',
    'pg_flush',
    'pg_free_result',
    'pg_host',
    'pg_insert',
    'pg_last_oid',
    'pg_lo_close',
    'pg_lo_export',
    'pg_lo_import',
    'pg_lo_open',
    'pg_lo_read',
    'pg_lo_seek',
    'pg_lo_truncate',
    'pg_lo_unlink',
    'pg_lo_write',
    'pg_meta_data',
    'pg_parameter_status',
    'pg_pconnect',
    'pg_ping',
    'pg_prepare',
    'pg_put_line',
    'pg_query',
    'pg_query_params',
    'pg_result_error_field',
    'pg_result_seek',
    'pg_select',
    'pg_socket',
    'pg_trace',
    'pg_update',
    'phpcredits',
    'phpinfo',
    'php_sapi_name',
    'popen',
    'posix_access',
    'posix_getgrgid',
    'posix_getgrnam',
    'posix_getgroups',
    'posix_getlogin',
    'posix_getpgid',
    'posix_getpwuid',
    'posix_getrlimit',
    'posix_getsid',
    'posix_initgroups',
    'posix_kill',
    'posix_mkfifo',
    'posix_mknod',
    'posix_setegid',
    'posix_seteuid',
    'posix_setgid',
    'posix_setpgid',
    'posix_setrlimit',
    'posix_setsid',
    'posix_setuid',
    'posix_times',
    'posix_uname',
    'preg_grep',
    'preg_match',
    'preg_match_all',
    'preg_replace',
    'preg_replace_callback',
    'preg_replace_callback_array',
    'preg_split',
    'proc_close',
    'proc_nice',
    'proc_open',
    'pspell_add_to_personal',
    'pspell_add_to_session',
    'pspell_clear_session',
    'pspell_config_create',
    'pspell_config_data_dir',
    'pspell_config_dict_dir',
    'pspell_config_ignore',
    'pspell_config_mode',
    'pspell_config_personal',
    'pspell_config_repl',
    'pspell_config_runtogether',
    'pspell_config_save_repl',
    'pspell_new',
    'pspell_new_config',
    'pspell_new_personal',
    'pspell_save_wordlist',
    'pspell_store_replacement',
    'ps_add_launchlink',
    'ps_add_locallink',
    'ps_add_note',
    'ps_add_pdflink',
    'ps_add_weblink',
    'ps_arc',
    'ps_arcn',
    'ps_begin_page',
    'ps_begin_pattern',
    'ps_begin_template',
    'ps_circle',
    'ps_clip',
    'ps_close',
    'ps_closepath',
    'ps_closepath_stroke',
    'ps_close_image',
    'ps_continue_text',
    'ps_curveto',
    'ps_delete',
    'ps_end_page',
    'ps_end_pattern',
    'ps_end_template',
    'ps_fill',
    'ps_fill_stroke',
    'ps_get_parameter',
    'ps_hyphenate',
    'ps_include_file',
    'ps_lineto',
    'ps_moveto',
    'ps_new',
    'ps_open_file',
    'ps_place_image',
    'ps_rect',
    'ps_restore',
    'ps_rotate',
    'ps_save',
    'ps_scale',
    'ps_setcolor',
    'ps_setdash',
    'ps_setflat',
    'ps_setfont',
    'ps_setgray',
    'ps_setlinecap',
    'ps_setlinejoin',
    'ps_setlinewidth',
    'ps_setmiterlimit',
    'ps_setoverprintmode',
    'ps_setpolydash',
    'ps_set_border_color',
    'ps_set_border_dash',
    'ps_set_border_style',
    'ps_set_info',
    'ps_set_parameter',
    'ps_set_text_pos',
    'ps_set_value',
    'ps_shading',
    'ps_shading_pattern',
    'ps_shfill',
    'ps_show',
    'ps_show2',
    'ps_show_xy',
    'ps_show_xy2',
    'ps_stroke',
    'ps_symbol',
    'ps_translate',
    'putenv',
    'readfile',
    'readgzfile',
    'readline_add_history',
    'readline_callback_handler_install',
    'readline_clear_history',
    'readline_completion_function',
    'readline_read_history',
    'readline_write_history',
    'readlink',
    'realpath',
    'register_tick_function',
    'rename',
    'rewind',
    'rmdir',
    'rpmaddtag',
    'rrd_create',
    'rrd_first',
    'rrd_graph',
    'rrd_info',
    'rrd_lastupdate',
    'rrd_restore',
    'rrd_tune',
    'rrd_update',
    'rrd_xport',
    'sapi_windows_cp_conv',
    'sapi_windows_cp_set',
    'sapi_windows_generate_ctrl_event',
    'sapi_windows_set_ctrl_handler',
    'sapi_windows_vt100_support',
    'scandir',
    'sem_acquire',
    'sem_get',
    'sem_release',
    'sem_remove',
    'session_abort',
    'session_cache_expire',
    'session_cache_limiter',
    'session_create_id',
    'session_decode',
    'session_destroy',
    'session_encode',
    'session_gc',
    'session_id',
    'session_module_name',
    'session_name',
    'session_regenerate_id',
    'session_reset',
    'session_save_path',
    'session_start',
    'session_unset',
    'session_write_close',
    'settype',
    'set_include_path',
    'set_time_limit',
    'sha1_file',
    'shell_exec',
    'shmop_delete',
    'shmop_read',
    'shm_attach',
    'shm_detach',
    'shm_put_var',
    'shm_remove',
    'shm_remove_var',
    'simplexml_import_dom',
    'simplexml_load_file',
    'simplexml_load_string',
    'socket_accept',
    'socket_addrinfo_bind',
    'socket_addrinfo_connect',
    'socket_addrinfo_lookup',
    'socket_bind',
    'socket_connect',
    'socket_create',
    'socket_create_listen',
    'socket_create_pair',
    'socket_export_stream',
    'socket_getpeername',
    'socket_getsockname',
    'socket_get_option',
    'socket_import_stream',
    'socket_listen',
    'socket_read',
    'socket_send',
    'socket_sendmsg',
    'socket_sendto',
    'socket_set_block',
    'socket_set_nonblock',
    'socket_set_option',
    'socket_shutdown',
    'socket_write',
    'socket_wsaprotocol_info_export',
    'socket_wsaprotocol_info_import',
    'socket_wsaprotocol_info_release',
    'sodium_crypto_aead_aes256gcm_decrypt',
    'sodium_crypto_aead_chacha20poly1305_decrypt',
    'sodium_crypto_aead_chacha20poly1305_encrypt',
    'sodium_crypto_aead_chacha20poly1305_ietf_decrypt',
    'sodium_crypto_aead_chacha20poly1305_ietf_encrypt',
    'sodium_crypto_aead_xchacha20poly1305_ietf_decrypt',
    'sodium_crypto_aead_xchacha20poly1305_ietf_encrypt',
    'sodium_crypto_box_open',
    'sodium_crypto_box_seal_open',
    'sodium_crypto_generichash_update',
    'sodium_crypto_secretbox_open',
    'sodium_crypto_sign_open',
    'solr_get_version',
    'spl_autoload_register',
    'spl_autoload_unregister',
    'sqlsrv_begin_transaction',
    'sqlsrv_cancel',
    'sqlsrv_client_info',
    'sqlsrv_close',
    'sqlsrv_commit',
    'sqlsrv_configure',
    'sqlsrv_execute',
    'sqlsrv_fetch',
    'sqlsrv_fetch_array',
    'sqlsrv_fetch_object',
    'sqlsrv_free_stmt',
    'sqlsrv_get_field',
    'sqlsrv_next_result',
    'sqlsrv_num_fields',
    'sqlsrv_num_rows',
    'sqlsrv_prepare',
    'sqlsrv_query',
    'sqlsrv_rollback',
    'ssdeep_fuzzy_compare',
    'ssdeep_fuzzy_hash',
    'ssdeep_fuzzy_hash_filename',
    'ssh2_auth_agent',
    'ssh2_auth_hostbased_file',
    'ssh2_auth_password',
    'ssh2_auth_pubkey_file',
    'ssh2_connect',
    'ssh2_disconnect',
    'ssh2_exec',
    'ssh2_forward_accept',
    'ssh2_forward_listen',
    'ssh2_publickey_add',
    'ssh2_publickey_init',
    'ssh2_publickey_remove',
    'ssh2_scp_recv',
    'ssh2_scp_send',
    'ssh2_send_eof',
    'ssh2_sftp',
    'ssh2_sftp_chmod',
    'ssh2_sftp_mkdir',
    'ssh2_sftp_rename',
    'ssh2_sftp_rmdir',
    'ssh2_sftp_symlink',
    'ssh2_sftp_unlink',
    'ssh2_shell',
    'stream_context_set_params',
    'stream_copy_to_stream',
    'stream_filter_append',
    'stream_filter_prepend',
    'stream_filter_register',
    'stream_filter_remove',
    'stream_get_contents',
    'stream_get_line',
    'stream_isatty',
    'stream_resolve_include_path',
    'stream_set_blocking',
    'stream_set_timeout',
    'stream_socket_accept',
    'stream_socket_client',
    'stream_socket_get_name',
    'stream_socket_pair',
    'stream_socket_server',
    'stream_socket_shutdown',
    'stream_supports_lock',
    'stream_wrapper_register',
    'stream_wrapper_restore',
    'stream_wrapper_unregister',
    'strftime',
    'strptime',
    'strtotime',
    'swoole_async_dns_lookup',
    'swoole_async_readfile',
    'swoole_async_write',
    'swoole_async_writefile',
    'swoole_event_defer',
    'swoole_event_del',
    'swoole_event_write',
    'symlink',
    'syslog',
    'system',
    'sys_getloadavg',
    'tempnam',
    'timezone_name_from_abbr',
    'time_nanosleep',
    'time_sleep_until',
    'tmpfile',
    'touch',
    'unixtojd',
    'unlink',
    'unpack',
    'unserialize',
    'uopz_extend',
    'uopz_implement',
    'variant_date_to_timestamp',
    'variant_round',
    'virtual',
    'xdiff_file_bdiff',
    'xdiff_file_bpatch',
    'xdiff_file_diff',
    'xdiff_file_diff_binary',
    'xdiff_file_patch_binary',
    'xdiff_file_rabdiff',
    'xdiff_string_bpatch',
    'xdiff_string_patch',
    'xdiff_string_patch_binary',
    'xmlrpc_set_type',
    'xml_parser_free',
    'xml_set_character_data_handler',
    'xml_set_default_handler',
    'xml_set_element_handler',
    'xml_set_end_namespace_decl_handler',
    'xml_set_external_entity_ref_handler',
    'xml_set_notation_decl_handler',
    'xml_set_object',
    'xml_set_processing_instruction_handler',
    'xml_set_start_namespace_decl_handler',
    'xml_set_unparsed_entity_decl_handler',
    'yaml_parse',
    'yaml_parse_file',
    'yaml_parse_url',
    'yaz_ccl_parse',
    'yaz_close',
    'yaz_connect',
    'yaz_database',
    'yaz_element',
    'yaz_present',
    'yaz_search',
    'yaz_wait',
    'zip_entry_close',
    'zip_entry_compressedsize',
    'zip_entry_compressionmethod',
    'zip_entry_filesize',
    'zip_entry_name',
    'zip_entry_open',
    'zip_entry_read',
    'zlib_decode',
];
PK       ! ROƉ    
  ibmDb2.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\IbmDb2Exception;

/**
 * @param resource $connection
 * @param \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON $value
 * @return \DB2_AUTOCOMMIT_OFF|\DB2_AUTOCOMMIT_ON|bool
 * @throws IbmDb2Exception
 *
 */
function db2_autocommit($connection, $value = null)
{
    error_clear_last();
    if ($value !== null) {
        $safeResult = \db2_autocommit($connection, $value);
    } else {
        $safeResult = \db2_autocommit($connection);
    }
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $stmt
 * @param int $parameter_number
 * @param string $variable_name
 * @param int $parameter_type
 * @param int $data_type
 * @param int $precision
 * @param int $scale
 * @throws IbmDb2Exception
 *
 */
function db2_bind_param($stmt, int $parameter_number, string $variable_name, ?int $parameter_type = null, int $data_type = 0, int $precision = -1, int $scale = 0): void
{
    error_clear_last();
    if ($scale !== 0) {
        $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale);
    } elseif ($precision !== -1) {
        $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision);
    } elseif ($data_type !== 0) {
        $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type);
    } elseif ($parameter_type !== null) {
        $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type);
    } else {
        $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name);
    }
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @return \stdClass
 * @throws IbmDb2Exception
 *
 */
function db2_client_info($connection): \stdClass
{
    error_clear_last();
    $safeResult = \db2_client_info($connection);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $connection
 * @throws IbmDb2Exception
 *
 */
function db2_close($connection): void
{
    error_clear_last();
    $safeResult = \db2_close($connection);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @throws IbmDb2Exception
 *
 */
function db2_commit($connection): void
{
    error_clear_last();
    $safeResult = \db2_commit($connection);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @param array $parameters
 * @throws IbmDb2Exception
 *
 */
function db2_execute($stmt, ?array $parameters = null): void
{
    error_clear_last();
    if ($parameters !== null) {
        $safeResult = \db2_execute($stmt, $parameters);
    } else {
        $safeResult = \db2_execute($stmt);
    }
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @throws IbmDb2Exception
 *
 */
function db2_free_result($stmt): void
{
    error_clear_last();
    $safeResult = \db2_free_result($stmt);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $stmt
 * @throws IbmDb2Exception
 *
 */
function db2_free_stmt($stmt): void
{
    error_clear_last();
    $safeResult = \db2_free_stmt($stmt);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $resource
 * @param string $option
 * @return string
 * @throws IbmDb2Exception
 *
 */
function db2_get_option($resource, string $option): string
{
    error_clear_last();
    $safeResult = \db2_get_option($resource, $option);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $resource
 * @throws IbmDb2Exception
 *
 */
function db2_pclose($resource): void
{
    error_clear_last();
    $safeResult = \db2_pclose($resource);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @throws IbmDb2Exception
 *
 */
function db2_rollback($connection): void
{
    error_clear_last();
    $safeResult = \db2_rollback($connection);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}


/**
 * @param resource $connection
 * @return \stdClass
 * @throws IbmDb2Exception
 *
 */
function db2_server_info($connection): \stdClass
{
    error_clear_last();
    $safeResult = \db2_server_info($connection);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param resource $resource
 * @param array $options
 * @param int $type
 * @throws IbmDb2Exception
 *
 */
function db2_set_option($resource, array $options, int $type): void
{
    error_clear_last();
    $safeResult = \db2_set_option($resource, $options, $type);
    if ($safeResult === false) {
        throw IbmDb2Exception::createFromPhpError();
    }
}
PK       ! ḵ      url.phpnu Iw        <?php

namespace Safe;

use Safe\Exceptions\UrlException;

/**
 * @param string $string
 * @param bool $strict
 * @return string
 * @throws UrlException
 *
 */
function base64_decode(string $string, bool $strict = false): string
{
    error_clear_last();
    $safeResult = \base64_decode($string, $strict);
    if ($safeResult === false) {
        throw UrlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $url
 * @param bool $associative
 * @param null|resource $context
 * @return array
 * @throws UrlException
 *
 */
function get_headers(string $url, bool $associative = false, $context = null): array
{
    error_clear_last();
    if ($context !== null) {
        $safeResult = \get_headers($url, $associative, $context);
    } else {
        $safeResult = \get_headers($url, $associative);
    }
    if ($safeResult === false) {
        throw UrlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $filename
 * @param bool $use_include_path
 * @return array
 * @throws UrlException
 *
 */
function get_meta_tags(string $filename, bool $use_include_path = false): array
{
    error_clear_last();
    $safeResult = \get_meta_tags($filename, $use_include_path);
    if ($safeResult === false) {
        throw UrlException::createFromPhpError();
    }
    return $safeResult;
}


/**
 * @param string $url
 * @param int $component
 * @return array|int|null|string
 * @throws UrlException
 *
 */
function parse_url(string $url, int $component = -1)
{
    error_clear_last();
    $safeResult = \parse_url($url, $component);
    if ($safeResult === false) {
        throw UrlException::createFromPhpError();
    }
    return $safeResult;
}
PK         ! a   a                   php.ininu         PK         ! ޒ}  }  
               Dockerfilenu         PK         ! R;.  .              O  start-containernu         PK         ! FQ  Q                supervisord.confnu         PK         ! 3"                M  errorfunc.phpnu Iw        PK         ! I:B	  B	                zip.phpnu Iw        PK         !                    spl.phpnu Iw        PK         !                 '  uopz.phpnu Iw        PK         ! kD$                *  pcre.phpnu Iw        PK         ! Vu
  
              Z6  funchand.phpnu Iw        PK         ! L9  9              8  rpminfo.phpnu Iw        PK         ! {    
            :  sqlsrv.phpnu Iw        PK         ! n~  ~  
            ;X  xmlrpc.phpnu Iw        PK         ! _                Y  json.phpnu Iw        PK         ! Sg(  (              [  fpm.phpnu Iw        PK         ! aeO  O  	            ]]  pcntl.phpnu Iw        PK         ! !P  P              i  imap.phpnu Iw        PK         ! D'T  T                var.phpnu Iw        PK         ! n~ɋ    	            ~  bzip2.phpnu Iw        PK         ! ;B                P  strings.phpnu Iw        PK         ! zNiT/  T/  	            Z  mysql.phpnu Iw        PK         ! Ch.
  
                mailparse.phpnu Iw        PK         ! `  `              . hash.phpnu Iw        PK         ! lƔ	  	  	             array.phpnu Iw        PK         ! ӮK8  8               oci8.phpnu Iw        PK         !  0M  M              H readline.phpnu Iw        PK         ! Ȯ                Q rector-migrate.phpnu Iw        PK         ! %W                ZC fileinfo.phpnu Iw        PK         ! cH    
            2H libxml.phpnu Iw        PK         ! NtD  D              J gmp.phpnu Iw        PK         ! |IG  IG  	            K pgsql.phpnu Iw        PK         ! +vkR	  R	               dir.phpnu Iw        PK         ! $[  [  
             cubrid.phpnu Iw        PK         ! GJU&  U&               ftp.phpnu Iw        PK         ! 8MA  A              V ldap.phpnu Iw        PK         ! "`  `              s` network.phpnu Iw        PK         ! s                v calendar.phpnu Iw        PK         ! L >    	            "x shmop.phpnu Iw        PK         ! UT(  T(              ${ sockets.phpnu Iw        PK         ! /~GI  GI               filesystem.phpnu Iw        PK         ! M5Y  5Y              8 ps.phpnu Iw        PK         ! "	-  	-              F ssh2.phpnu Iw        PK         ! x@&  &              s mbstring.phpnu Iw        PK         ! 2Z
  
              # yaz.phpnu Iw        PK         ! Lᥜ                v session.phpnu Iw        PK         ! ZͶ    	            M posix.phpnu Iw        PK         ! ߻                g inotify.phpnu Iw        PK         ! %'aw
  w
              d exec.phpnu Iw        PK         ! 5*^3  ^3  	             ibase.phpnu Iw        PK         ! ;    
             pspell.phpnu Iw        PK         ! "e

  

              . com.phpnu Iw        PK         !                 	9 gettext.phpnu Iw        PK         ! n  n              : misc.phpnu Iw        PK         ! (*                O lzf.phpnu Iw        PK         ! B]  ]  
            uR mysqli.phpnu Iw        PK         ! ݙ)W                T xml.phpnu Iw        PK         !     	            +d image.phpnu Iw        PK         ! E62  2              ~ curl.phpnu Iw        PK         ! r*Z  Z               apcu.phpnu Iw        PK         ! [$[!  !              z zlib.phpnu Iw        PK         ! ` iUq  Uq              l7 openssl.phpnu Iw        PK         ! )ZOs  s  
             ssdeep.phpnu Iw        PK         ! @Ze  e               sem.phpnu Iw        PK         ! 9FZI  I              E eio.phpnu Iw        PK         ! a\    
            m swoole.phpnu Iw        PK         ! }	  	  
            k apache.phpnu Iw        PK         ! ҧ.AF
  F
  	            & iconv.phpnu Iw        PK         ! ݯ:  :  	             1 uodbc.phpnu Iw        PK         ! E$    
            ?l sodium.phpnu Iw        PK         ! o  o              j info.phpnu Iw        PK         ! (
  
               outcontrol.phpnu Iw        PK         ! q߹    
            S filter.phpnu Iw        PK         ! "&  &              F datetime.phpnu Iw        PK         ! K`  `  	            E gnupg.phpnu Iw        PK         ! 	'  '  
             stream.phpnu Iw        PK         ! 'K  K               solr.phpnu Iw        PK         ! 5!  !  	            	 xdiff.phpnu Iw        PK         ! GC                 classobj.phpnu Iw        PK         ! ò-                 yaml.phpnu Iw        PK         ! jY8  8              %" rrd.phpnu Iw        PK         ! /                . opcache.phpnu Iw        PK         ! U)r`  `              1 functionsList.phpnu Iw        PK         ! ROƉ    
             ibmDb2.phpnu Iw        PK         ! ḵ                T url.phpnu Iw        PK    T T &  <