From 93e304d0c50eb6f2924eb23e7b07a54c38ce2b2e Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sat, 2 Feb 2019 14:10:38 +0100
Subject: [PATCH] Add stubs for PHP libraries

---
 lib/SimpleSAML/Auth/Source.php  |   14 +-
 lib/SimpleSAML/Auth/State.php   |    8 +-
 psalm.xml                       |    6 +
 tests/Utils/Stubs/memcache.php  |  460 +++++++++++
 tests/Utils/Stubs/memcached.php | 1308 +++++++++++++++++++++++++++++++
 tests/Utils/Stubs/radius.php    |  385 +++++++++
 6 files changed, 2176 insertions(+), 5 deletions(-)
 create mode 100644 tests/Utils/Stubs/memcache.php
 create mode 100644 tests/Utils/Stubs/memcached.php
 create mode 100644 tests/Utils/Stubs/radius.php

diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index d24f6e774..6eaf69008 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -98,6 +98,7 @@ abstract class Source
      * information about the user, and call completeAuth with the state array.
      *
      * @param array &$state Information about the current authentication.
+     * @return void
      */
     abstract public function authenticate(&$state);
 
@@ -109,6 +110,7 @@ abstract class Source
      * interact with the user even in the case when the user is already authenticated.
      *
      * @param array &$state Information about the current authentication.
+     * @return void
      */
     public function reauthenticate(array &$state)
     {
@@ -131,6 +133,7 @@ abstract class Source
      * but should instead be passed to the top-level exception handler.
      *
      * @param array &$state Information about the current authentication.
+     * @return void
      */
     public static function completeAuth(&$state)
     {
@@ -159,6 +162,7 @@ abstract class Source
      * check it by calling \SimpleSAML\Utils\HTTP::checkURLAllowed().
      * @param array $params Extra information about the login. Different authentication requestors may provide different
      * information. Optional, will default to an empty array.
+     * @return void
      */
     public function initLogin($return, $errorURL = null, array $params = [])
     {
@@ -207,6 +211,7 @@ abstract class Source
      * This method never returns.
      *
      * @param array $state The state after the login has completed.
+     * @return void
      */
     public static function loginCompleted($state)
     {
@@ -245,6 +250,7 @@ abstract class Source
      * showing the user a page, or redirecting, this function should return.
      *
      * @param array &$state Information about the current logout operation.
+     * @return void
      */
     public function logout(&$state)
     {
@@ -261,6 +267,7 @@ abstract class Source
      * but should instead be passed to the top-level exception handler.
      *
      * @param array &$state Information about the current authentication.
+     * @return void
      */
     public static function completeLogout(&$state)
     {
@@ -335,9 +342,9 @@ abstract class Source
      * authentication source of a different type is found, an exception will be thrown.
      *
      * @param string      $authId The authentication source identifier.
-     * @param string|NULL $type The type of authentication source. If NULL, any type will be accepted.
+     * @param string|null $type The type of authentication source. If NULL, any type will be accepted.
      *
-     * @return Source|NULL The AuthSource object, or NULL if no authentication
+     * @return \SimpleSAML\Auth\Source|null The AuthSource object, or NULL if no authentication
      *     source with the given identifier is found.
      * @throws \SimpleSAML\Error\Exception If no such authentication source is found or it is invalid.
      */
@@ -379,6 +386,7 @@ abstract class Source
      * Called when the authentication source receives an external logout request.
      *
      * @param array $state State array for the logout operation.
+     * @return void
      */
     public static function logoutCallback($state)
     {
@@ -411,6 +419,7 @@ abstract class Source
      *
      * @param string $assoc The identifier for this logout association.
      * @param array  $state The state array passed to the authenticate-function.
+     * @return void
      */
     protected function addLogoutCallback($assoc, $state)
     {
@@ -455,6 +464,7 @@ abstract class Source
      * This function always returns.
      *
      * @param string $assoc The logout association which should be called.
+     * @return void
      */
     protected function callLogoutCallback($assoc)
     {
diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php
index 8ee2986db..48a5cfea6 100644
--- a/lib/SimpleSAML/Auth/State.php
+++ b/lib/SimpleSAML/Auth/State.php
@@ -254,7 +254,7 @@ class State
      * @throws \SimpleSAML\Error\NoState If we couldn't find the state and there's no URL defined to redirect to.
      * @throws \Exception If the stage of the state is invalid and there's no URL defined to redirect to.
      *
-     * @return array|NULL  State information, or null if the state is missing and $allowMissing is true.
+     * @return array|null  State information, or NULL if the state is missing and $allowMissing is true.
      */
     public static function loadState($id, $stage, $allowMissing = false)
     {
@@ -315,6 +315,7 @@ class State
      * This function deletes the given state to prevent the user from reusing it later.
      *
      * @param array &$state The state which should be deleted.
+     * @return void
      */
     public static function deleteState(&$state)
     {
@@ -339,6 +340,7 @@ class State
      * @param \SimpleSAML\Error\Exception $exception The exception.
      *
      * @throws \SimpleSAML\Error\Exception If there is no exception handler defined, it will just throw the $exception.
+     * @return void
      */
     public static function throwException($state, \SimpleSAML\Error\Exception $exception)
     {
@@ -373,9 +375,9 @@ class State
     /**
      * Retrieve an exception state.
      *
-     * @param string|NULL $id The exception id. Can be NULL, in which case it will be retrieved from the request.
+     * @param string|null $id The exception id. Can be NULL, in which case it will be retrieved from the request.
      *
-     * @return array|NULL  The state array with the exception, or NULL if no exception was thrown.
+     * @return array|null  The state array with the exception, or NULL if no exception was thrown.
      */
     public static function loadExceptionState($id = null)
     {
diff --git a/psalm.xml b/psalm.xml
index d7cb185f7..66629cbfb 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -27,4 +27,10 @@
         <UnusedClass errorLevel="info" />
         <PossiblyUnusedMethod errorLevel="info" />
     </issueHandlers>
+
+    <stubs>
+        <file name="tests/Utils/Stubs/memcache.php" />
+        <file name="tests/Utils/Stubs/memcached.php" />
+        <file name="tests/Utils/Stubs/radius.php" />
+    </stubs>
 </psalm>
diff --git a/tests/Utils/Stubs/memcache.php b/tests/Utils/Stubs/memcache.php
new file mode 100644
index 000000000..547d3bdd4
--- /dev/null
+++ b/tests/Utils/Stubs/memcache.php
@@ -0,0 +1,460 @@
+<?php
+
+// Start of memcache v.3.0.8
+
+class MemcachePool  {
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Open memcached server connection
+     * @link https://php.net/manual/en/memcache.connect.php
+     * @param string $host <p>
+     * Point to the host where memcached is listening for connections. This parameter
+     * may also specify other transports like <em>unix:///path/to/memcached.sock</em>
+     * to use UNIX domain sockets, in this case <b>port</b> must also
+     * be set to <em>0</em>.
+     * </p>
+     * @param int $port [optional] <p>
+     * Point to the port where memcached is listening for connections. Set this
+     * parameter to <em>0</em> when using UNIX domain sockets.
+     * </p>
+     * <p>
+     * Please note: <b>port</b> defaults to
+     * {@link https://php.net/manual/ru/memcache.ini.php#ini.memcache.default-port memcache.default_port}
+     * if not specified. For this reason it is wise to specify the port
+     * explicitly in this method call.
+     * </p>
+     * @param int $timeout [optional] <p>Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.</p>
+     * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
+     */
+    public function connect ($host, $port, $timeout = 1) {}
+
+    /**
+     * (PECL memcache &gt;= 2.0.0)<br/>
+     * Add a memcached server to connection pool
+     * @link https://php.net/manual/en/memcache.addserver.php
+     * @param string $host <p>
+     * Point to the host where memcached is listening for connections. This parameter
+     * may also specify other transports like unix:///path/to/memcached.sock
+     * to use UNIX domain sockets, in this case <i>port</i> must also
+     * be set to 0.
+     * </p>
+     * @param int $port [optional] <p>
+     * Point to the port where memcached is listening for connections.
+     * Set this
+     * parameter to 0 when using UNIX domain sockets.
+     * </p>
+     * <p>
+     * Please note: <i>port</i> defaults to
+     * memcache.default_port
+     * if not specified. For this reason it is wise to specify the port
+     * explicitly in this method call.
+     * </p>
+     * @param bool $persistent [optional] <p>
+     * Controls the use of a persistent connection. Default to <b>TRUE</b>.
+     * </p>
+     * @param int $weight [optional] <p>
+     * Number of buckets to create for this server which in turn control its
+     * probability of it being selected. The probability is relative to the
+     * total weight of all servers.
+     * </p>
+     * @param int $timeout [optional] <p>
+     * Value in seconds which will be used for connecting to the daemon. Think
+     * twice before changing the default value of 1 second - you can lose all
+     * the advantages of caching if your connection is too slow.
+     * </p>
+     * @param int $retry_interval [optional] <p>
+     * Controls how often a failed server will be retried, the default value
+     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
+     * Neither this nor the <i>persistent</i> parameter has any
+     * effect when the extension is loaded dynamically via <b>dl</b>.
+     * </p>
+     * <p>
+     * Each failed connection struct has its own timeout and before it has expired
+     * the struct will be skipped when selecting backends to serve a request. Once
+     * expired the connection will be successfully reconnected or marked as failed
+     * for another <i>retry_interval</i> seconds. The typical
+     * effect is that each web server child will retry the connection about every
+     * <i>retry_interval</i> seconds when serving a page.
+     * </p>
+     * @param bool $status [optional] <p>
+     * Controls if the server should be flagged as online. Setting this parameter
+     * to <b>FALSE</b> and <i>retry_interval</i> to -1 allows a failed
+     * server to be kept in the pool so as not to affect the key distribution
+     * algorithm. Requests for this server will then failover or fail immediately
+     * depending on the <i>memcache.allow_failover</i> setting.
+     * Default to <b>TRUE</b>, meaning the server should be considered online.
+     * </p>
+     * @param callable $failure_callback [optional] <p>
+     * Allows the user to specify a callback function to run upon encountering an
+     * error. The callback is run before failover is attempted. The function takes
+     * two parameters, the hostname and port of the failed server.
+     * </p>
+     * @param int $timeoutms [optional] <p>
+     * </p>
+     * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function addServer ($host, $port = 11211, $persistent = true, $weight = null, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null, $timeoutms = null) {}
+
+    /**
+     * (PECL memcache &gt;= 2.1.0)<br/>
+     * Changes server parameters and status at runtime
+     * @link https://secure.php.net/manual/en/memcache.setserverparams.php
+     * @param string $host <p>Point to the host where memcached is listening for connections.</p.
+     * @param int $port [optional] <p>
+     * Point to the port where memcached is listening for connections.
+     * </p>
+     * @param int $timeout [optional] <p>
+     * Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow.
+     * </p>
+     * @param int $retry_interval [optional] <p>
+     * Controls how often a failed server will be retried, the default value
+     * is 15 seconds. Setting this parameter to -1 disables automatic retry.
+     * Neither this nor the <b>persistent</b> parameter has any
+     * effect when the extension is loaded dynamically via {@link https://secure.php.net/manual/en/function.dl.php dl()}.
+     * </p>
+     * @param bool $status [optional] <p>
+     * Controls if the server should be flagged as online. Setting this parameter
+     * to <b>FALSE</b> and <b>retry_interval</b> to -1 allows a failed
+     * server to be kept in the pool so as not to affect the key distribution
+     * algorithm. Requests for this server will then failover or fail immediately
+     * depending on the <b>memcache.allow_failover</b> setting.
+     * Default to <b>TRUE</b>, meaning the server should be considered online.
+     * </p>
+     * @param callable $failure_callback [optional] <p>
+     * Allows the user to specify a callback function to run upon encountering an error. The callback is run before failover is attempted.
+     * The function takes two parameters, the hostname and port of the failed server.
+     * </p>
+     * @return boolean <p>Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.</p>
+     */
+    public function setServerParams ($host, $port = 11211, $timeout = 1, $retry_interval = 15, $status = true, callable $failure_callback = null) {}
+
+    /**
+     *
+     */
+    public function setFailureCallback () {}
+
+    /**
+     * (PECL memcache &gt;= 2.1.0)<br/>
+     * Returns server status
+     * @link https://php.net/manual/en/memcache.getserverstatus.php
+     * @param string $host Point to the host where memcached is listening for connections.
+     * @param int $port Point to the port where memcached is listening for connections.
+     * @return int Returns a the servers status. 0 if server is failed, non-zero otherwise
+     */
+    public function getServerStatus ($host, $port = 11211) {}
+
+    /**
+     *
+     */
+    public function findServer () {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Return version of the server
+     * @link https://php.net/manual/en/memcache.getversion.php
+     * @return string|boolean Returns a string of server version number or <b>FALSE</b> on failure.
+     */
+    public function getVersion () {}
+
+    /**
+     * (PECL memcache &gt;= 2.0.0)<br/>
+     * Add an item to the server. If the key already exists, the value will not be added and <b>FALSE</b> will be returned.
+     * @link https://php.net/manual/en/memcache.add.php
+     * @param string $key The key that will be associated with the item.
+     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
+     * @param int $flag [optional] <p>
+     * Use <b>MEMCACHE_COMPRESSED</b> to store the item
+     * compressed (uses zlib).
+     * </p>
+     * @param int $expire [optional] <p>Expiration time of the item.
+     * If it's equal to zero, the item will never expire.
+     * You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure. Returns <b>FALSE</b> if such key already exist. For the rest Memcache::add() behaves similarly to Memcache::set().
+     */
+    public function add ($key , $var, $flag = null, $expire = null) {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Stores an item var with key on the memcached server. Parameter expire is expiration time in seconds.
+     * If it's 0, the item never expires (but memcached server doesn't guarantee this item to be stored all the time,
+     * it could be deleted from the cache to make place for other items).
+     * You can use MEMCACHE_COMPRESSED constant as flag value if you want to use on-the-fly compression (uses zlib).
+     * @link https://php.net/manual/en/memcache.set.php
+     * @param string $key The key that will be associated with the item.
+     * @param mixed $var The variable to store. Strings and integers are stored as is, other types are stored serialized.
+     * @param int $flag [optional] Use MEMCACHE_COMPRESSED to store the item compressed (uses zlib).
+     * @param int $expire [optional] Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function set ($key, $var, $flag = null, $expire = null) {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Replace value of the existing item
+     * @link https://php.net/manual/en/memcache.replace.php
+     * @param string $key <p>The key that will be associated with the item.</p>
+     * @param mixed $var <p>The variable to store. Strings and integers are stored as is, other types are stored serialized.</p>
+     * @param int $flag [optional] <p>Use <b>MEMCACHE_COMPRESSED</b> to store the item compressed (uses zlib).</p>
+     * @param int $expire [optional] <p>Expiration time of the item. If it's equal to zero, the item will never expire. You can also use Unix timestamp or a number of seconds starting from current time, but in the latter case the number of seconds may not exceed 2592000 (30 days).</p>
+     * @return boolean Returns TRUE on success or FALSE on failure.
+     */
+    public function replace ($key,  $var, $flag = null, $expire = null) {}
+
+	public function cas () {}
+
+	public function append () {}
+
+    /**
+     * @return string
+     */
+    public function prepend () {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Retrieve item from the server
+     * @link https://php.net/manual/en/memcache.get.php
+     * @param string|array $key <p>
+     * The key or array of keys to fetch.
+     * </p>
+     * @param int|array $flags [optional] <p>
+     * If present, flags fetched along with the values will be written to this parameter. These
+     * flags are the same as the ones given to for example {@link https://php.net/manual/en/memcache.set.php Memcache::set()}.
+     * The lowest byte of the int is reserved for pecl/memcache internal usage (e.g. to indicate
+     * compression and serialization status).
+     * </p>
+     * @return string|array <p>
+     * Returns the string associated with the <b>key</b> or
+     * an array of found key-value pairs when <b>key</b> is an {@link https://php.net/manual/en/language.types.array.php array}.
+     * Returns <b>FALSE</b> on failure, <b>key</b> is not found or
+     * <b>key</b> is an empty {@link https://php.net/manual/en/language.types.array.php array}.
+     * </p>
+     */
+    public function get ($key, &$flags = null) {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Delete item from the server
+     * https://secure.php.net/manual/ru/memcache.delete.php
+     * @param $key string The key associated with the item to delete.
+     * @param $timeout int [optional] This deprecated parameter is not supported, and defaults to 0 seconds. Do not use this parameter.
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function delete ($key, $timeout = 0 ) {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Get statistics of the server
+     * @link https://php.net/manual/ru/memcache.getstats.php
+     * @param string $type [optional] <p>
+     * The type of statistics to fetch.
+     * Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}.
+     * According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
+     * @param int $slabid [optional] <p>
+     * Used in conjunction with <b>type</b> set to
+     * cachedump to identify the slab to dump from. The cachedump
+     * command ties up the server and is strictly to be used for
+     * debugging purposes.
+     * </p>
+     * @param int $limit [optional] <p>
+     * Used in conjunction with <b>type</b> set to cachedump to limit the number of entries to dump.
+     * </p>
+     * @return array|bool Returns an associative array of server statistics or <b>FALSE</b> on failure.
+     */
+    public function getStats ($type = null, $slabid = null, $limit = 100) {}
+
+    /**
+     * (PECL memcache &gt;= 2.0.0)<br/>
+     * Get statistics from all servers in pool
+     * @link https://php.net/manual/en/memcache.getextendedstats.php
+     * @param string $type [optional] <p>The type of statistics to fetch. Valid values are {reset, malloc, maps, cachedump, slabs, items, sizes}. According to the memcached protocol spec these additional arguments "are subject to change for the convenience of memcache developers".</p>
+     * @param int $slabid [optional] <p>
+     * Used in conjunction with <b>type</b> set to
+     * cachedump to identify the slab to dump from. The cachedump
+     * command ties up the server and is strictly to be used for
+     * debugging purposes.
+     * </p>
+     * @param int $limit Used in conjunction with type set to cachedump to limit the number of entries to dump.
+     * @return array|bool Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
+     * Returns a two-dimensional associative array of server statistics or <b>FALSE</b>
+     * on failure.
+     */
+    public function getExtendedStats ($type = null, $slabid = null, $limit = 100) {}
+
+    /**
+     * (PECL memcache &gt;= 2.0.0)<br/>
+     * Enable automatic compression of large values
+     * @link https://php.net/manual/en/memcache.setcompressthreshold.php
+     * @param int $thresold <p>Controls the minimum value length before attempting to compress automatically.</p>
+     * @param float $min_saving [optional] <p>Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings.</p>
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function setCompressThreshold ($thresold, $min_saving = 0.2) {}
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Increment item's value
+     * @link https://php.net/manual/en/memcache.increment.php
+     * @param $key string Key of the item to increment.
+     * @param $value int [optional] increment the item by <b>value</b>
+     * @return int|boolean Returns new items value on success or <b>FALSE</b> on failure.
+     */
+    public function increment ($key, $value = 1) {}
+
+    /**
+     * (PECL memcache &gt;= 0.2.0)<br/>
+     * Decrement item's value
+     * @link https://php.net/manual/en/memcache.decrement.php
+     * @param $key string Key of the item do decrement.
+     * @param $value int Decrement the item by <b>value</b>.
+     * @return int|boolean Returns item's new value on success or <b>FALSE</b> on failure.
+     */
+    public function decrement ($key, $value = 1) {}
+
+    /**
+     * (PECL memcache &gt;= 0.4.0)<br/>
+     * Close memcached server connection
+     * @link https://php.net/manual/en/memcache.close.php
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function close () {}
+
+    /**
+     * (PECL memcache &gt;= 1.0.0)<br/>
+     * Flush all existing items at the server
+     * @link https://php.net/manual/en/memcache.flush.php
+     * @return boolean Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+     */
+    public function flush () {}
+
+}
+
+/**
+ * Represents a connection to a set of memcache servers.
+ * @link https://php.net/manual/en/class.memcache.php
+ */
+class Memcache extends MemcachePool  {
+
+
+	/**
+	 * (PECL memcache &gt;= 0.4.0)<br/>
+	 * Open memcached server persistent connection
+	 * @link https://php.net/manual/en/memcache.pconnect.php
+	 * @param string $host <p>
+	 * Point to the host where memcached is listening for connections. This parameter
+	 * may also specify other transports like unix:///path/to/memcached.sock
+	 * to use UNIX domain sockets, in this case <i>port</i> must also
+	 * be set to 0.
+	 * </p>
+	 * @param int $port [optional] <p>
+	 * Point to the port where memcached is listening for connections. Set this
+	 * parameter to 0 when using UNIX domain sockets.
+	 * </p>
+	 * @param int $timeout [optional] <p>
+	 * Value in seconds which will be used for connecting to the daemon. Think
+	 * twice before changing the default value of 1 second - you can lose all
+	 * the advantages of caching if your connection is too slow.
+	 * </p>
+	 * @return mixed a Memcache object or <b>FALSE</b> on failure.
+	 */
+	public function pconnect ($host, $port, $timeout = 1) {}
+}
+
+//  string $host [, int $port [, int $timeout ]]
+
+/**
+ * (PECL memcache >= 0.2.0)</br>
+ * Memcache::connect — Open memcached server connection
+ * @link https://php.net/manual/en/memcache.connect.php
+ * @param string $host <p>
+ * Point to the host where memcached is listening for connections.
+ * This parameter may also specify other transports like
+ * unix:///path/to/memcached.sock to use UNIX domain sockets,
+ * in this case port must also be set to 0.
+ * </p>
+ * @param int $port [optional] <p>
+ * Point to the port where memcached is listening for connections.
+ * Set this parameter to 0 when using UNIX domain sockets.
+ * Note:  port defaults to memcache.default_port if not specified.
+ * For this reason it is wise to specify the port explicitly in this method call.
+ * </p>
+ * @param int $timeout [optional] <p>
+ * Value in seconds which will be used for connecting to the daemon.
+ * </p>
+ * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+ */
+function memcache_connect ($host, $port, $timeout = 1) {}
+
+/**
+ * (PECL memcache >= 0.4.0)
+ * Memcache::pconnect — Open memcached server persistent connection
+ * 
+ * @link https://php.net/manual/en/memcache.pconnect.php#example-5242
+ * @param      $host
+ * @param null $port
+ * @param int  $timeout
+ * @return Memcache
+ */
+function memcache_pconnect ($host, $port=null, $timeout=1) {}
+
+function memcache_add_server () {}
+
+function memcache_set_server_params () {}
+
+function memcache_set_failure_callback () {}
+
+function memcache_get_server_status () {}
+
+function memcache_get_version () {}
+
+function memcache_add () {}
+
+function memcache_set () {}
+
+function memcache_replace () {}
+
+function memcache_cas () {}
+
+function memcache_append () {}
+
+function memcache_prepend () {}
+
+function memcache_get () {}
+
+function memcache_delete () {}
+
+/**
+ * (PECL memcache &gt;= 0.2.0)<br/>
+ * Turn debug output on/off
+ * @link https://php.net/manual/en/function.memcache-debug.php
+ * @param bool $on_off <p>
+ * Turns debug output on if equals to <b>TRUE</b>.
+ * Turns debug output off if equals to <b>FALSE</b>.
+ * </p>
+ * @return bool <b>TRUE</b> if PHP was built with --enable-debug option, otherwise
+ * returns <b>FALSE</b>.
+ */
+function memcache_debug ($on_off) {}
+
+function memcache_get_stats () {}
+
+function memcache_get_extended_stats () {}
+
+function memcache_set_compress_threshold () {}
+
+function memcache_increment () {}
+
+function memcache_decrement () {}
+
+function memcache_close () {}
+
+function memcache_flush () {}
+
+define ('MEMCACHE_COMPRESSED', 2);
+define ('MEMCACHE_USER1', 65536);
+define ('MEMCACHE_USER2', 131072);
+define ('MEMCACHE_USER3', 262144);
+define ('MEMCACHE_USER4', 524288);
+define ('MEMCACHE_HAVE_SESSION', 1);
+
+// End of memcache v.3.0.8
+?>
diff --git a/tests/Utils/Stubs/memcached.php b/tests/Utils/Stubs/memcached.php
new file mode 100644
index 000000000..4b8da2c6f
--- /dev/null
+++ b/tests/Utils/Stubs/memcached.php
@@ -0,0 +1,1308 @@
+<?php
+
+// Start of memcached v.3.0.4
+
+/**
+ * Represents a connection to a set of memcached servers.
+ * @link https://php.net/manual/en/class.memcached.php
+ */
+class Memcached  {
+
+	/**
+	 * <p>Enables or disables payload compression. When enabled,
+	 * item values longer than a certain threshold (currently 100 bytes) will be
+	 * compressed during storage and decompressed during retrieval
+	 * transparently.</p>
+	 * <p>Type: boolean, default: <b>TRUE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_COMPRESSION = -1001;
+	const OPT_COMPRESSION_TYPE = -1004;
+
+	/**
+	 * <p>This can be used to create a "domain" for your item keys. The value
+	 * specified here will be prefixed to each of the keys. It cannot be
+	 * longer than 128 characters and will reduce the
+	 * maximum available key size. The prefix is applied only to the item keys,
+	 * not to the server keys.</p>
+	 * <p>Type: string, default: "".</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_PREFIX_KEY = -1002;
+
+	/**
+	 * <p>
+	 * Specifies the serializer to use for serializing non-scalar values.
+	 * The valid serializers are <b>Memcached::SERIALIZER_PHP</b>
+	 * or <b>Memcached::SERIALIZER_IGBINARY</b>. The latter is
+	 * supported only when memcached is configured with
+	 * --enable-memcached-igbinary option and the
+	 * igbinary extension is loaded.
+	 * </p>
+	 * <p>Type: integer, default: <b>Memcached::SERIALIZER_PHP</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_SERIALIZER = -1003;
+
+	/**
+	 * <p>Indicates whether igbinary serializer support is available.</p>
+	 * <p>Type: boolean.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HAVE_IGBINARY = 0;
+
+	/**
+	 * <p>Indicates whether JSON serializer support is available.</p>
+	 * <p>Type: boolean.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HAVE_JSON = 0;
+	const HAVE_SESSION = 1;
+	const HAVE_SASL = 0;
+
+	/**
+	 * <p>Specifies the hashing algorithm used for the item keys. The valid
+	 * values are supplied via <b>Memcached::HASH_*</b> constants.
+	 * Each hash algorithm has its advantages and its disadvantages. Go with the
+	 * default if you don't know or don't care.</p>
+	 * <p>Type: integer, default: <b>Memcached::HASH_DEFAULT</b></p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_HASH = 2;
+
+	/**
+	 * <p>The default (Jenkins one-at-a-time) item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_DEFAULT = 0;
+
+	/**
+	 * <p>MD5 item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_MD5 = 1;
+
+	/**
+	 * <p>CRC item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_CRC = 2;
+
+	/**
+	 * <p>FNV1_64 item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_FNV1_64 = 3;
+
+	/**
+	 * <p>FNV1_64A item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_FNV1A_64 = 4;
+
+	/**
+	 * <p>FNV1_32 item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_FNV1_32 = 5;
+
+	/**
+	 * <p>FNV1_32A item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_FNV1A_32 = 6;
+
+	/**
+	 * <p>Hsieh item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_HSIEH = 7;
+
+	/**
+	 * <p>Murmur item key hashing algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const HASH_MURMUR = 8;
+
+	/**
+	 * <p>Specifies the method of distributing item keys to the servers.
+	 * Currently supported methods are modulo and consistent hashing. Consistent
+	 * hashing delivers better distribution and allows servers to be added to
+	 * the cluster with minimal cache losses.</p>
+	 * <p>Type: integer, default: <b>Memcached::DISTRIBUTION_MODULA.</b></p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_DISTRIBUTION = 9;
+
+	/**
+	 * <p>Modulo-based key distribution algorithm.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const DISTRIBUTION_MODULA = 0;
+
+	/**
+	 * <p>Consistent hashing key distribution algorithm (based on libketama).</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const DISTRIBUTION_CONSISTENT = 1;
+	const DISTRIBUTION_VIRTUAL_BUCKET = 6;
+
+	/**
+	 * <p>Enables or disables compatibility with libketama-like behavior. When
+	 * enabled, the item key hashing algorithm is set to MD5 and distribution is
+	 * set to be weighted consistent hashing distribution. This is useful
+	 * because other libketama-based clients (Python, Ruby, etc.) with the same
+	 * server configuration will be able to access the keys transparently.
+	 * </p>
+	 * <p>
+	 * It is highly recommended to enable this option if you want to use
+	 * consistent hashing, and it may be enabled by default in future
+	 * releases.
+	 * </p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_LIBKETAMA_COMPATIBLE = 16;
+	const OPT_LIBKETAMA_HASH = 17;
+	const OPT_TCP_KEEPALIVE = 32;
+
+	/**
+	 * <p>Enables or disables buffered I/O. Enabling buffered I/O causes
+	 * storage commands to "buffer" instead of being sent. Any action that
+	 * retrieves data causes this buffer to be sent to the remote connection.
+	 * Quitting the connection or closing down the connection will also cause
+	 * the buffered data to be pushed to the remote connection.</p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_BUFFER_WRITES = 10;
+
+	/**
+	 * <p>Enable the use of the binary protocol. Please note that you cannot
+	 * toggle this option on an open connection.</p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_BINARY_PROTOCOL = 18;
+
+	/**
+	 * <p>Enables or disables asynchronous I/O. This is the fastest transport
+	 * available for storage functions.</p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_NO_BLOCK = 0;
+
+	/**
+	 * <p>Enables or disables the no-delay feature for connecting sockets (may
+	 * be faster in some environments).</p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_TCP_NODELAY = 1;
+
+	/**
+	 * <p>The maximum socket send buffer in bytes.</p>
+	 * <p>Type: integer, default: varies by platform/kernel
+	 * configuration.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_SOCKET_SEND_SIZE = 4;
+
+	/**
+	 * <p>The maximum socket receive buffer in bytes.</p>
+	 * <p>Type: integer, default: varies by platform/kernel
+	 * configuration.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_SOCKET_RECV_SIZE = 5;
+
+	/**
+	 * <p>In non-blocking mode this set the value of the timeout during socket
+	 * connection, in milliseconds.</p>
+	 * <p>Type: integer, default: 1000.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_CONNECT_TIMEOUT = 14;
+
+	/**
+	 * <p>The amount of time, in seconds, to wait until retrying a failed
+	 * connection attempt.</p>
+	 * <p>Type: integer, default: 0.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_RETRY_TIMEOUT = 15;
+
+	/**
+	 * <p>Socket sending timeout, in microseconds. In cases where you cannot
+	 * use non-blocking I/O this will allow you to still have timeouts on the
+	 * sending of data.</p>
+	 * <p>Type: integer, default: 0.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_SEND_TIMEOUT = 19;
+
+	/**
+	 * <p>Socket reading timeout, in microseconds. In cases where you cannot
+	 * use non-blocking I/O this will allow you to still have timeouts on the
+	 * reading of data.</p>
+	 * <p>Type: integer, default: 0.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_RECV_TIMEOUT = 20;
+
+	/**
+	 * <p>Timeout for connection polling, in milliseconds.</p>
+	 * <p>Type: integer, default: 1000.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_POLL_TIMEOUT = 8;
+
+	/**
+	 * <p>Enables or disables caching of DNS lookups.</p>
+	 * <p>Type: boolean, default: <b>FALSE</b>.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_CACHE_LOOKUPS = 6;
+
+	/**
+	 * <p>Specifies the failure limit for server connection attempts. The
+	 * server will be removed after this many continuous connection
+	 * failures.</p>
+	 * <p>Type: integer, default: 0.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const OPT_SERVER_FAILURE_LIMIT = 21;
+	const OPT_AUTO_EJECT_HOSTS = 28;
+	const OPT_HASH_WITH_PREFIX_KEY = 25;
+	const OPT_NOREPLY = 26;
+	const OPT_SORT_HOSTS = 12;
+	const OPT_VERIFY_KEY = 13;
+	const OPT_USE_UDP = 27;
+	const OPT_NUMBER_OF_REPLICAS = 29;
+	const OPT_RANDOMIZE_REPLICA_READ = 30;
+	const OPT_CORK = 31;
+	const OPT_REMOVE_FAILED_SERVERS = 35;
+	const OPT_DEAD_TIMEOUT = 36;
+	const OPT_SERVER_TIMEOUT_LIMIT = 37;
+	const OPT_MAX = 38;
+	const OPT_IO_BYTES_WATERMARK = 23;
+	const OPT_IO_KEY_PREFETCH = 24;
+	const OPT_IO_MSG_WATERMARK = 22;
+	const OPT_LOAD_FROM_FILE = 34;
+	const OPT_SUPPORT_CAS = 7;
+	const OPT_TCP_KEEPIDLE = 33;
+	const OPT_USER_DATA = 11;
+
+
+	/**
+	 * <p>The operation was successful.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_SUCCESS = 0;
+
+	/**
+	 * <p>The operation failed in some fashion.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_FAILURE = 1;
+
+	/**
+	 * <p>DNS lookup failed.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_HOST_LOOKUP_FAILURE = 2;
+
+	/**
+	 * <p>Failed to read network data.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_UNKNOWN_READ_FAILURE = 7;
+
+	/**
+	 * <p>Bad command in memcached protocol.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_PROTOCOL_ERROR = 8;
+
+	/**
+	 * <p>Error on the client side.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_CLIENT_ERROR = 9;
+
+	/**
+	 * <p>Error on the server side.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_SERVER_ERROR = 10;
+
+	/**
+	 * <p>Failed to write network data.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_WRITE_FAILURE = 5;
+
+	/**
+	 * <p>Failed to do compare-and-swap: item you are trying to store has been
+	 * modified since you last fetched it.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_DATA_EXISTS = 12;
+
+	/**
+	 * <p>Item was not stored: but not because of an error. This normally
+	 * means that either the condition for an "add" or a "replace" command
+	 * wasn't met, or that the item is in a delete queue.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_NOTSTORED = 14;
+
+	/**
+	 * <p>Item with this key was not found (with "get" operation or "cas"
+	 * operations).</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_NOTFOUND = 16;
+
+	/**
+	 * <p>Partial network data read error.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_PARTIAL_READ = 18;
+
+	/**
+	 * <p>Some errors occurred during multi-get.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_SOME_ERRORS = 19;
+
+	/**
+	 * <p>Server list is empty.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_NO_SERVERS = 20;
+
+	/**
+	 * <p>End of result set.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_END = 21;
+
+	/**
+	 * <p>System error.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_ERRNO = 26;
+
+	/**
+	 * <p>The operation was buffered.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_BUFFERED = 32;
+
+	/**
+	 * <p>The operation timed out.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_TIMEOUT = 31;
+
+	/**
+	 * <p>Bad key.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_BAD_KEY_PROVIDED = 33;
+	const RES_STORED = 15;
+	const RES_DELETED = 22;
+	const RES_STAT = 24;
+	const RES_ITEM = 25;
+	const RES_NOT_SUPPORTED = 28;
+	const RES_FETCH_NOTFINISHED = 30;
+	const RES_SERVER_MARKED_DEAD = 35;
+	const RES_UNKNOWN_STAT_KEY = 36;
+	const RES_INVALID_HOST_PROTOCOL = 34;
+	const RES_MEMORY_ALLOCATION_FAILURE = 17;
+	const RES_E2BIG = 37;
+	const RES_KEY_TOO_BIG = 39;
+	const RES_SERVER_TEMPORARILY_DISABLED = 47;
+	const RES_SERVER_MEMORY_ALLOCATION_FAILURE = 48;
+	const RES_AUTH_PROBLEM = 40;
+	const RES_AUTH_FAILURE = 41;
+	const RES_AUTH_CONTINUE = 42;
+	const RES_CONNECTION_FAILURE = 3;
+	const RES_CONNECTION_BIND_FAILURE = 4;
+	const RES_READ_FAILURE = 6;
+	const RES_DATA_DOES_NOT_EXIST = 13;
+	const RES_VALUE = 23;
+	const RES_FAIL_UNIX_SOCKET = 27;
+	const RES_NO_KEY_PROVIDED = 29;
+	const RES_INVALID_ARGUMENTS = 38;
+	const RES_PARSE_ERROR = 43;
+	const RES_PARSE_USER_ERROR = 44;
+	const RES_DEPRECATED = 45;
+	const RES_IN_PROGRESS = 46;
+	const RES_MAXIMUM_RETURN = 49;
+
+	
+	
+	/**
+	 * <p>Failed to create network socket.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_CONNECTION_SOCKET_CREATE_FAILURE = 11;
+
+	/**
+	 * <p>Payload failure: could not compress/decompress or serialize/unserialize the value.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const RES_PAYLOAD_FAILURE = -1001;
+
+	/**
+	 * <p>The default PHP serializer.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const SERIALIZER_PHP = 1;
+
+	/**
+	 * <p>The igbinary serializer.
+	 * Instead of textual representation it stores PHP data structures in a
+	 * compact binary form, resulting in space and time gains.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const SERIALIZER_IGBINARY = 2;
+
+	/**
+	 * <p>The JSON serializer. Requires PHP 5.2.10+.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const SERIALIZER_JSON = 3;
+	const SERIALIZER_JSON_ARRAY = 4;
+	const COMPRESSION_FASTLZ = 2;
+	const COMPRESSION_ZLIB = 1;
+
+	/**
+	 * <p>A flag for <b>Memcached::getMulti</b> and
+	 * <b>Memcached::getMultiByKey</b> to ensure that the keys are
+	 * returned in the same order as they were requested in. Non-existing keys
+	 * get a default value of NULL.</p>
+	 * @link https://php.net/manual/en/memcached.constants.php
+	 */
+	const GET_PRESERVE_ORDER = 1;
+	const GET_ERROR_RETURN_VALUE = false;
+
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Create a Memcached instance
+	 * @link https://php.net/manual/en/memcached.construct.php
+	 * @param $persistent_id [optional]
+	 * @param $callback [optional]
+	 */
+	public function __construct ($persistent_id = '', $on_new_object_cb = null) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Return the result code of the last operation
+	 * @link https://php.net/manual/en/memcached.getresultcode.php
+	 * @return int Result code of the last Memcached operation.
+	 */
+	public function getResultCode () {}
+
+	/**
+	 * (PECL memcached &gt;= 1.0.0)<br/>
+	 * Return the message describing the result of the last operation
+	 * @link https://php.net/manual/en/memcached.getresultmessage.php
+	 * @return string Message describing the result of the last Memcached operation.
+	 */
+	public function getResultMessage () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Retrieve an item
+	 * @link https://php.net/manual/en/memcached.get.php
+	 * @param string $key <p>
+	 * The key of the item to retrieve.
+	 * </p>
+	 * @param callable $cache_cb [optional] <p>
+	 * Read-through caching callback or <b>NULL</b>.
+	 * </p>
+	 * @param int $flags [optional] <p>
+	 * The flags for the get operation.
+	 * </p>
+	 * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function get ($key, callable $cache_cb = null, $flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Retrieve an item from a specific server
+	 * @link https://php.net/manual/en/memcached.getbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key of the item to fetch.
+	 * </p>
+	 * @param callable $cache_cb [optional] <p>
+	 * Read-through caching callback or <b>NULL</b>
+	 * </p>
+	 * @param int $flags [optional] <p>
+	 * The flags for the get operation.
+	 * </p>
+	 * @return mixed the value stored in the cache or <b>FALSE</b> otherwise.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function getByKey ($server_key, $key, callable $cache_cb = null, $flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Retrieve multiple items
+	 * @link https://php.net/manual/en/memcached.getmulti.php
+	 * @param array $keys <p>
+	 * Array of keys to retrieve.
+	 * </p>
+	 * @param int $flags [optional] <p>
+	 * The flags for the get operation.
+	 * </p>
+	 * @return mixed the array of found items or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function getMulti (array $keys, $flags = null) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Retrieve multiple items from a specific server
+	 * @link https://php.net/manual/en/memcached.getmultibykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param array $keys <p>
+	 * Array of keys to retrieve.
+	 * </p>
+	 * @param int $flags [optional] <p>
+	 * The flags for the get operation.
+	 * </p>
+	 * @return array the array of found items or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function getMultiByKey ($server_key, array $keys, $flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Request multiple items
+	 * @link https://php.net/manual/en/memcached.getdelayed.php
+	 * @param array $keys <p>
+	 * Array of keys to request.
+	 * </p>
+	 * @param bool $with_cas [optional] <p>
+	 * Whether to request CAS token values also.
+	 * </p>
+	 * @param callable $value_cb [optional] <p>
+	 * The result callback or <b>NULL</b>.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function getDelayed (array $keys, $with_cas = null, callable $value_cb = null) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Request multiple items from a specific server
+	 * @link https://php.net/manual/en/memcached.getdelayedbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param array $keys <p>
+	 * Array of keys to request.
+	 * </p>
+	 * @param bool $with_cas [optional] <p>
+	 * Whether to request CAS token values also.
+	 * </p>
+	 * @param callable $value_cb [optional] <p>
+	 * The result callback or <b>NULL</b>.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function getDelayedByKey ($server_key, array $keys, $with_cas = null, callable $value_cb = null) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Fetch the next result
+	 * @link https://php.net/manual/en/memcached.fetch.php
+	 * @return array the next result or <b>FALSE</b> otherwise.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_END</b> if result set is exhausted.
+	 */
+	public function fetch () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Fetch all the remaining results
+	 * @link https://php.net/manual/en/memcached.fetchall.php
+	 * @return array the results or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function fetchAll () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Store an item
+	 * @link https://php.net/manual/en/memcached.set.php
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function set ($key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Store an item on a specific server
+	 * @link https://php.net/manual/en/memcached.setbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function setByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Set a new expiration on an item
+	 * @link https://php.net/manual/en/memcached.touch.php
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param int $expiration <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function touch ($key, $expiration = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Set a new expiration on an item on a specific server
+	 * @link https://php.net/manual/en/memcached.touchbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param int $expiration <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function touchByKey ($server_key, $key, $expiration) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Store multiple items
+	 * @link https://php.net/manual/en/memcached.setmulti.php
+	 * @param array $items <p>
+	 * An array of key/value pairs to store on the server.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function setMulti (array $items, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Store multiple items on a specific server
+	 * @link https://php.net/manual/en/memcached.setmultibykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param array $items <p>
+	 * An array of key/value pairs to store on the server.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function setMultiByKey ($server_key, array $items, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Compare and swap an item
+	 * @link https://php.net/manual/en/memcached.cas.php
+	 * @param float $cas_token <p>
+	 * Unique value associated with the existing item. Generated by memcache.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
+	 * to store has been modified since you last fetched it.
+	 */
+	public function cas ($cas_token, $key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Compare and swap an item on a specific server
+	 * @link https://php.net/manual/en/memcached.casbykey.php
+	 * @param float $cas_token <p>
+	 * Unique value associated with the existing item. Generated by memcache.
+	 * </p>
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_DATA_EXISTS</b> if the item you are trying
+	 * to store has been modified since you last fetched it.
+	 */
+	public function casByKey ($cas_token, $server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Add an item under a new key
+	 * @link https://php.net/manual/en/memcached.add.php
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
+	 */
+	public function add ($key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Add an item under a new key on a specific server
+	 * @link https://php.net/manual/en/memcached.addbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key already exists.
+	 */
+	public function addByKey ($server_key, $key, $value, $expiration = 0, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Append data to an existing item
+	 * @link https://php.net/manual/en/memcached.append.php
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param string $value <p>
+	 * The string to append.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function append ($key, $value) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Append data to an existing item on a specific server
+	 * @link https://php.net/manual/en/memcached.appendbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param string $value <p>
+	 * The string to append.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function appendByKey ($server_key, $key, $value) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Prepend data to an existing item
+	 * @link https://php.net/manual/en/memcached.prepend.php
+	 * @param string $key <p>
+	 * The key of the item to prepend the data to.
+	 * </p>
+	 * @param string $value <p>
+	 * The string to prepend.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function prepend ($key, $value) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Prepend data to an existing item on a specific server
+	 * @link https://php.net/manual/en/memcached.prependbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key of the item to prepend the data to.
+	 * </p>
+	 * @param string $value <p>
+	 * The string to prepend.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function prependByKey ($server_key, $key, $value) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Replace the item under an existing key
+	 * @link https://php.net/manual/en/memcached.replace.php
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function replace ($key, $value, $expiration = null, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Replace the item under an existing key on a specific server
+	 * @link https://php.net/manual/en/memcached.replacebykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key under which to store the value.
+	 * </p>
+	 * @param mixed $value <p>
+	 * The value to store.
+	 * </p>
+	 * @param int $expiration [optional] <p>
+	 * The expiration time, defaults to 0. See Expiration Times for more info.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTSTORED</b> if the key does not exist.
+	 */
+	public function replaceByKey ($server_key, $key, $value, $expiration = null, $udf_flags = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Delete an item
+	 * @link https://php.net/manual/en/memcached.delete.php
+	 * @param string $key <p>
+	 * The key to be deleted.
+	 * </p>
+	 * @param int $time [optional] <p>
+	 * The amount of time the server will wait to delete the item.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function delete ($key, $time = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Delete multiple items
+	 * @link https://php.net/manual/en/memcached.deletemulti.php
+	 * @param array $keys <p>
+	 * The keys to be deleted.
+	 * </p>
+	 * @param int $time [optional] <p>
+	 * The amount of time the server will wait to delete the items.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function deleteMulti (array $keys, $time = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Delete an item from a specific server
+	 * @link https://php.net/manual/en/memcached.deletebykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key to be deleted.
+	 * </p>
+	 * @param int $time [optional] <p>
+	 * The amount of time the server will wait to delete the item.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function deleteByKey ($server_key, $key, $time = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Delete multiple items from a specific server
+	 * @link https://php.net/manual/en/memcached.deletemultibykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param array $keys <p>
+	 * The keys to be deleted.
+	 * </p>
+	 * @param int $time [optional] <p>
+	 * The amount of time the server will wait to delete the items.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * The <b>Memcached::getResultCode</b> will return
+	 * <b>Memcached::RES_NOTFOUND</b> if the key does not exist.
+	 */
+	public function deleteMultiByKey ($server_key, array $keys, $time = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Increment numeric item's value
+	 * @link https://php.net/manual/en/memcached.increment.php
+	 * @param string $key <p>
+	 * The key of the item to increment.
+	 * </p>
+	 * @param int $offset [optional] <p>
+	 * The amount by which to increment the item's value.
+	 * </p>
+	 * @param int $initial_value [optional] <p>
+	 * The value to set the item to if it doesn't currently exist.
+	 * </p>
+	 * @param int $expiry [optional] <p>
+	 * The expiry time to set on the item.
+	 * </p>
+	 * @return int new item's value on success or <b>FALSE</b> on failure.
+	 */
+	public function increment ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Decrement numeric item's value
+	 * @link https://php.net/manual/en/memcached.decrement.php
+	 * @param string $key <p>
+	 * The key of the item to decrement.
+	 * </p>
+	 * @param int $offset [optional] <p>
+	 * The amount by which to decrement the item's value.
+	 * </p>
+	 * @param int $initial_value [optional] <p>
+	 * The value to set the item to if it doesn't currently exist.
+	 * </p>
+	 * @param int $expiry [optional] <p>
+	 * The expiry time to set on the item.
+	 * </p>
+	 * @return int item's new value on success or <b>FALSE</b> on failure.
+	 */
+	public function decrement ($key, $offset = 1, $initial_value = 0, $expiry = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Increment numeric item's value, stored on a specific server
+	 * @link https://php.net/manual/en/memcached.incrementbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key of the item to increment.
+	 * </p>
+	 * @param int $offset [optional] <p>
+	 * The amount by which to increment the item's value.
+	 * </p>
+	 * @param int $initial_value [optional] <p>
+	 * The value to set the item to if it doesn't currently exist.
+	 * </p>
+	 * @param int $expiry [optional] <p>
+	 * The expiry time to set on the item.
+	 * </p>
+	 * @return int new item's value on success or <b>FALSE</b> on failure.
+	 */
+	public function incrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Decrement numeric item's value, stored on a specific server
+	 * @link https://php.net/manual/en/memcached.decrementbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @param string $key <p>
+	 * The key of the item to decrement.
+	 * </p>
+	 * @param int $offset [optional] <p>
+	 * The amount by which to decrement the item's value.
+	 * </p>
+	 * @param int $initial_value [optional] <p>
+	 * The value to set the item to if it doesn't currently exist.
+	 * </p>
+	 * @param int $expiry [optional] <p>
+	 * The expiry time to set on the item.
+	 * </p>
+	 * @return int item's new value on success or <b>FALSE</b> on failure.
+	 */
+	public function decrementByKey ($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Add a server to the server pool
+	 * @link https://php.net/manual/en/memcached.addserver.php
+	 * @param string $host <p>
+	 * The hostname of the memcache server. If the hostname is invalid, data-related
+	 * operations will set
+	 * <b>Memcached::RES_HOST_LOOKUP_FAILURE</b> result code.
+	 * </p>
+	 * @param int $port <p>
+	 * The port on which memcache is running. Usually, this is
+	 * 11211.
+	 * </p>
+	 * @param int $weight [optional] <p>
+	 * The weight of the server relative to the total weight of all the
+	 * servers in the pool. This controls the probability of the server being
+	 * selected for operations. This is used only with consistent distribution
+	 * option and usually corresponds to the amount of memory available to
+	 * memcache on that server.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function addServer ($host, $port, $weight = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.1)<br/>
+	 * Add multiple servers to the server pool
+	 * @link https://php.net/manual/en/memcached.addservers.php
+	 * @param array $servers
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function addServers (array $servers) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Get the list of the servers in the pool
+	 * @link https://php.net/manual/en/memcached.getserverlist.php
+	 * @return array The list of all servers in the server pool.
+	 */
+	public function getServerList () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Map a key to a server
+	 * @link https://php.net/manual/en/memcached.getserverbykey.php
+	 * @param string $server_key <p>
+	 * The key identifying the server to store the value on or retrieve it from. Instead of hashing on the actual key for the item, we hash on the server key when deciding which memcached server to talk to. This allows related items to be grouped together on a single server for efficiency with multi operations.
+	 * </p>
+	 * @return array an array containing three keys of host,
+	 * port, and weight on success or <b>FALSE</b>
+	 * on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function getServerByKey ($server_key) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Clears all servers from the server list
+	 * @link https://php.net/manual/en/memcached.resetserverlist.php
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function resetServerList () {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Close any open connections
+	 * @link https://php.net/manual/en/memcached.quit.php
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function quit () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Get server pool statistics
+	 * @link https://php.net/manual/en/memcached.getstats.php
+	 * @param string $type
+	 * @return array Array of server statistics, one entry per server.
+	 */
+	public function getStats ($type = null) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.5)<br/>
+	 * Get server pool version info
+	 * @link https://php.net/manual/en/memcached.getversion.php
+	 * @return array Array of server versions, one entry per server.
+	 */
+	public function getVersion () {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Gets the keys stored on all the servers
+	 * @link https://php.net/manual/en/memcached.getallkeys.php
+	 * @return array the keys stored on all the servers on success or <b>FALSE</b> on failure.
+	 */
+	public function getAllKeys () {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Invalidate all items in the cache
+	 * @link https://php.net/manual/en/memcached.flush.php
+	 * @param int $delay [optional] <p>
+	 * Numer of seconds to wait before invalidating the items.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 * Use <b>Memcached::getResultCode</b> if necessary.
+	 */
+	public function flush ($delay = 0) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Retrieve a Memcached option value
+	 * @link https://php.net/manual/en/memcached.getoption.php
+	 * @param int $option <p>
+	 * One of the Memcached::OPT_* constants.
+	 * </p>
+	 * @return mixed the value of the requested option, or <b>FALSE</b> on
+	 * error.
+	 */
+	public function getOption ($option) {}
+
+	/**
+	 * (PECL memcached &gt;= 0.1.0)<br/>
+	 * Set a Memcached option
+	 * @link https://php.net/manual/en/memcached.setoption.php
+	 * @param int $option
+	 * @param mixed $value
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function setOption ($option, $value) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Set Memcached options
+	 * @link https://php.net/manual/en/memcached.setoptions.php
+	 * @param array $options <p>
+	 * An associative array of options where the key is the option to set and
+	 * the value is the new value for the option.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function setOptions (array $options) {}
+	
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Set the credentials to use for authentication
+	 * @link https://secure.php.net/manual/en/memcached.setsaslauthdata.php
+	 * @param string $username <p>
+	 * The username to use for authentication.
+	 * </p>
+	 * @param string $password <p>
+	 * The password to use for authentication.
+	 * </p>
+	 * @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
+	 */
+	public function setSaslAuthData (string $username , string $password) {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Check if a persitent connection to memcache is being used
+	 * @link https://php.net/manual/en/memcached.ispersistent.php
+	 * @return bool true if Memcache instance uses a persistent connection, false otherwise.
+	 */
+	public function isPersistent () {}
+
+	/**
+	 * (PECL memcached &gt;= 2.0.0)<br/>
+	 * Check if the instance was recently created
+	 * @link https://php.net/manual/en/memcached.ispristine.php
+	 * @return bool the true if instance is recently created, false otherwise.
+	 */
+	public function isPristine () {}
+
+	public function flushBuffers () {}
+
+	public function setEncodingKey ( $key ) {}
+
+	public function getLastDisconnectedServer () {}
+
+	public function getLastErrorErrno () {}
+
+	public function getLastErrorCode () {}
+
+	public function getLastErrorMessage () {}
+
+	public function setBucket (array $host_map, array $forward_map, $replicas) {}
+
+}
+
+/**
+ * @link https://php.net/manual/en/class.memcachedexception.php
+ */
+class MemcachedException extends RuntimeException  {
+
+}
+// End of memcached v.3.0.4
+?>
diff --git a/tests/Utils/Stubs/radius.php b/tests/Utils/Stubs/radius.php
new file mode 100644
index 000000000..102c562e1
--- /dev/null
+++ b/tests/Utils/Stubs/radius.php
@@ -0,0 +1,385 @@
+<?php
+/**
+ * Radius constants
+ * @link https://secure.php.net/manual/en/radius.constants.php
+ */
+/** The maximum length of MPPE keys. */
+define('RADIUS_MPPE_KEY_LEN ', 16);
+
+/**
+ * RADIUS Options
+ * @link https://secure.php.net/manual/en/radius.constants.options.php
+ */
+
+/** When set, this option will result in the attribute value being salt-encrypted. */
+define('RAD_OPTION_TAG', 1);
+/** When set, this option will result in the attribute value being tagged with the value of the tag parameter. */
+define('RADIUS_OPTION_SALT', 2);
+
+/**
+ * RADIUS Packet Types
+ * @link https://secure.php.net/manual/en/radius.constants.packets.php
+ */
+
+/** An Access-Request, used to authenticate a user against a RADIUS server. Access request packets must include a <b>RADIUS_NAS_IP_ADDRESS</b> or a <b>RADIUS_NAS_IDENTIFIER</b> attribute, must also include a <b>RADIUS_USER_PASSWORD</b>, <b>RADIUS_CHAP_PASSWORD</b> or a <b>RADIUS_STATE</b> attribute, and should include a <b>RADIUS_USER_NAME</b> attribute. */
+define('RADIUS_ACCESS_REQUEST', 1);
+
+/** An Access-Accept response to an Access-Request indicating that the RADIUS server authenticated the user successfully. */
+define('RADIUS_ACCESS_ACCEPT', 2);
+
+/** An Access-Reject response to an Access-Request indicating that the RADIUS server could not authenticate the user. */
+define('RADIUS_ACCESS_REJECT', 3);
+
+/** An Accounting-Request, used to convey accounting information for a service to the RADIUS server. */
+define('RADIUS_ACCOUNTING_REQUEST', 4);
+
+/** An Accounting-Response response to an Accounting-Request. */
+define('RADIUS_ACCOUNTING_RESPONSE', 5);
+
+/** An Access-Challenge response to an Access-Request indicating that the RADIUS server requires further information in another Access-Request before authenticating the user. */
+define('RADIUS_ACCESS_CHALLENGE', 11);
+
+/**
+ * A Disconnect-Request, sent from the RADIUS server to indicate that the user session must be terminated.
+ * @since 1.3.0
+ */
+define('RADIUS_DISCONNECT_REQUEST', 40);
+
+/**
+ * A Disconnect-ACK, sent to the RADIUS server to indicate that the user session has been terminated.
+ * @since 1.3.0
+ */
+define('RADIUS_DISCONNECT_ACK', 41);
+
+/**
+ * A Disconnect-NAK, sent to the RADIUS server to indicate that the user session could not be terminated.
+ * @since 1.3.0
+ */
+define('RADIUS_DISCONNECT_NAK', 42);
+
+/**
+ * A CoA-Request, sent from the RADIUS server to indicate that the authorisations within the user session have changed. A response must be sent in the form of a CoA-ACK or a CoA-NAK.
+ * @since 1.3.0
+ */
+define('RADIUS_COA_REQUEST', 43);
+
+/**
+ * A CoA-ACK, sent to the RADIUS server to indicate that the user authorisations have been updated.
+ * @since 1.3.0
+ */
+define('RADIUS_COA_ACK', 44);
+
+/**
+ * A CoA-NAK, sent to the RADIUS server to indicate that the user authorisations could not be updated.
+ * @since 1.3.0
+ */
+define('RADIUS_COA_NAK', 45);
+
+/**
+ * RADIUS Attribute Types
+ * @link https://secure.php.net/manual/en/radius.constants.attributes.php
+ */
+
+/** The User-Name attribute. The attribute value is expected to be a string containing the name of the user being authenticated, and can be set using {@see radius_put_attr()}. */
+define('RADIUS_USER_NAME', 1);
+
+/**
+ * The User-Password attribute. The attribute value is expected to be a string containing the user's password, and can be set using {@see radius_put_attr()}. This value will be obfuscated on transmission as described in section 5.2 of RFC 2865.
+ * @link https://secure.php.net/manual/de/radius.constants.attributes.php */
+define('RADIUS_USER_PASSWORD', 2);
+
+/** The Chap-Password attribute. The attribute value is expected to be a string with the first byte containing the CHAP identifier, and the subsequent 16 bytes containing the MD5 hash of the CHAP identifier, the plaintext password and the CHAP challenge value concatenated together. Note that the CHAP challenge value should also be sent separately in a <b>{@see RADIUS_CHAP_CHALLENGE}</b> attribute. */
+define('RADIUS_CHAP_PASSWORD', 3);
+
+/** The NAS-IP-Address attribute. The attribute value is expected to the IP address of the RADIUS client encoded as an integer, which can be set using {@see radius_put_addr()}. */
+define('RADIUS_NAS_IP_ADDRESS', 4);
+
+/** The NAS-Port attribute. The attribute value is expected to be the physical port of the user on the RADIUS client encoded as an integer, which can be set using {@see radius_put_int()}. */
+define('RADIUS_NAS_PORT', 5);
+
+/**
+ * The Service-Type attribute. The attribute value indicates the service type the user is requesting, and is expected to be an integer, which can be set using {@see radius_put_int()}.
+ * A number of constants are provided to represent the possible values of this attribute. They include:
+ * - RADIUS_LOGIN
+ * - RADIUS_FRAMED
+ * - RADIUS_CALLBACK_LOGIN
+ * - RADIUS_CALLBACK_FRAMED
+ * - RADIUS_OUTBOUND
+ * - RADIUS_ADMINISTRATIVE
+ * - RADIUS_NAS_PROMPT
+ * - RADIUS_AUTHENTICATE_ONLY
+ * - RADIUS_CALLBACK_NAS_PROMPT
+ */
+define('RADIUS_SERVICE_TYPE', 6);
+define('RADIUS_LOGIN', 1);
+define('RADIUS_FRAMED', 2);
+define('RADIUS_CALLBACK_LOGIN', 3);
+define('RADIUS_CALLBACK_FRAMED', 4);
+define('RADIUS_OUTBOUND', 5);
+define('RADIUS_ADMINISTRATIVE', 6);
+define('RADIUS_NAS_PROMPT', 7);
+define('RADIUS_AUTHENTICATE_ONLY', 8);
+define('RADIUS_CALLBACK_NAS_PROMPT', 9);
+
+/**
+ * The Framed-Protocol attribute. The attribute value is expected to be an integer indicating the framing to be used for framed access, and can be set using {@see radius_put_int()}. The possible attribute values include these constants:
+ * - RADIUS_PPP
+ * - RADIUS_SLIP
+ * - RADIUS_ARAP
+ * - RADIUS_GANDALF
+ * - RADIUS_XYLOGICS
+ */
+define('RADIUS_FRAMED_PROTOCOL', 7);
+define('RADIUS_PPP', 1);
+define('RADIUS_SLIP', 2);
+define('RADIUS_ARAP', 3);
+define('RADIUS_GANDALF', 4);
+define('RADIUS_XYLOGICS', 5);
+
+/** The Framed-IP-Address attribute. The attribute value is expected to be the address of the user's network encoded as an integer, which can be set using {@see radius_put_addr()} and retrieved using {@see radius_cvt_addr()}. */
+define('RADIUS_FRAMED_IP_ADDRESS', 8);
+
+/** The Framed-IP-Netmask attribute. The attribute value is expected to be the netmask of the user's network encoded as an integer, which can be set using {@see radius_put_addr()} and retrieved using {@see radius_cvt_addr()}. */
+define('RADIUS_FRAMED_IP_NETMASK', 9);
+
+/**
+ * The Framed-Routing attribute. The attribute value is expected to be an integer indicating the routing method for the user, which can be set using {@see radius_put_int()}.<br>
+ * <br>
+ * Possible values include:
+ * - 0: No routing
+ * - 1: Send routing packets
+ * - 2: Listen for routing packets
+ * - 3: Send and listen
+ */
+define('RADIUS_FRAMED_ROUTING', 10);
+
+/** The Filter-ID attribute. The attribute value is expected to be an implementation-specific, human-readable string of filters, which can be set using {@see radius_put_attr()}.*/
+define('RADIUS_FILTER_ID', 11);
+
+/** The Framed-MTU attribute. The attribute value is expected to be an integer indicating the MTU to be configured for the user, and can be set using {@see radius_put_int()}.*/
+define('RADIUS_FRAMED_MTU', 12);
+
+/** The Framed-Compression attribute. The attribute value is expected to be an integer indicating the compression protocol to be used, and can be set using radius_put_int(). Possible values include these constants:
+ * - <b>RADIUS_COMP_NONE</b>: No compression
+ * - <b>RADIUS_COMP_VJ</b>: VJ TCP/IP header compression
+ * - <b>RADIUS_COMP_IPXHDR</b>: IPX header compression
+ * - <b>RADIUS_COMP_STAC_LZS</b>: Stac-LZS compression (added in PECL radius 1.3.0b2)
+ */
+define('RADIUS_FRAMED_COMPRESSION', 13);
+define('RADIUS_COMP_NONE', 0);
+define('RADIUS_COMP_VJ', 1);
+define('RADIUS_COMP_IPXHDR', 2);
+
+/** The Login-IP-Host attribute. The attribute value is expected to the IP address to connect the user to, encoded as an integer, which can be set using {@see radius_put_addr()}. */
+define('RADIUS_LOGIN_IP_HOST', 14);
+
+/** The Login-Service attribute. The attribute value is an integer indicating the service to connect the user to on the login host. The value can be converted to a PHP integer via {@see radius_cvt_int()}.*/
+define('RADIUS_LOGIN_SERVICE', 15);
+define('RADIUS_LOGIN_TCP_PORT', 16);
+define('RADIUS_REPLY_MESSAGE', 18);
+define('RADIUS_CALLBACK_NUMBER', 19);
+define('RADIUS_CALLBACK_ID', 20);
+define('RADIUS_FRAMED_ROUTE', 22);
+define('RADIUS_FRAMED_IPX_NETWORK', 23);
+define('RADIUS_STATE', 24);
+define('RADIUS_CLASS', 25);
+define('RADIUS_VENDOR_SPECIFIC', 26);
+define('RADIUS_SESSION_TIMEOUT', 27);
+define('RADIUS_IDLE_TIMEOUT', 28);
+define('RADIUS_TERMINATION_ACTION', 29);
+define('RADIUS_CALLED_STATION_ID', 30);
+define('RADIUS_CALLING_STATION_ID', 31);
+define('RADIUS_NAS_IDENTIFIER', 32);
+define('RADIUS_PROXY_STATE', 33);
+define('RADIUS_LOGIN_LAT_SERVICE', 34);
+define('RADIUS_LOGIN_LAT_NODE', 35);
+define('RADIUS_LOGIN_LAT_GROUP', 36);
+define('RADIUS_FRAMED_APPLETALK_LINK', 37);
+define('RADIUS_FRAMED_APPLETALK_NETWORK', 38);
+define('RADIUS_FRAMED_APPLETALK_ZONE', 39);
+define('RADIUS_CHAP_CHALLENGE', 60);
+define('RADIUS_NAS_PORT_TYPE', 61);
+define('RADIUS_ASYNC', 0);
+define('RADIUS_SYNC', 1);
+define('RADIUS_ISDN_SYNC', 2);
+define('RADIUS_ISDN_ASYNC_V120', 3);
+define('RADIUS_ISDN_ASYNC_V110', 4);
+define('RADIUS_VIRTUAL', 5);
+define('RADIUS_PIAFS', 6);
+define('RADIUS_HDLC_CLEAR_CHANNEL', 7);
+define('RADIUS_X_25', 8);
+define('RADIUS_X_75', 9);
+define('RADIUS_G_3_FAX', 10);
+define('RADIUS_SDSL', 11);
+define('RADIUS_ADSL_CAP', 12);
+define('RADIUS_ADSL_DMT', 13);
+define('RADIUS_IDSL', 14);
+define('RADIUS_ETHERNET', 15);
+define('RADIUS_XDSL', 16);
+define('RADIUS_CABLE', 17);
+define('RADIUS_WIRELESS_OTHER', 18);
+define('RADIUS_WIRELESS_IEEE_802_11', 19);
+define('RADIUS_PORT_LIMIT', 62);
+define('RADIUS_LOGIN_LAT_PORT', 63);
+define('RADIUS_CONNECT_INFO', 77);
+define('RADIUS_NAS_IPV6_ADDRESS', 95);
+define('RADIUS_FRAMED_INTERFACE_ID', 96);
+define('RADIUS_FRAMED_IPV6_PREFIX', 97);
+define('RADIUS_LOGIN_IPV6_HOST', 98);
+define('RADIUS_FRAMED_IPV6_ROUTE', 99);
+define('RADIUS_FRAMED_IPV6_POOL', 100);
+define('RADIUS_ERROR_CAUSE', 101);
+define('RADIUS_ERROR_CAUSE_RESIDUAL_SESSION_CONTEXT_REMOVED', 201);
+define('RADIUS_ERROR_CAUSE_INVALID_EAP_PACKET', 202);
+define('RADIUS_ERROR_CAUSE_UNSUPPORTED_ATTRIBUTE', 401);
+define('RADIUS_ERROR_CAUSE_MISSING_ATTRIBUTE', 402);
+define('RADIUS_ERROR_CAUSE_NAS_IDENTIFICATION_MISMATCH', 403);
+define('RADIUS_ERROR_CAUSE_INVALID_REQUEST', 404);
+define('RADIUS_ERROR_CAUSE_UNSUPPORTED_SERVICE', 405);
+define('RADIUS_ERROR_CAUSE_UNSUPPORTED_EXCEPTION', 406);
+define('RADIUS_ERROR_CAUSE_ADMINISTRATIVELY_PROHIBITED', 501);
+define('RADIUS_ERROR_CAUSE_REQUEST_NOT_ROUTABLE', 502);
+define('RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_FOUND', 503);
+define('RADIUS_ERROR_CAUSE_SESSION_CONTEXT_NOT_REMOVABLE', 504);
+define('RADIUS_ERROR_CAUSE_OTHER_PROXY_PROCESSING_ERROR', 505);
+define('RADIUS_ERROR_CAUSE_RESOURCES_UNAVAILABLE', 506);
+define('RADIUS_ERROR_CAUSE_REQUEST_INITIATED', 507);
+define('RADIUS_ACCT_STATUS_TYPE', 40);
+define('RADIUS_START', 1);
+define('RADIUS_STOP', 2);
+define('RADIUS_ACCOUNTING_ON', 7);
+define('RADIUS_ACCOUNTING_OFF', 8);
+define('RADIUS_ACCT_DELAY_TIME', 41);
+define('RADIUS_ACCT_INPUT_OCTETS', 42);
+define('RADIUS_ACCT_OUTPUT_OCTETS', 43);
+define('RADIUS_ACCT_SESSION_ID', 44);
+define('RADIUS_ACCT_AUTHENTIC', 45);
+define('RADIUS_AUTH_RADIUS', 1);
+define('RADIUS_AUTH_LOCAL', 2);
+define('RADIUS_AUTH_REMOTE', 3);
+define('RADIUS_ACCT_SESSION_TIME', 46);
+define('RADIUS_ACCT_INPUT_PACKETS', 47);
+define('RADIUS_ACCT_OUTPUT_PACKETS', 48);
+define('RADIUS_ACCT_TERMINATE_CAUSE', 49);
+define('RADIUS_TERM_USER_REQUEST', 1);
+define('RADIUS_TERM_LOST_CARRIER', 2);
+define('RADIUS_TERM_LOST_SERVICE', 3);
+define('RADIUS_TERM_IDLE_TIMEOUT', 4);
+define('RADIUS_TERM_SESSION_TIMEOUT', 5);
+define('RADIUS_TERM_ADMIN_RESET', 6);
+define('RADIUS_TERM_ADMIN_REBOOT', 7);
+define('RADIUS_TERM_PORT_ERROR', 8);
+define('RADIUS_TERM_NAS_ERROR', 9);
+define('RADIUS_TERM_NAS_REQUEST', 10);
+define('RADIUS_TERM_NAS_REBOOT', 11);
+define('RADIUS_TERM_PORT_UNNEEDED', 12);
+define('RADIUS_TERM_PORT_PREEMPTED', 13);
+define('RADIUS_TERM_PORT_SUSPENDED', 14);
+define('RADIUS_TERM_SERVICE_UNAVAILABLE', 15);
+define('RADIUS_TERM_CALLBACK', 16);
+define('RADIUS_TERM_USER_ERROR', 17);
+define('RADIUS_TERM_HOST_REQUEST', 18);
+define('RADIUS_ACCT_MULTI_SESSION_ID', 50);
+define('RADIUS_ACCT_LINK_COUNT', 51);
+define('RADIUS_VENDOR_MICROSOFT', 311);
+define('RADIUS_MICROSOFT_MS_CHAP_RESPONSE', 1);
+define('RADIUS_MICROSOFT_MS_CHAP_ERROR', 2);
+define('RADIUS_MICROSOFT_MS_CHAP_PW_1', 3);
+define('RADIUS_MICROSOFT_MS_CHAP_PW_2', 4);
+define('RADIUS_MICROSOFT_MS_CHAP_LM_ENC_PW', 5);
+define('RADIUS_MICROSOFT_MS_CHAP_NT_ENC_PW', 6);
+define('RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_POLICY', 7);
+define('RADIUS_MICROSOFT_MS_MPPE_ENCRYPTION_TYPES', 8);
+define('RADIUS_MICROSOFT_MS_RAS_VENDOR', 9);
+define('RADIUS_MICROSOFT_MS_CHAP_DOMAIN', 10);
+define('RADIUS_MICROSOFT_MS_CHAP_CHALLENGE', 11);
+define('RADIUS_MICROSOFT_MS_CHAP_MPPE_KEYS', 12);
+define('RADIUS_MICROSOFT_MS_BAP_USAGE', 13);
+define('RADIUS_MICROSOFT_MS_LINK_UTILIZATION_THRESHOLD', 14);
+define('RADIUS_MICROSOFT_MS_LINK_DROP_TIME_LIMIT', 15);
+define('RADIUS_MICROSOFT_MS_MPPE_SEND_KEY', 16);
+define('RADIUS_MICROSOFT_MS_MPPE_RECV_KEY', 17);
+define('RADIUS_MICROSOFT_MS_RAS_VERSION', 18);
+define('RADIUS_MICROSOFT_MS_OLD_ARAP_PASSWORD', 19);
+define('RADIUS_MICROSOFT_MS_NEW_ARAP_PASSWORD', 20);
+define('RADIUS_MICROSOFT_MS_ARAP_PASSWORD_CHANGE_REASON', 21);
+define('RADIUS_MICROSOFT_MS_FILTER', 22);
+define('RADIUS_MICROSOFT_MS_ACCT_AUTH_TYPE', 23);
+define('RADIUS_MICROSOFT_MS_ACCT_EAP_TYPE', 24);
+define('RADIUS_MICROSOFT_MS_CHAP2_RESPONSE', 25);
+define('RADIUS_MICROSOFT_MS_CHAP2_SUCCESS', 26);
+define('RADIUS_MICROSOFT_MS_CHAP2_PW', 27);
+define('RADIUS_MICROSOFT_MS_PRIMARY_DNS_SERVER', 28);
+define('RADIUS_MICROSOFT_MS_SECONDARY_DNS_SERVER', 29);
+define('RADIUS_MICROSOFT_MS_PRIMARY_NBNS_SERVER', 30);
+define('RADIUS_MICROSOFT_MS_SECONDARY_NBNS_SERVER', 31);
+define('RADIUS_MICROSOFT_MS_ARAP_CHALLENGE', 33);
+define('RADIUS_OPTION_NONE', RADIUS_OPTION_NONE);
+define('RADIUS_OPTION_TAGGED', RADIUS_OPTION_TAGGED);
+define('RADIUS_OPTION_SALT', RADIUS_OPTION_SALT);
+
+/**
+ * Creates a Radius handle for accounting
+ * @link https://secure.php.net/manual/en/function.radius-acct-open.php
+ * @return resource|bool Returns a handle on success, <b>FALSE</b> on error. This function only fails if insufficient memory is available.
+ * @since 1.1.0
+ */
+function radius_acct_open() { }
+
+/**
+ * <b>radius_add_server()</b> may be called multiple times, and it may be used together with {@see radius_config()}. At most 10 servers may be specified. When multiple servers are given, they are tried in round-robin fashion until a valid response is received, or until each server's max_tries limit has been reached.
+ * @link https://secure.php.net/manual/en/function.radius-add-server.php
+ * @param resource $radius_handle
+ * @param string $hostname The <b>hostname</b> parameter specifies the server host, either as a fully qualified domain name or as a dotted-quad IP address in text form.
+ * @param int $port The <b>port</b> specifies the UDP port to contact on the server.<br>
+ *                  If port is given as 0, the library looks up the radius/udp or radacct/udp service in the network services database, and uses the port found there.<br>
+ *                  If no entry is found, the library uses the standard Radius ports, 1812 for authentication and 1813 for accounting.
+ * @param string $secret The shared secret for the server host is passed to the <b>secret</b> parameter. The Radius protocol ignores all but the leading 128 bytes of the shared secret.
+ * @param int $timeout The timeout for receiving replies from the server is passed to the <b>timeout</b> parameter, in units of seconds.
+ * @param int $max_tries The maximum number of repeated requests to make before giving up is passed into the <b>max_tries</b>.
+ * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+ * @see radius_config()
+ * @since 1.1.0
+ */
+function radius_add_server($radius_handle , $hostname, $port , $secret, $timeout, $max_tries) { }
+
+/**
+ * Creates a Radius handle for authentication
+ * @link https://secure.php.net/manual/en/function.radius-auth-open.php
+ * @return resource|bool Returns a handle on success, <b>FALSE</b> on error. This function only fails if insufficient memory is available.
+ * @since 1.1.0
+ */
+function radius_auth_open() { }
+
+/**
+ * Free all ressources. It is not needed to call this function because php frees all resources at the end of each request.
+ * @link https://secure.php.net/manual/en/function.radius-close.php
+ * @param resource $radius_handle
+ * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+ * @since 1.1.0
+ */
+function radius_close($radius_handle) { }
+
+/**
+ * Before issuing any Radius requests, the library must be made aware of the servers it can contact. The easiest way to configure the library is to call <b>radius_config()</b>. <b>radius_config()</b> causes the library to read a configuration file whose format is described in radius.conf.
+ * @link https://secure.php.net/manual/en/function.radius-config.php
+ * @link https://www.freebsd.org/cgi/man.cgi?query=radius.conf
+ * @param resource $radius_handle
+ * @param string $file The pathname of the configuration file is passed as the file argument to {@see radius_config()}. The library can also be configured programmatically by calls to <b>{@see radius_add_server()}</b>.
+ * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+ * @see radius_add_server()
+ * @since 1.1.0
+ */
+function radius_config($radius_handle, $file) { }
+
+/**
+ * A Radius request consists of a code specifying the kind of request, and zero or more attributes which provide additional information. To begin constructing a new request, call <b>radius_create_request()</b>.<br />
+ * <b>Note:</b> Attention: You must call this function, before you can put any attribute!
+ * @link https://secure.php.net/manual/en/function.radius-create-request.php
+ * @param resource $radius_handle
+ * @param int $type Type is <b>RADIUS_ACCESS_REQUEST</b> or <b>RADIUS_ACCOUNTING_REQUEST</b>.
+ * @return bool Returns <b>TRUE</b> on success or <b>FALSE</b> on failure.
+ * @see radius_send_request()
+ * @since 1.1.0
+ */
+function radius_create_request($radius_handle, $type) { }
\ No newline at end of file
-- 
GitLab