# php_manual

id: rnp_op_generate_key
type: function
doc:
<comment>Description:</comment>
  Generate key

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>      The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$userid</strong>   PGP User ID - text that is intended to represent the name and email address of
                    the key holder.
  <info>string</info>  <strong>$key_alg</strong>  Primary key algorithm (i.e. 'RSA', 'DSA', etc).
  <info>string</info>  <strong>$sub_alg</strong>  Subkey algorithm. If not set, subkey will not be generated.
  <info>array</info>   <strong>$options</strong>  An associative array with options.

<comment>Return:</comment>
  <info>string|false</info>  Fingerprint of the generated primary key or <info>false</info> on failure. This fingerprint can
                be used later to reference the key in sign and encrypt operations. The key data is
                stored in FFI memory context and can be saved using <strong>rnp_save_keys()</strong> or
                <strong>rnp_save_keys_to_path()</strong>.


id: rnp_op_sign
type: function
doc:
<comment>Description:</comment>
  Perform signing operation on a binary data, return embedded signature(s)

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>      The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$data</strong>     Data to be signed.
  <info>array</info>   <strong>$keys_fp</strong>  Array with key fingerprints. At least one key must be provided. Keys should be
                    present in <strong>$ffi</strong>.
  <info>array</info>   <strong>$options</strong>  An associative array with options.

<comment>Return:</comment>
  <info>string|false</info>  Data with embedded signature(s) on success or <info>false</info> on failure.


id: rnp_op_sign_cleartext
type: function
doc:
<comment>Description:</comment>
  Perform signing operation on a textual data, return cleartext signed message

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>      The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$data</strong>     Data to be signed.
  <info>array</info>   <strong>$keys_fp</strong>  Array with key fingerprints. At least one key must be provided. Keys should be
                    present in <strong>$ffi</strong>.
  <info>array</info>   <strong>$options</strong>  An associative array with options.

<comment>Return:</comment>
  <info>string|false</info>  Cleartext signed message containing source data with additional headers and
                ASCII-armored signature on success or <info>false</info> on failure.


id: rnp_op_sign_detached
type: function
doc:
<comment>Description:</comment>
  Perform signing operation, return detached signature(s)

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>      The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$data</strong>     Data to be signed.
  <info>array</info>   <strong>$keys_fp</strong>  Array with key fingerprints. At least one key must be provided. Keys should be
                    present in <strong>$ffi</strong>.
  <info>array</info>   <strong>$options</strong>  An associative array with options.

<comment>Return:</comment>
  <info>string|false</info>  Detached signature(s) data on success or <info>false</info> on failure.


id: rnp_op_verify
type: function
doc:
<comment>Description:</comment>
  Verify embedded or cleartext signatures

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>   The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$data</strong>  Signed data.

<comment>Return:</comment>
  <info>array|false</info>  An associative array with information about verification results or <info>false</info> on failure.
               
               "signatures" sub-array.


id: rnp_op_verify_detached
type: function
doc:
<comment>Description:</comment>
  Verify detached signatures

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>        The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$data</strong>       Source data.
  <info>string</info>  <strong>$signature</strong>  Detached signature data.

<comment>Return:</comment>
  <info>array|false</info>  An associative array with information about verification results or <info>false</info> on failure.
               
               "signatures" sub-array.


id: rnp_save_keys
type: function
doc:
<comment>Description:</comment>
  Save keys to PHP string
  
  Note that for G10, the output must be a directory (which must already exist).

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>     The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$format</strong>  The key format of the data (GPG, KBX, G10).
  <info>string</info>  <strong>$output</strong>  key packets will be saved to the string referenced by <strong>$output</strong>.
  <info>int</info>     <strong>$flags</strong>   See RNP_LOAD_SAVE_* flags description.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rnp_save_keys_to_path
type: function
doc:
<comment>Description:</comment>
  Save keys to specified path
  
  Saves keys present in the FFI object (loaded or generated) to the specified file or directory.

<comment>Param:</comment>
  <info>RnpFFI</info>  <strong>$ffi</strong>          The FFI object returned by rnp_ffi_create.
  <info>string</info>  <strong>$format</strong>       The key format of the data (GPG, KBX, G10).
  <info>string</info>  <strong>$output_path</strong>  File or directory path where keys should be saved to.
  <info>int</info>     <strong>$flags</strong>        See RNP_LOAD_SAVE_* flags description.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rnp_supported_features
type: function
doc:
<comment>Description:</comment>
  Get supported features in JSON format
  
  Get the JSON formatted string containing array of supported rnp feature values (algorithms,
  curves, etc) by type.

<comment>Param:</comment>
  <info>string</info>  <strong>$type</strong>  See RNP_FEATURE_* constants for supported values.

<comment>Return:</comment>
  <info>string|false</info>  String containing JSON formatted array of supported algorithms, curves, etc or <info>false</info>
                on failure.


id: rnp_version_string
type: function
doc:
<comment>Description:</comment>
  RNP library version

<comment>Return:</comment>
  <info>string</info>  Returns RNP library version string.


id: rnp_version_string_full
type: function
doc:
<comment>Description:</comment>
  Full version string of RNP library

<comment>Return:</comment>
  <info>string</info>  Returns full version string of RNP library.


id: round
type: function
doc:
<comment>Description:</comment>
  Rounds a float
  
  Returns the rounded value of <strong>$num</strong> to specified <strong>$precision</strong> (number of digits after the decimal
  point). <strong>$precision</strong> can also be negative or zero (default).

<comment>Param:</comment>
  <info>int|float</info>  <strong>$num</strong>        The value to round.
  <info>int</info>        <strong>$precision</strong>  The optional number of decimal digits to round to.
                         
                         If the <strong>$precision</strong> is positive, <strong>$num</strong> is rounded to <strong>$precision</strong> significant
                         digits after the decimal point.
                         
                         If the <strong>$precision</strong> is negative, <strong>$num</strong> is rounded to <strong>$precision</strong> significant
                         digits before the decimal point, i.e. to the nearest multiple of pow(10,
                         -$precision), e.g. for a <strong>$precision</strong> of -1 <strong>$num</strong> is rounded to tens, for a
                         <strong>$precision</strong> of -2 to hundreds, etc.
  <info>int</info>        <strong>$mode</strong>       Use one of the following constants to specify the mode in which rounding
                         occurs. ConstantsDescription<info>PHP_ROUND_HALF_UP</info> Rounds <strong>$num</strong> away from zero
                         when it is half way there, making 1.5 into 2 and -1.5 into -2.
                         <info>PHP_ROUND_HALF_DOWN</info> Rounds <strong>$num</strong> towards zero when it is half way there,
                         making 1.5 into 1 and -1.5 into -1. <info>PHP_ROUND_HALF_EVEN</info> Rounds <strong>$num</strong> towards
                         the nearest even value when it is half way there, making both 1.5 and 2.5
                         into 2. <info>PHP_ROUND_HALF_ODD</info> Rounds <strong>$num</strong> towards the nearest odd value when
                         it is half way there, making 1.5 into 1 and 2.5 into 3.

<comment>Return:</comment>
  <info>float</info>  The value rounded to the given <strong>$precision</strong> as a <info>float</info>.

<comment>See Also:</comment>
   * <strong>ceil()</strong>
   * <strong>floor()</strong>
   * <strong>number_format()</strong>


id: rpmaddtag
type: function
doc:
<comment>Description:</comment>
  Add tag retrieved in query
  
  Add an additional retrieved tag in subsequent queries.

<comment>Param:</comment>
  <info>int</info>  <strong>$tag</strong>  One of RPMTAG_* constant, see the rpminfo constants page.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>rpminfo()</strong>
   * <strong>rpmdbinfo()</strong>
   * <strong>rpmdbsearch()</strong>


id: rpmdbinfo
type: function
doc:
<comment>Description:</comment>
  Get information from installed RPM
  
  Retrieve information about an installed package, from the system RPM database.

<comment>Param:</comment>
  <info>string</info>  <strong>$nevr</strong>  Name with optional epoch, version and release.
  <info>bool</info>    <strong>$full</strong>  If <info>true</info> all information headers for the file are retrieved, else only a minimal
                 set.

<comment>Return:</comment>
  <info>array|null</info>  An <info>array</info> of <info>array</info> of information or NULL on error.

<comment>See Also:</comment>
   * <strong>rpmaddtag()</strong>


id: rpmdbsearch
type: function
doc:
<comment>Description:</comment>
  Search RPM packages
  
  Search packages in the system RPM database.

<comment>Param:</comment>
  <info>string</info>  <strong>$pattern</strong>  Value to search for.
  <info>int</info>     <strong>$rpmtag</strong>   Search criterion, one of RPMTAG_* constant, see the rpminfo constants page.
  <info>int</info>     <strong>$rpmmire</strong>  Pattern type, one of RPMMIRE_* constant, see the rpminfo constants page. When
                    \< 0 the criterion must equals the value, and database index is used if possible.
  <info>bool</info>    <strong>$full</strong>     If <info>true</info> all information headers for the file are retrieved, else only a minimal
                    set.

<comment>Return:</comment>
  <info>array|null</info>  An <info>array</info> of <info>array</info> of information or NULL on error.

<comment>See Also:</comment>
   * <strong>rpmaddtag()</strong>


id: rpmgetsymlink
type: function
doc:
<comment>Description:</comment>
  Get target of a symlink
  
  Get target of a symlink.

<comment>Param:</comment>
  <info>string</info>  <strong>$path</strong>  Path of the RPM file.
  <info>string</info>  <strong>$name</strong>  Name of the symlink file.

<comment>Return:</comment>
  <info>string|null</info>  A <info>string</info> with target of the symlink, NULL on error, or an empty string if not a
               symlink.


id: rpminfo
type: function
doc:
<comment>Description:</comment>
  Get information from a RPM file
  
  Retrieve information about a local file, a RPM package.

<comment>Param:</comment>
  <info>string</info>  <strong>$path</strong>   Path of the RPM file.
  <info>bool</info>    <strong>$full</strong>   If <info>true</info> all information headers for the file are retrieved, else only a minimal
                  set.
  <info>string</info>  <strong>$error</strong>  If provided, will receive the possible error message, and will avoid a runtime
                  warning.

<comment>Return:</comment>
  <info>array|null</info>  An <info>array</info> of information or NULL on error.

<comment>See Also:</comment>
   * <strong>rpmaddtag()</strong>


id: rpmvercmp
type: function
doc:
<comment>Description:</comment>
  RPM version comparison
  
  Compare 2 RPM versions.

<comment>Param:</comment>
  <info>string</info>       <strong>$evr1</strong>      First epoch:version-release string
  <info>string</info>       <strong>$evr2</strong>      Second epoch:version-release string
  <info>string|null</info>  <strong>$operator</strong>  An optional operator. The possible operators are: <return>\<</return>, <return>lt</return>, <return>\<=</return>, <return>le</return>, <return>&gt;</return>, <return>gt</return>, <return>&gt;=</return>, <return>ge</return>, <return>==</return>, <return>=</return>, <return>eq</return>, <return>!=</return>, <return>\<&gt;</return>, <return>ne</return> respectively.
                          
                          This parameter is case-sensitive, values should be lowercase.

<comment>Return:</comment>
  <info>int|bool</info>  Returns
            \< 0 if evr1 is less than evr2, &gt; 0 if evr1 is greater than evr2, and 0 if they are equal.
            
            When using the optional <strong>$operator</strong> argument, the function will return <info>true</info> if the
            relationship is the one specified by the operator, <info>false</info> otherwise.


id: rrd_create
type: function
doc:
<comment>Description:</comment>
  Creates rrd database file
  
  Creates the rdd database file.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  Filename for newly created rrd file.
  <info>array</info>   <strong>$options</strong>   Options for rrd create - list of strings. See man page of rrd create for whole
                     list of options.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rrd_error
type: function
doc:
<comment>Description:</comment>
  Gets latest error message
  
  Returns latest global rrd error message.

<comment>Return:</comment>
  <info>string</info>  Latest error message.


id: rrd_fetch
type: function
doc:
<comment>Description:</comment>
  Fetch the data for graph as array
  
  Gets data for graph output from RRD database file as array. This function has same result as
  <strong>rrd_graph()</strong>,  but fetched data are returned as array, no image file is created.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  RRD database file name.
  <info>array</info>   <strong>$options</strong>   Array of options for resolution specification.

<comment>Return:</comment>
  <info>array</info>  Returns information about retrieved graph data.


id: rrd_first
type: function
doc:
<comment>Description:</comment>
  Gets the timestamp of the first sample from rrd file
  
  Returns the first data sample from the specified RRA of the RRD file.

<comment>Param:</comment>
  <info>string</info>  <strong>$file</strong>      RRD database file name.
  <info>int</info>     <strong>$raaindex</strong>  The index number of the RRA that is to be examined. Default value is 0.

<comment>Return:</comment>
  <info>int</info>  Integer number of unix timestamp, or <info>false</info> on failure.


id: rrd_graph
type: function
doc:
<comment>Description:</comment>
  Creates image from a data
  
  Creates image for a particular data from RRD file.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  The filename to output the graph to. This will generally end in either <return>.png</return>,
                     <return>.svg</return> or <return>.eps</return>, depending on the format you want to output.
  <info>array</info>   <strong>$options</strong>   Options for generating image. See man page of rrd graph for all possible
                     options. All options (data definitions, variable definitions, etc.) are
                     allowed.

<comment>Return:</comment>
  <info>array</info>  Array with information about generated image is returned, or <info>false</info> on failure.


id: rrd_info
type: function
doc:
<comment>Description:</comment>
  Gets information about rrd file
  
  Returns information about particular RRD database file.

<comment>Param:</comment>
  <info></info>  <strong>$file</strong>  RRD database file name.

<comment>Return:</comment>
  <info>array</info>  Array with information about requested RRD file, or <info>false</info> on failure.


id: rrd_last
type: function
doc:
<comment>Description:</comment>
  Gets unix timestamp of the last sample
  
  Returns the UNIX timestamp of the most recent update of the RRD database.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  RRD database file name.

<comment>Return:</comment>
  <info>int</info>  Integer as unix timestamp of the most recent data from the RRD database.


id: rrd_lastupdate
type: function
doc:
<comment>Description:</comment>
  Gets information about last updated data
  
  Gets array of the UNIX timestamp and the values stored for each date in the most recent update of
  the RRD database file.

<comment>Param:</comment>
  <info></info>  <strong>$file</strong>  RRD database file name.

<comment>Return:</comment>
  <info>array</info>  Array of information about last update, or <info>false</info> on failure.


id: rrd_restore
type: function
doc:
<comment>Description:</comment>
  Restores the RRD file from XML dump
  
  Restores the RRD file from the XML dump.

<comment>Param:</comment>
  <info>string</info>  <strong>$xml_file</strong>  XML filename with the dump of the original RRD database file.
  <info>string</info>  <strong>$rrd_file</strong>  Restored RRD database file name.
  <info>array</info>   <strong>$options</strong>   Array of options for restoring. See man page for rrd restore.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rrd_tune
type: function
doc:
<comment>Description:</comment>
  Tunes some RRD database file header options
  
  Change some options in the RRD dabase header file. E.g. renames the source for the data etc.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  RRD database file name.
  <info>array</info>   <strong>$options</strong>   Options with RRD database file properties which will be changed. See rrd tune
                     man page for details.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rrd_update
type: function
doc:
<comment>Description:</comment>
  Updates the RRD database
  
  Updates the RRD database file. The input data is time interpolated according to the properties of
  the RRD database file.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  RRD database file name. This database will be updated.
  <info>array</info>   <strong>$options</strong>   Options for updating the RRD database. This is list of strings. See man page of
                     rrd update for whole list of options.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: rrd_version
type: function
doc:
<comment>Description:</comment>
  Gets information about underlying rrdtool library
  
  Returns information about underlying rrdtool library.

<comment>Return:</comment>
  <info>string</info>  String with rrdtool version number e.g. "1.4.3".


id: rrd_xport
type: function
doc:
<comment>Description:</comment>
  Exports the information about RRD database
  
  Exports the information about RRD database file. This data can be converted to XML file via user
  space PHP script and then restored back as RRD database file.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  Array of options for the export, see rrd xport man page.

<comment>Return:</comment>
  <info>array</info>  Array with information about RRD database file, or <info>false</info> on failure.


id: rrdc_disconnect
type: function
doc:
<comment>Description:</comment>
  Close any outstanding connection to rrd caching daemon
  
  Close any outstanding connection to rrd caching daemon.
  
  This function is automatically called when the whole PHP process is terminated. It depends on used
  SAPI. For example, it's called automatically at the end of command line script.
  
  It's up user whether he wants to call this function at the end of every request or otherwise.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: rsort
type: function
doc:
<comment>Description:</comment>
  Sort an array in descending order
  
  Sorts <strong>$array</strong> in place by values in descending order.
  
  If two members compare as equal, they retain their original order. Prior to PHP 8.0.0, their
  relative order in the sorted array was undefined.
  
  This function
  assigns new keys to the elements in <strong>$array</strong>.
  It will remove any existing keys that may have been assigned, rather
  than just reordering the keys.
  
  Resets array's internal pointer to the first element.

<comment>Param:</comment>
  <info>array</info>  <strong>$array</strong>  The input array.
  <info>int</info>    <strong>$flags</strong>  The optional second parameter <strong>$flags</strong> may be used to modify the sorting behavior
                 using these values:
                 
                 Sorting type flags: <info>SORT_REGULAR</info> - compare items normally; the details are
                 described in the comparison operators section<info>SORT_NUMERIC</info> - compare items
                 numerically<info>SORT_STRING</info> - compare items as strings<info>SORT_LOCALE_STRING</info> - compare items
                 as strings, based on the current locale. It uses the locale, which can be changed
                 using <strong>setlocale()</strong> <info>SORT_NATURAL</info> - compare items as strings using "natural ordering"
                 like <strong>natsort()</strong> <info>SORT_FLAG_CASE</info> - can be combined (bitwise OR) with <info>SORT_STRING</info> or
                 <info>SORT_NATURAL</info> to sort strings case-insensitively
                 
                 <info>SORT_REGULAR</info> - compare items normally; the details are described in the comparison
                 operators section
                 
                 <info>SORT_NUMERIC</info> - compare items numerically
                 
                 <info>SORT_STRING</info> - compare items as strings
                 
                 <info>SORT_LOCALE_STRING</info> - compare items as strings, based on the current locale. It uses
                 the locale, which can be changed using <strong>setlocale()</strong>
                 
                 <info>SORT_NATURAL</info> - compare items as strings using "natural ordering" like <strong>natsort()</strong>
                 
                 <info>SORT_FLAG_CASE</info> - can be combined (bitwise OR) with <info>SORT_STRING</info> or <info>SORT_NATURAL</info> to
                 sort strings case-insensitively

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * <strong>sort()</strong>
   * <strong>arsort()</strong>
   * <strong>krsort()</strong>
   * The comparison of array sorting functions


id: rtrim
type: function
doc:
<comment>Description:</comment>
  Strip whitespace (or other characters) from the end of a string
  
  This function returns a string with whitespace (or other characters) stripped from the end of
  <strong>$string</strong>.
  
  Without the second parameter, <strong>rtrim()</strong> will strip these characters:   " " (ASCII <return>32</return> (<return>0x20</return>)), an
  ordinary space.  "\t" (ASCII <return>9</return> (<return>0x09</return>)), a tab.  "\n" (ASCII <return>10</return> (<return>0x0A</return>)), a new line (line feed).
  "\r" (ASCII <return>13</return> (<return>0x0D</return>)), a carriage return.  "\0" (ASCII <return>0</return> (<return>0x00</return>)), the <return>NULL</return>-byte.  "\v" (ASCII <return>11</return>
  (<return>0x0B</return>)), a vertical tab.
  
  " " (ASCII <return>32</return> (<return>0x20</return>)), an ordinary space.
  
  "\t" (ASCII <return>9</return> (<return>0x09</return>)), a tab.
  
  "\n" (ASCII <return>10</return> (<return>0x0A</return>)), a new line (line feed).
  
  "\r" (ASCII <return>13</return> (<return>0x0D</return>)), a carriage return.
  
  "\0" (ASCII <return>0</return> (<return>0x00</return>)), the <return>NULL</return>-byte.
  
  "\v" (ASCII <return>11</return> (<return>0x0B</return>)), a vertical tab.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>      The input string.
  <info>string</info>  <strong>$characters</strong>  You can also specify the characters you want to strip, by means of the
                       <strong>$characters</strong> parameter. Simply list all characters that you want to be
                       stripped. With <return>..</return> you can specify a range of characters.

<comment>Return:</comment>
  <info>string</info>  Returns the modified string.

<comment>See Also:</comment>
   * <strong>trim()</strong>
   * <strong>ltrim()</strong>


id: runkit7_constant_add
type: function
doc:
<comment>Description:</comment>
  Similar to define(), but allows defining in class definitions as well

<comment>Param:</comment>
  <info>string</info>  <strong>$constant_name</strong>  Name of constant to declare.  Either a string to indicate a global
                          constant, or <return>classname::constname</return> to indicate a class constant.
  <info>mixed</info>   <strong>$value</strong>          NULL, Bool, Long, Double, String, Array, or Resource value to store in the
                          new constant.
  <info>int</info>     <strong>$newVisibility</strong>  Visibility of the constant, for class constants. Public by default. One of
                          the <info>RUNKIT7_ACC_*</info> constants.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>define()</strong>
   * <strong>runkit7_constant_redefine()</strong>
   * <strong>runkit7_constant_remove()</strong>


id: runkit7_constant_redefine
type: function
doc:
<comment>Description:</comment>
  Redefine an already defined constant

<comment>Param:</comment>
  <info>string</info>  <strong>$constant_name</strong>   Constant to redefine.  Either the name of a global constant, or
                           <return>classname::constname</return> indicating class constant.
  <info>mixed</info>   <strong>$value</strong>           Value to assign to the constant.
  <info>int</info>     <strong>$new_visibility</strong>  The new visibility of the constant, for class constants. Unchanged by
                           default. One of the <info>RUNKIT7_ACC_*</info> constants.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_constant_add()</strong>
   * <strong>runkit7_constant_remove()</strong>


id: runkit7_constant_remove
type: function
doc:
<comment>Description:</comment>
  Remove/Delete an already defined constant

<comment>Param:</comment>
  <info>string</info>  <strong>$constant_name</strong>  Name of the constant to remove.  Either the name of a global constant, or
                          <return>classname::constname</return> indicating a class constant.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>define()</strong>
   * <strong>runkit7_constant_add()</strong>
   * <strong>runkit7_constant_redefine()</strong>


id: runkit7_function_add
type: function
doc:
<comment>Description:</comment>
  Add a new function, similar to create_function

<comment>Param:</comment>
  <info>string</info>   <strong>$function_name</strong>        Name of the function to be created
  <info>string</info>   <strong>$argument_list</strong>        Comma separated argument list
  <info>string</info>   <strong>$code</strong>                 Code making up the function
  <info>Closure</info>  <strong>$closure</strong>              A <class>closure</class> that defines the function.
  <info>bool</info>     <strong>$return_by_reference</strong>  Whether the function should return by reference.
  <info>string</info>   <strong>$doc_comment</strong>          The doc comment of the function.
  <info>string</info>   <strong>$return_type</strong>          The return type of the function.
  <info>bool</info>     <strong>$is_strict</strong>            Whether the function should behave as if it were declared in a file
                                 with <return>strict_types=1</return>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>create_function()</strong>
   * <strong>runkit7_function_redefine()</strong>
   * <strong>runkit7_function_copy()</strong>
   * <strong>runkit7_function_rename()</strong>
   * <strong>runkit7_function_remove()</strong>
   * <strong>runkit7_method_add()</strong>


id: runkit7_function_copy
type: function
doc:
<comment>Description:</comment>
  Copy a function to a new function name

<comment>Param:</comment>
  <info>string</info>  <strong>$source_name</strong>  Name of the existing function
  <info>string</info>  <strong>$target_name</strong>  Name of the new function to copy the definition to

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_function_add()</strong>
   * <strong>runkit7_function_redefine()</strong>
   * <strong>runkit7_function_rename()</strong>
   * <strong>runkit7_function_remove()</strong>


id: runkit7_function_redefine
type: function
doc:
<comment>Description:</comment>
  Replace a function definition with a new implementation
    
  
  By default, only
  userspace functions may be removed, renamed, or modified.  In order to
  override internal functions, you must enable the
  <return>runkit.internal_override</return> setting in php.ini.

<comment>Param:</comment>
  <info>string</info>   <strong>$function_name</strong>        Name of function to redefine
  <info>string</info>   <strong>$argument_list</strong>        New list of arguments to be accepted by function
  <info>string</info>   <strong>$code</strong>                 New code implementation
  <info>Closure</info>  <strong>$closure</strong>              A <class>closure</class> that defines the function.
  <info>bool</info>     <strong>$return_by_reference</strong>  Whether the function should return by reference.
  <info>string</info>   <strong>$doc_comment</strong>          The doc comment of the function.
  <info>string</info>   <strong>$return_type</strong>          The return type of the function.
  <info>bool</info>     <strong>$is_strict</strong>            Whether the function behaves as if it was declared in a file with
                                 <return>strict_types=1</return>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_function_add()</strong>
   * <strong>runkit7_function_copy()</strong>
   * <strong>runkit7_function_rename()</strong>
   * <strong>runkit7_function_remove()</strong>
   * <strong>runkit7_method_redefine()</strong>


id: runkit7_function_remove
type: function
doc:
<comment>Description:</comment>
  Remove a function definition
    
  
  By default, only
  userspace functions may be removed, renamed, or modified.  In order to
  override internal functions, you must enable the
  <return>runkit.internal_override</return> setting in php.ini.

<comment>Param:</comment>
  <info>string</info>  <strong>$function_name</strong>  Name of the function to be deleted

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_function_add()</strong>
   * <strong>runkit7_function_copy()</strong>
   * <strong>runkit7_function_redefine()</strong>
   * <strong>runkit7_function_rename()</strong>


id: runkit7_function_rename
type: function
doc:
<comment>Description:</comment>
  Change a function's name
    
  
  By default, only
  userspace functions may be removed, renamed, or modified.  In order to
  override internal functions, you must enable the
  <return>runkit.internal_override</return> setting in php.ini.

<comment>Param:</comment>
  <info>string</info>  <strong>$source_name</strong>  Current function name
  <info>string</info>  <strong>$target_name</strong>  New function name

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_function_add()</strong>
   * <strong>runkit7_function_copy()</strong>
   * <strong>runkit7_function_redefine()</strong>
   * <strong>runkit7_function_remove()</strong>


id: runkit7_import
type: function
doc:
<comment>Description:</comment>
  Process a PHP file importing function and class definitions, overwriting where appropriate
    
  
  Similar to <strong>include()</strong>. However, any code residing outside of a function or class is simply ignored.
  Additionally, depending on the value of <strong>$flags</strong>, any functions or classes which already exist in
  the currently running environment may be automatically overwritten by their new definitions.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  Filename to import function and class definitions from
  <info>int</info>     <strong>$flags</strong>     Bitwise OR of the <return>RUNKIT7_IMPORT_*</return> family of constants.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: runkit7_method_add
type: function
doc:
<comment>Description:</comment>
  Dynamically adds a new method to a given class

<comment>Param:</comment>
  <info>string</info>   <strong>$class_name</strong>     The class to which this method will be added
  <info>string</info>   <strong>$method_name</strong>    The name of the method to add
  <info>string</info>   <strong>$argument_list</strong>  Comma-delimited list of arguments for the newly-created method
  <info>string</info>   <strong>$code</strong>           The code to be evaluated when <strong>$method_name</strong> is called
  <info>Closure</info>  <strong>$closure</strong>        A <class>closure</class> that defines the method.
  <info>int</info>      <strong>$flags</strong>          The type of method to create, can be <info>RUNKIT7_ACC_PUBLIC</info>,
                           <info>RUNKIT7_ACC_PROTECTED</info> or <info>RUNKIT7_ACC_PRIVATE</info> optionally combined via
                           bitwise OR with <info>RUNKIT7_ACC_STATIC</info>
  <info>string</info>   <strong>$doc_comment</strong>    The doc comment of the method.
  <info>string</info>   <strong>$return_type</strong>    The return type of the method.
  <info>bool</info>     <strong>$is_strict</strong>      Whether the method behaves as if it were declared in a file with
                           <return>strict_types=1</return>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_method_copy()</strong>
   * <strong>runkit7_method_redefine()</strong>
   * <strong>runkit7_method_remove()</strong>
   * <strong>runkit7_method_rename()</strong>
   * <strong>runkit7_function_add()</strong>


id: runkit7_method_copy
type: function
doc:
<comment>Description:</comment>
  Copies a method from class to another

<comment>Param:</comment>
  <info>string</info>  <strong>$destination_class</strong>        Destination class for copied method
  <info>string</info>  <strong>$destination_method_name</strong>  Destination method name
  <info>string</info>  <strong>$source_class</strong>             Source class of the method to copy
  <info>string</info>  <strong>$source_method_name</strong>       Name of the method to copy from the source class. If this
                                    parameter is omitted, the value of <strong>$destination_method_name</strong> is
                                    assumed.

<comment>Return:</comment>
  <info>bool</info>  

<comment>See Also:</comment>
   * <strong>runkit7_method_add()</strong>
   * <strong>runkit7_method_redefine()</strong>
   * <strong>runkit7_method_remove()</strong>
   * <strong>runkit7_method_rename()</strong>
   * <strong>runkit7_function_copy()</strong>


id: runkit7_method_redefine
type: function
doc:
<comment>Description:</comment>
  Dynamically changes the code of the given method

<comment>Param:</comment>
  <info>string</info>   <strong>$class_name</strong>     The class in which to redefine the method
  <info>string</info>   <strong>$method_name</strong>    The name of the method to redefine
  <info>string</info>   <strong>$argument_list</strong>  Comma-delimited list of arguments for the redefined method
  <info>string</info>   <strong>$code</strong>           The new code to be evaluated when <strong>$method_name</strong> is called
  <info>Closure</info>  <strong>$closure</strong>        A <class>closure</class> that defines the method.
  <info>int</info>      <strong>$flags</strong>          The redefined method can be <info>RUNKIT7_ACC_PUBLIC</info>, <info>RUNKIT7_ACC_PROTECTED</info> or
                           <info>RUNKIT7_ACC_PRIVATE</info> optionally combined via bitwise OR with
                           <info>RUNKIT7_ACC_STATIC</info>
  <info>string</info>   <strong>$doc_comment</strong>    The doc comment of the method.
  <info>string</info>   <strong>$return_type</strong>    The return type of the method.
  <info>bool</info>     <strong>$is_strict</strong>      Whether the method behaves as if it was declared in a file with
                           <return>strict_types=1</return>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_method_add()</strong>
   * <strong>runkit7_method_copy()</strong>
   * <strong>runkit7_method_remove()</strong>
   * <strong>runkit7_method_rename()</strong>
   * <strong>runkit7_function_redefine()</strong>


id: runkit7_method_remove
type: function
doc:
<comment>Description:</comment>
  Dynamically removes the given method
  
  This function cannot
  be used to manipulate the currently running (or chained) method.

<comment>Param:</comment>
  <info>string</info>  <strong>$class_name</strong>   The class in which to remove the method
  <info>string</info>  <strong>$method_name</strong>  The name of the method to remove

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_method_add()</strong>
   * <strong>runkit7_method_copy()</strong>
   * <strong>runkit7_method_redefine()</strong>
   * <strong>runkit7_method_rename()</strong>
   * <strong>runkit7_function_remove()</strong>


id: runkit7_method_rename
type: function
doc:
<comment>Description:</comment>
  Dynamically changes the name of the given method
  
  This function cannot
  be used to manipulate the currently running (or chained) method.

<comment>Param:</comment>
  <info>string</info>  <strong>$class_name</strong>          The class in which to rename the method
  <info>string</info>  <strong>$source_method_name</strong>  The name of the method to rename
  <info>string</info>  <strong>$target_method_name</strong>  The new name to give to the renamed method

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>runkit7_method_add()</strong>
   * <strong>runkit7_method_copy()</strong>
   * <strong>runkit7_method_redefine()</strong>
   * <strong>runkit7_method_remove()</strong>
   * <strong>runkit7_function_rename()</strong>


id: runkit7_object_id
type: function
doc:
<comment>Description:</comment>
  Return the integer object handle for given object
    
  
  This function is equivalent to <strong>spl_object_id()</strong>.
  
  This function returns a unique identifier for the object. The object id is unique for the lifetime
  of the object. Once the object is destroyed, its id may be reused for other objects. This behavior
  is similar to <strong>spl_object_hash()</strong>.

<comment>Param:</comment>
  <info>object</info>  <strong>$obj</strong>  Any object.

<comment>Return:</comment>
  <info>int</info>  An integer identifier that is unique for each currently existing object and is always the
       same for each object.

<comment>See Also:</comment>
   * <strong>spl_object_id()</strong>


id: runkit7_superglobals
type: function
doc:
<comment>Description:</comment>
  Return numerically indexed array of registered superglobals

<comment>Return:</comment>
  <info>array</info>  Returns a numerically indexed array of the currently registered superglobals. i.e. _GET,
         _POST, _REQUEST, _COOKIE, _SESSION, _SERVER, _ENV, _FILES

<comment>See Also:</comment>
   * Variable Scope


id: runkit7_zval_inspect
type: function
doc:
<comment>Description:</comment>
  Returns information about the passed in value with data types, reference counts, etc

<comment>Param:</comment>
  <info>string</info>  <strong>$value</strong>  The value to return the representation of

<comment>Return:</comment>
  <info>array</info>  The array returned by this function contains the following elements: <return>address</return><return>refcount</return>
         (optional)<return>is_ref</return> (optional)<return>type</return>

<comment>See Also:</comment>
   * References Explained
   * References Explained (by Derick Rethans)


id: sapi_windows_cp_conv
type: function
doc:
<comment>Description:</comment>
  Convert string from one codepage to another
  
  Convert string from one codepage to another.

<comment>Param:</comment>
  <info>int|string</info>  <strong>$in_codepage</strong>   The codepage of the <strong>$subject</strong> string. Either the codepage name or
                             identifier.
  <info>int|string</info>  <strong>$out_codepage</strong>  The codepage to convert the <strong>$subject</strong> string to. Either the codepage
                             name or identifier.
  <info>string</info>      <strong>$subject</strong>       The string to convert.

<comment>Return:</comment>
  <info>string|null</info>  The <strong>$subject</strong> string converted to <strong>$out_codepage</strong>, or <info>null</info> on failure.

<comment>See Also:</comment>
   * <strong>sapi_windows_cp_get()</strong>
   * <strong>iconv()</strong>


id: sapi_windows_cp_get
type: function
doc:
<comment>Description:</comment>
  Get current codepage
  
  Gets the current codepage.

<comment>Param:</comment>
  <info>string</info>  <strong>$kind</strong>  The kind of operating system codepage to get, either <return>'ansi'</return> or <return>'oem'</return>. Any other
                 value refers to the current codepage of the process.

<comment>Return:</comment>
  <info>int</info>  If <strong>$kind</strong> is <return>'ansi'</return>, the current ANSI code page of the operating system is returned. If <strong>$kind</strong>
       is <return>'oem'</return>, the current OEM code page of the operating system is returned. Otherwise, the
       current codepage of the process is returned.

<comment>See Also:</comment>
   * <strong>sapi_windows_cp_set()</strong>


id: sapi_windows_cp_is_utf8
type: function
doc:
<comment>Description:</comment>
  Indicates whether the codepage is UTF-8 compatible
  
  Indicates whether the codepage of the current process is UTF-8 compatible.

<comment>Return:</comment>
  <info>bool</info>  Returns whether the codepage of the current process is UTF-8 compatible.

<comment>See Also:</comment>
   * <strong>sapi_windows_cp_get()</strong>


id: sapi_windows_cp_set
type: function
doc:
<comment>Description:</comment>
  Set process codepage
  
  Set the codepage of the current process.

<comment>Param:</comment>
  <info>int</info>  <strong>$codepage</strong>  A codepage identifier.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sapi_windows_cp_get()</strong>


id: sapi_windows_generate_ctrl_event
type: function
doc:
<comment>Description:</comment>
  Send a CTRL event to another process
  
  Sends a CTRL event to another process in the same process group.

<comment>Param:</comment>
  <info>int</info>  <strong>$event</strong>  The <return>CTRL</return> event to send; either <info>PHP_WINDOWS_EVENT_CTRL_C</info> or
               <info>PHP_WINDOWS_EVENT_CTRL_BREAK</info>.
  <info>int</info>  <strong>$pid</strong>    The ID of the process to which to send the event to. If <return>0</return> is given, the event is sent
               to all processes of the process group.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>proc_open()</strong>
   * <strong>sapi_windows_set_ctrl_handler()</strong>


id: sapi_windows_set_ctrl_handler
type: function
doc:
<comment>Description:</comment>
  Set or remove a CTRL event handler
  
  Sets or removes a <return>CTRL</return> event handler, which allows Windows CLI processes to intercept or ignore
  <return>CTRL+C</return> and <return>CTRL+BREAK</return> events. Note that in multithreaded environments, this is only possible when
  called from the main thread.

<comment>Param:</comment>
  <info>callable|null</info>  <strong>$handler</strong>  A callback function to set or remove. If set, this function will be
                           called whenever a <return>CTRL+C</return> or <return>CTRL+BREAK</return> event occurs. The function is
                           supposed to have the following signature: <info>void</info>handler<info>int</info><strong>$event</strong> <strong>$event</strong> The
                           <return>CTRL</return> event which has been received; either <info>PHP_WINDOWS_EVENT_CTRL_C</info> or
                           <info>PHP_WINDOWS_EVENT_CTRL_BREAK</info>.  Setting a <info>null</info> <strong>$handler</strong> causes the process
                           to ignore <return>CTRL+C</return> events, but not <return>CTRL+BREAK</return> events.
                           
                           The <return>CTRL</return> event which has been received; either <info>PHP_WINDOWS_EVENT_CTRL_C</info>
                           or <info>PHP_WINDOWS_EVENT_CTRL_BREAK</info>.
  <info>int</info>            <strong>$event</strong>    The <return>CTRL</return> event which has been received; either <info>PHP_WINDOWS_EVENT_CTRL_C</info>
                           or <info>PHP_WINDOWS_EVENT_CTRL_BREAK</info>.
  <info>bool</info>           <strong>$add</strong>      If <info>true</info>, the handler is set. If <info>false</info>, the handler is removed.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sapi_windows_generate_ctrl_event()</strong>


id: sapi_windows_vt100_support
type: function
doc:
<comment>Description:</comment>
  Get or set VT100 support for the specified stream associated to an output buffer of a Windows
  console.
  
  If <strong>$enable</strong> is <info>null</info>, the function returns <info>true</info> if the stream <strong>$stream</strong> has VT100 control codes
  enabled, <info>false</info> otherwise.
  
  If <strong>$enable</strong> is a <info>bool</info>, the function will try to enable or disable the VT100 features of the stream
  <strong>$stream</strong>. If the feature has been successfully enabled (or disabled), the function will return
  <info>true</info>, or <info>false</info> otherwise.
  
  At startup, PHP tries to enable the VT100 feature of the <info>STDOUT</info>/<info>STDERR</info> streams. By the way, if
  those streams are redirected to a file, the VT100 features may not be enabled.
  
  If VT100 support is enabled, it is possible to use control sequences as they are known from the
  VT100 terminal.  They allow the modification of the terminal's output. On Windows these sequences
  are called Console Virtual Terminal Sequences.
  
  This function uses the <info>ENABLE_VIRTUAL_TERMINAL_PROCESSING</info> flag implemented in the Windows 10 API,
  so the VT100 feature may not be available on older Windows versions.

<comment>Param:</comment>
  <info>resource</info>   <strong>$stream</strong>  The stream on which the function will operate.
  <info>bool|null</info>  <strong>$enable</strong>  If <info>bool</info>, the VT100 feature will be enabled (if <info>true</info>) or disabled (if <info>false</info>).

<comment>Return:</comment>
  <info>bool</info>  If <strong>$enable</strong> is <info>null</info>: returns <info>true</info> if the VT100 feature is enabled, <info>false</info> otherwise.
        
        If <strong>$enable</strong> is a <info>bool</info>: Returns <info>true</info> on success or <info>false</info> on failure.


id: scandir
type: function
doc:
<comment>Description:</comment>
  List files and directories inside the specified path
  
  Returns an <info>array</info> of files and directories from the <strong>$directory</strong>.

<comment>Param:</comment>
  <info>string</info>         <strong>$directory</strong>      The directory that will be scanned.
  <info>int</info>            <strong>$sorting_order</strong>  By default, the sorted order is alphabetical in ascending order.
                                 If the optional <strong>$sorting_order</strong> is set to <info>SCANDIR_SORT_DESCENDING</info>,
                                 then the sort order is alphabetical in descending order. If it is
                                 set to <info>SCANDIR_SORT_NONE</info> then the result is unsorted.
  <info>resource|null</info>  <strong>$context</strong>        For a description of the <strong>$context</strong> parameter,  refer to the streams
                                 section of the manual.

<comment>Return:</comment>
  <info>array|false</info>  Returns an <info>array</info> of filenames on success, or <info>false</info> on  failure. If <strong>$directory</strong> is not
               a directory, then  boolean <info>false</info> is returned, and an error of level  <info>E_WARNING</info> is
               generated.

<comment>See Also:</comment>
   * <strong>opendir()</strong>
   * <strong>readdir()</strong>
   * <strong>glob()</strong>
   * <strong>is_dir()</strong>
   * <strong>sort()</strong>


id: scoutapm_get_calls
type: function
doc:
<comment>Description:</comment>
  Returns a list of instrumented calls that have occurred
  
  Returns a list of any instrumented function calls since <strong>scoutapm_get_calls()</strong> was last called. The
  list is cleared each time the function is called.

<comment>Return:</comment>
  <info>array</info>  <strong>scoutapm_get_calls()</strong> returns an array containing a list of all recorded calls to
         instrumented function calls.


id: scoutapm_list_instrumented_functions
type: function
doc:
<comment>Description:</comment>
  List functions scoutapm will instrument.
  
  Returns a list of the functions the extension will instrument.

<comment>Return:</comment>
  <info>array</info>  <strong>scoutapm_list_instrumented_functions()</strong> returns an array containing a list of all functions
         that the scoutapm extension is able to instrument in the current installation.


id: seaslog_get_author
type: function
doc:
<comment>Description:</comment>
  Get SeasLog author.

<comment>Return:</comment>
  <info>string</info>  Return SeasLog author as string.


id: seaslog_get_version
type: function
doc:
<comment>Description:</comment>
  Get SeasLog version.

<comment>Return:</comment>
  <info>string</info>  Return SeasLog version (SEASLOG_VERSION) as string.


id: sem_acquire
type: function
doc:
<comment>Description:</comment>
  Acquire a semaphore
  
  <strong>sem_acquire()</strong> by default blocks (if necessary) until the semaphore can be acquired.  A process
  attempting to acquire a semaphore which it has already acquired will block forever if acquiring
  the semaphore would cause its maximum number of semaphore to be exceeded.
  
  After processing a request, any semaphores acquired by the process but not explicitly released
  will be released automatically and a warning will be generated.

<comment>Param:</comment>
  <info>SysvSemaphore</info>  <strong>$semaphore</strong>     <strong>$semaphore</strong> is a semaphore obtained from <strong>sem_get()</strong>.
  <info>bool</info>           <strong>$non_blocking</strong>  Specifies if the process shouldn't wait for the semaphore to be
                                acquired. If set to <info>true</info>, the call will return <info>false</info> immediately if
                                a semaphore cannot be immediately acquired.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sem_get()</strong>
   * <strong>sem_release()</strong>


id: sem_get
type: function
doc:
<comment>Description:</comment>
  Get a semaphore id
  
  <strong>sem_get()</strong> returns an id that can be used to access the System V semaphore with the given <strong>$key</strong>.
  
  A second call to <strong>sem_get()</strong> for the same key will return a different semaphore identifier, but both
  identifiers access the same underlying semaphore.
  
  If <strong>$key</strong> is <return>0</return>, a new private semaphore is created for each call to <strong>sem_get()</strong>.

<comment>Param:</comment>
  <info>int</info>   <strong>$key</strong>           
  <info>int</info>   <strong>$max_acquire</strong>   The number of processes that can acquire the semaphore simultaneously is set
                       to <strong>$max_acquire</strong>.
  <info>int</info>   <strong>$permissions</strong>   The semaphore permissions. Actually this value is set only if the process
                       finds it is the only process currently attached to the semaphore.
  <info>bool</info>  <strong>$auto_release</strong>  Specifies if the semaphore should be automatically released on request
                       shutdown.

<comment>Return:</comment>
  <info>SysvSemaphore|false</info>  Returns a positive semaphore identifier on success, or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>sem_acquire()</strong>
   * <strong>sem_release()</strong>
   * <strong>ftok()</strong>


id: sem_release
type: function
doc:
<comment>Description:</comment>
  Release a semaphore
  
  <strong>sem_release()</strong> releases the semaphore if it is currently acquired by the calling process, otherwise
  a warning is generated.
  
  After releasing the semaphore, <strong>sem_acquire()</strong> may be called to re-acquire it.

<comment>Param:</comment>
  <info>SysvSemaphore</info>  <strong>$semaphore</strong>  A Semaphore as returned by <strong>sem_get()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sem_get()</strong>
   * <strong>sem_acquire()</strong>


id: sem_remove
type: function
doc:
<comment>Description:</comment>
  Remove a semaphore
  
  <strong>sem_remove()</strong> removes the given semaphore.
  
  After removing the semaphore, it is no longer accessible.

<comment>Param:</comment>
  <info>SysvSemaphore</info>  <strong>$semaphore</strong>  A semaphore as returned by <strong>sem_get()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sem_get()</strong>
   * <strong>sem_release()</strong>
   * <strong>sem_acquire()</strong>


id: serialize
type: function
doc:
<comment>Description:</comment>
  Generates a storable representation of a value
  
  Generates a storable representation of a value.
  
  This is useful for storing or passing PHP values around without losing their type and structure.
  
  To make the serialized string into a PHP value again, use <strong>unserialize()</strong>.

<comment>Param:</comment>
  <info>mixed</info>  <strong>$value</strong>  The value to be serialized. <strong>serialize()</strong> handles all types, except the <info>resource</info>-type
                 and some <info>object</info>s (see note below). You can even <strong>serialize()</strong> arrays that contain
                 references to itself. Circular references inside the array/object you  are
                 serializing will also be stored. Any other  reference will be lost.
                 
                 When serializing objects, PHP will attempt to call the member functions
                 __serialize() or __sleep() prior to serialization. This is to allow the object to
                 do any last minute clean-up, etc. prior  to being serialized. Likewise, when the
                 object is restored using  <strong>unserialize()</strong> the __unserialize() or __wakeup() member
                 function is called.
                 
                 Object's private members have the class name prepended to the member name;
                 protected members have a '*' prepended to the member name. These prepended values
                 have null bytes on either side.

<comment>Return:</comment>
  <info>string</info>  Returns a string containing a byte-stream representation of  <strong>$value</strong> that can be stored
          anywhere.
          
          Note that this is a binary string which may include null bytes, and needs to be stored and
          handled as such. For example, <strong>serialize()</strong> output should generally be stored in a BLOB
          field in a database, rather than a CHAR or TEXT field.

<comment>See Also:</comment>
   * <strong>unserialize()</strong>
   * <strong>var_export()</strong>
   * <strong>json_encode()</strong>
   * Serializing Objects
   * __sleep()
   * __wakeup()
   * __serialize()
   * __unserialize()


id: session_abort
type: function
doc:
<comment>Description:</comment>
  Discard session array changes and finish session
  
  <strong>session_abort()</strong> finishes session without saving data. Thus the original values in session data are
  kept.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * $_SESSION
   * 
     The session.auto_start
     configuration directive
    
   * <strong>session_start()</strong>
   * <strong>session_reset()</strong>
   * <strong>session_commit()</strong>


id: session_cache_expire
type: function
doc:
<comment>Description:</comment>
  Get and/or set current cache expire
  
  <strong>session_cache_expire()</strong> returns the current setting of <return>session.cache_expire</return>.
  
  The cache expire is reset to the default value of 180 stored in session.cache_expire at request
  startup time. Thus, you need to call <strong>session_cache_expire()</strong> for every request (and before
  <strong>session_start()</strong> is called).

<comment>Param:</comment>
  <info>int|null</info>  <strong>$value</strong>  If <strong>$value</strong> is given and not <info>null</info>, the current cache expire is replaced with
                    <strong>$value</strong>.
                    
                     Setting <strong>$value</strong> is of value only, if <return>session.cache_limiter</return> is set to a value
                    different from <return>nocache</return>.
                    
                    Setting <strong>$value</strong> is of value only, if <return>session.cache_limiter</return> is set to a value
                    different from <return>nocache</return>.

<comment>Return:</comment>
  <info>int|false</info>  Returns the current setting of <return>session.cache_expire</return>. The value returned should be read
             in minutes, defaults to 180. On failure to change the value, <info>false</info> is returned.

<comment>See Also:</comment>
   * session.cache_expire
   * session.cache_limiter
   * <strong>session_cache_limiter()</strong>


id: session_cache_limiter
type: function
doc:
<comment>Description:</comment>
  Get and/or set the current cache limiter
  
  <strong>session_cache_limiter()</strong> returns the name of the current cache limiter.
  
  The cache limiter defines which cache control HTTP headers are sent to the client.  These headers
  determine the rules by which the page content may be cached by the client and intermediate
  proxies.  Setting the cache limiter to <return>nocache</return> disallows any client/proxy caching. A value of
  <return>public</return> permits caching by proxies and the client, whereas <return>private</return> disallows caching by proxies and
  permits the client to cache the contents.
  
  In <return>private</return> mode, the Expire header sent to the client may cause confusion for some browsers,
  including Mozilla. You can avoid this problem by using <return>private_no_expire</return> mode. The <return>Expire</return> header
  is never sent to the client in this mode.
  
  Setting the cache limiter to <return>''</return> will turn off automatic sending of cache headers entirely.
  
  The cache limiter is reset to the default value stored in session.cache_limiter at request startup
  time. Thus, you need to call <strong>session_cache_limiter()</strong> for every request (and before <strong>session_start()</strong>
  is called).

<comment>Param:</comment>
  <info>string|null</info>  <strong>$value</strong>  If <strong>$value</strong> is specified and not <info>null</info>, the name of the current cache limiter is
                       changed to the new value.

<comment>Return:</comment>
  <info>string|false</info>  Returns the name of the current cache limiter. On failure to change the value, <info>false</info>
                is returned.

<comment>See Also:</comment>
   * session.cache_limiter


id: session_commit
type: function
doc:
<comment>Description:</comment>
  Alias of session_write_close
  
  This function is an alias of:  <strong>session_write_close()</strong>.


id: session_create_id
type: function
doc:
<comment>Description:</comment>
  Create new session id
  
  <strong>session_create_id()</strong> is used to create new session id for the current session. It returns collision
  free session id.
  
  If session is not active, collision check is omitted.
  
  Session ID is created according to php.ini settings.
  
  It is important to use the same user ID of your web server for GC task script. Otherwise, you may
  have permission problems especially with files save handler.

<comment>Param:</comment>
  <info>string</info>  <strong>$prefix</strong>  If <strong>$prefix</strong> is specified, new session id is prefixed by <strong>$prefix</strong>. Not all
                   characters are allowed within the session id.  Characters in the range <return>a-z A-Z
                   0-9 , (comma) and - (minus)</return> are allowed.

<comment>Return:</comment>
  <info>string|false</info>  <strong>session_create_id()</strong> returns new collision free session id for the current session.
                If it is used without active session, it omits collision check. On failure, <info>false</info> is
                returned.

<comment>See Also:</comment>
   * <strong>session_regenerate_id()</strong>
   * <strong>session_start()</strong>
   * session.use_strict_mode
   * SessionHandler::create_sid


id: session_decode
type: function
doc:
<comment>Description:</comment>
  Decodes session data from a session encoded string
  
  <strong>session_decode()</strong> decodes the serialized session data provided in <strong>$data</strong>, and populates the
  $_SESSION superglobal with the result.
  
  By default, the unserialization method used is internal to PHP, and is not the same as
  <strong>unserialize()</strong>. The serialization method can be set using session.serialize_handler.

<comment>Param:</comment>
  <info>string</info>  <strong>$data</strong>  The encoded data to be stored.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>session_encode()</strong>
   * session.serialize_handler


id: session_destroy
type: function
doc:
<comment>Description:</comment>
  Destroys all data registered to a session
  
  <strong>session_destroy()</strong> destroys all of the data associated with the current session. It does not unset
  any of the global variables associated with the session, or unset the session cookie. To use the
  session variables again, <strong>session_start()</strong> has to be called.
  
  You do not have to call <strong>session_destroy()</strong> from usual code. Cleanup $_SESSION array rather than
  destroying session data.
  
  In order to kill the session altogether, the session ID must also be unset. If a cookie is used to
  propagate the session ID (default behavior), then the session cookie must be deleted. <strong>setcookie()</strong>
  may be used for that.
  
  When session.use_strict_mode is enabled. You do not have to remove obsolete session ID cookie
  because session module will not accept session ID cookie when there is no data associated to the
  session ID and set new session ID cookie. Enabling session.use_strict_mode is recommended for all
  sites.
  
  Immediate session deletion may cause unwanted results. When there is concurrent requests, other
  connections may see sudden session data loss. e.g. Requests from JavaScript and/or requests from
  URL links.
  
  Although current session module does not accept empty session ID cookie, but immediate session
  deletion may result in empty session ID cookie due to client(browser) side race condition. This
  will result that the client creates many session ID needlessly.
  
  To avoid these, you must set deletion time-stamp to $_SESSION and reject access while later. Or
  make sure your application does not have concurrent requests. This applies to
  <strong>session_regenerate_id()</strong> also.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * session.use_strict_mode
   * <strong>session_reset()</strong>
   * <strong>session_regenerate_id()</strong>
   * <strong>unset()</strong>
   * <strong>setcookie()</strong>


id: session_encode
type: function
doc:
<comment>Description:</comment>
  Encodes the current session data as a session encoded string
  
  <strong>session_encode()</strong> returns a serialized string of the contents of the current session data stored in
  the $_SESSION superglobal.
  
  By default, the serialization method used is internal to PHP, and is not the same as <strong>serialize()</strong>.
  The serialization method can be set using session.serialize_handler.

<comment>Return:</comment>
  <info>string|false</info>  Returns the contents of the current session encoded,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>session_decode()</strong>
   * session.serialize_handler


id: session_gc
type: function
doc:
<comment>Description:</comment>
  Perform session data garbage collection
  
  <strong>session_gc()</strong> is used to perform session data GC(garbage collection). PHP does probability based
  session GC by default.
  
  Probability based GC works somewhat but it has few problems. 1) Low traffic sites' session data
  may not be deleted within the preferred duration. 2) High traffic sites' GC may be too frequent
  GC. 3) GC is performed on the user's request and the user will experience a GC delay.
  
  Therefore, it is recommended to execute GC periodically for production systems using, e.g., "cron"
  for UNIX-like systems. Make sure to disable probability based GC by setting
  session.gc_probability  to 0.

<comment>Return:</comment>
  <info>int|false</info>  <strong>session_gc()</strong> returns number of deleted session data for success, <info>false</info> for failure.
             
             Old save handlers do not return number of deleted session data, but  only
             success/failure flag. If this is the case, number of deleted session data became 1
             regardless of actually deleted data.

<comment>See Also:</comment>
   * <strong>session_start()</strong>
   * <strong>session_destroy()</strong>
   * session.gc_probability


id: session_get_cookie_params
type: function
doc:
<comment>Description:</comment>
  Get the session cookie parameters
  
  Gets the session cookie parameters.

<comment>Return:</comment>
  <info>array</info>  Returns an array with the current session cookie information, the array contains the
         following items: "lifetime" -  The lifetime of the cookie in seconds. "path" -  The path
         where information is stored. "domain" -  The domain of the cookie. "secure" -  The cookie
         should only be sent over secure connections. "httponly" - The cookie can only be accessed
         through the HTTP protocol. "samesite" - Controls the cross-domain sending of the cookie.
         
         "lifetime" -  The lifetime of the cookie in seconds.
         
         "path" -  The path where information is stored.
         
         "domain" -  The domain of the cookie.
         
         "secure" -  The cookie should only be sent over secure connections.
         
         "httponly" - The cookie can only be accessed through the HTTP protocol.
         
         "samesite" - Controls the cross-domain sending of the cookie.

<comment>See Also:</comment>
   * session.cookie_lifetime
   * session.cookie_path
   * session.cookie_domain
   * session.cookie_secure
   * session.cookie_httponly
   * session.cookie_samesite
   * <strong>session_set_cookie_params()</strong>


id: session_id
type: function
doc:
<comment>Description:</comment>
  Get and/or set the current session id
  
  <strong>session_id()</strong> is used to get or set the session id for the current session.
  
  The constant <info>SID</info> can also be used to retrieve the current name and session id as a string suitable
  for adding to URLs. See also Session handling.

<comment>Param:</comment>
  <info>string|null</info>  <strong>$id</strong>  If <strong>$id</strong> is specified and not <info>null</info>, it will replace the current session id.
                    <strong>session_id()</strong> needs to be called before <strong>session_start()</strong> for that purpose.
                    Depending on the session handler, not all characters are allowed within the
                    session id. For example, the file session handler only allows characters in the
                    range <return>a-z A-Z 0-9 , (comma) and - (minus)</return>!
                    
                    When using session cookies, specifying an <strong>$id</strong> for <strong>session_id()</strong> will always send
                    a new cookie when <strong>session_start()</strong> is called, regardless if the current session
                    id is identical to the one being set.

<comment>Return:</comment>
  <info>string|false</info>  <strong>session_id()</strong> returns the session id for the current session or the empty string (<return>""</return>)
                if there is no current session (no current session id exists). On failure, <info>false</info> is
                returned.

<comment>See Also:</comment>
   * <strong>session_regenerate_id()</strong>
   * <strong>session_start()</strong>
   * <strong>session_set_save_handler()</strong>
   * session.save_handler


id: session_module_name
type: function
doc:
<comment>Description:</comment>
  Get and/or set the current session module
  
  <strong>session_module_name()</strong> gets the name of the current session module, which is also known as
  session.save_handler.

<comment>Param:</comment>
  <info>string|null</info>  <strong>$module</strong>  If <strong>$module</strong> is specified and not <info>null</info>, that module will be used instead.
                        Passing <return>"user"</return> to this parameter is forbidden. Instead
                        <strong>session_set_save_handler()</strong> has to be called to set a user defined session
                        handler.

<comment>Return:</comment>
  <info>string|false</info>  Returns the name of the current session module,  or <info>false</info> on failure.


id: session_name
type: function
doc:
<comment>Description:</comment>
  Get and/or set the current session name
  
  <strong>session_name()</strong> returns the name of the current session. If <strong>$name</strong> is given, <strong>session_name()</strong> will
  update the session name and return the old session name.
  
  If a new session <strong>$name</strong> is supplied, <strong>session_name()</strong> modifies the HTTP cookie (and output content
  when <return>session.transid</return> is enabled). Once the HTTP cookie is sent, <strong>session_name()</strong> raises error.
  <strong>session_name()</strong> must be called before <strong>session_start()</strong> for the session to work properly.
  
  The session name is reset to the default value stored in <return>session.name</return> at request startup time.
  Thus, you need to call <strong>session_name()</strong> for every request (and before <strong>session_start()</strong> is called).

<comment>Param:</comment>
  <info>string|null</info>  <strong>$name</strong>  The session name references the name of the session, which is  used in cookies
                      and URLs (e.g. <return>PHPSESSID</return>). It should contain only alphanumeric characters; it
                      should be short and descriptive (i.e. for users with enabled cookie warnings).
                      If <strong>$name</strong> is specified and not <info>null</info>, the name of the current session is changed
                      to its value.
                      
                       The session name can't consist of digits only, at least one letter must be
                      present. Otherwise a new session id is generated every time.
                      
                      The session name can't consist of digits only, at least one letter must be
                      present. Otherwise a new session id is generated every time.

<comment>Return:</comment>
  <info>string|false</info>  Returns the name of the current session. If <strong>$name</strong> is given and function updates the
                session name, name of the old session is returned,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * 
     The session.name configuration
     directive
    


id: session_regenerate_id
type: function
doc:
<comment>Description:</comment>
  Update the current session id with a newly generated one
    
  
  <strong>session_regenerate_id()</strong> will replace the current session id with a new one, and keep the current
  session information.
  
  When session.use_trans_sid is enabled, output must be started after <strong>session_regenerate_id()</strong> call.
  Otherwise, old session ID is used.
  
  Currently, session_regenerate_id does not handle an unstable network well, e.g. Mobile and WiFi
  network. Therefore, you may experience a lost session by calling session_regenerate_id.
  
  You should not destroy old session data immediately, but should use destroy time-stamp and control
  access to old session ID. Otherwise, concurrent access to page may result in inconsistent state,
  or you may have lost session, or it may cause client(browser) side race condition and may create
  many session ID needlessly. Immediate session data deletion disables session hijack attack
  detection and prevention also.

<comment>Param:</comment>
  <info>bool</info>  <strong>$delete_old_session</strong>  Whether to delete the old associated session file or not. You should
                             not delete old session if you need to avoid races caused by deletion or
                             detect/avoid session hijack attacks.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>session_id()</strong>
   * <strong>session_create_id()</strong>
   * <strong>session_start()</strong>
   * <strong>session_destroy()</strong>
   * <strong>session_reset()</strong>
   * <strong>session_name()</strong>


id: session_register_shutdown
type: function
doc:
<comment>Description:</comment>
  Session shutdown function
  
  Registers <strong>session_write_close()</strong> as a shutdown function.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: session_reset
type: function
doc:
<comment>Description:</comment>
  Re-initialize session array with original values
  
  <strong>session_reset()</strong> reinitializes a session with original values stored in session storage. This
  function requires an active session and discards changes in $_SESSION.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * $_SESSION
   * 
     The session.auto_start
     configuration directive
    
   * <strong>session_start()</strong>
   * <strong>session_abort()</strong>
   * <strong>session_commit()</strong>


id: session_save_path
type: function
doc:
<comment>Description:</comment>
  Get and/or set the current session save path
  
  <strong>session_save_path()</strong> returns the path of the current directory used to save session data.

<comment>Param:</comment>
  <info>string|null</info>  <strong>$path</strong>  Session data path. If specified and not <info>null</info>, the path to which data is saved
                      will be changed. <strong>session_save_path()</strong> needs to be called before <strong>session_start()</strong>
                      for that purpose.
                      
                       On some operating systems, you may want to specify a path on a filesystem
                      that handles lots of small files efficiently. For example, on Linux, reiserfs
                      may provide better performance than ext2fs.
                      
                      On some operating systems, you may want to specify a path on a filesystem that
                      handles lots of small files efficiently. For example, on Linux, reiserfs may
                      provide better performance than ext2fs.

<comment>Return:</comment>
  <info>string|false</info>  Returns the path of the current directory used for data storage,  or <info>false</info> on
                failure.

<comment>See Also:</comment>
   * 
     The session.save_path
     configuration directive
    


id: session_set_cookie_params
type: function
doc:
<comment>Description:</comment>
  Set the session cookie parameters
  
  Alternative signature available as of PHP 7.3.0:
  
  Set cookie parameters defined in the php.ini file. The effect of this function only lasts for the
  duration of the script. Thus, you need to call <strong>session_set_cookie_params()</strong> for every request and
  before <strong>session_start()</strong> is called.
  
  This function updates the runtime ini values of the corresponding PHP ini configuration keys which
  can be retrieved with the <strong>ini_get()</strong>.

<comment>Param:</comment>
  <info>int</info>          <strong>$lifetime_or_options</strong>  When using the first signature, lifetime of the session cookie,
                                     defined in seconds.
                                     
                                     When using the second signature, an associative <info>array</info> which may
                                     have any of the keys <return>lifetime</return>, <return>path</return>, <return>domain</return>, <return>secure</return>, <return>httponly</return>
                                     and <return>samesite</return>. The values have the same meaning as described for
                                     the parameters with the same name. The value of the <return>samesite</return>
                                     element should be either <return>Lax</return> or <return>Strict</return>. If any of the allowed
                                     options are not given, their default values are the same as the
                                     default values of the explicit parameters. If the <return>samesite</return>
                                     element is omitted, no SameSite cookie attribute is set.
  <info>string|null</info>  <strong>$path</strong>                 Path on the domain where the cookie will work. Use a single
                                     slash ('/') for all paths on the domain.
  <info>string|null</info>  <strong>$domain</strong>               Cookie domain, for example 'www.php.net'. To make cookies
                                     visible on all subdomains then the domain must be prefixed with
                                     a dot like '.php.net'.
  <info>bool|null</info>    <strong>$secure</strong>               If <info>true</info> cookie will only be sent over secure connections.
  <info>bool|null</info>    <strong>$httponly</strong>             If set to <info>true</info> then PHP will attempt to send the httponly flag
                                     when setting the session cookie.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * session.cookie_lifetime
   * session.cookie_path
   * session.cookie_domain
   * session.cookie_secure
   * session.cookie_httponly
   * session.cookie_samesite
   * <strong>session_get_cookie_params()</strong>


id: session_set_save_handler
type: function
doc:
<comment>Description:</comment>
  Sets user-level session storage functions
  
  It is possible to register the following prototype:
  
  <strong>session_set_save_handler()</strong> sets the user-level session storage functions which are used for
  storing and retrieving data associated with a session.  This is most useful when a storage method
  other than those supplied by PHP sessions is preferred, e.g. storing the session data in a local
  database.

<comment>Param:</comment>
  <info>object</info>    <strong>$sessionhandler</strong>     An instance of a class implementing SessionHandlerInterface, and
                                optionally SessionIdInterface and/or
                                SessionUpdateTimestampHandlerInterface, such as <class>SessionHandler</class>, to
                                register as the session handler.
  <info>bool</info>      <strong>$register_shutdown</strong>  Register <strong>session_write_close()</strong> as a <strong>register_shutdown_function()</strong>
                                function.
  <info>callable</info>  <strong>$open</strong>               A callable with the following signature:
                                <info>bool</info>open<info>string</info><strong>$savePath</strong><info>string</info><strong>$sessionName</strong>
                                
                                The open callback works like a constructor in classes and is
                                executed when the session is being opened.  It is the first callback
                                function executed when the session is started automatically or
                                manually with <strong>session_start()</strong>. Return value is <info>true</info> for success,
                                <info>false</info> for failure.
  <info>callable</info>  <strong>$close</strong>              A callable with the following signature: <info>bool</info>close
                                
                                The close callback works like a destructor in classes and is
                                executed after the session write callback has been called. It is
                                also invoked when <strong>session_write_close()</strong> is called. Return value
                                should be <info>true</info> for success, <info>false</info> for failure.
  <info>callable</info>  <strong>$read</strong>               A callable with the following signature: <info>string</info>read<info>string</info><strong>$sessionId</strong>
                                
                                The <strong>$read</strong> callback must always return a session encoded (serialized)
                                string, or an empty string if there is no data to read.
                                
                                This callback is called internally by PHP when the session starts or
                                when <strong>session_start()</strong> is called.  Before this callback is invoked PHP
                                will invoke the <strong>$open</strong> callback.
                                
                                The value this callback returns must be in exactly the same
                                serialized format that was originally passed for storage to the
                                <strong>$write</strong> callback.  The value returned will be unserialized
                                automatically by PHP and used to populate the $_SESSION superglobal.
                                While the data looks similar to <strong>serialize()</strong> please note it is a
                                different format which is specified in the session.serialize_handler
                                ini setting.
  <info>callable</info>  <strong>$write</strong>              A callable with the following signature:
                                <info>bool</info>write<info>string</info><strong>$sessionId</strong><info>string</info><strong>$data</strong>
                                
                                The <strong>$write</strong> callback is called when the session needs to be saved and
                                closed. This callback receives the current session ID a serialized
                                version the $_SESSION superglobal.  The serialization method used
                                internally by PHP is specified in the session.serialize_handler ini
                                setting.
                                
                                The serialized session data passed to this callback should be stored
                                against the passed session ID. When retrieving this data, the <strong>$read</strong>
                                callback must return the exact value that was originally passed to
                                the <strong>$write</strong> callback.
                                
                                This callback is invoked when PHP shuts down or explicitly when
                                <strong>session_write_close()</strong> is called.  Note that after executing this
                                function PHP will internally execute the <strong>$close</strong> callback.  The
                                "write" handler is not executed until after the output stream is
                                closed.  Thus, output from debugging statements in the "write"
                                handler will never be seen in the browser.  If debugging output is
                                necessary, it is suggested that the debug output be written to a
                                file instead.
                                
                                The "write" handler is not executed until after the output stream is
                                closed.  Thus, output from debugging statements in the "write"
                                handler will never be seen in the browser.  If debugging output is
                                necessary, it is suggested that the debug output be written to a
                                file instead.
  <info>callable</info>  <strong>$destroy</strong>            A callable with the following signature: <info>bool</info>destroy<info>string</info><strong>$sessionId</strong>
                                
                                This callback is executed when a session is destroyed with
                                <strong>session_destroy()</strong> or with <strong>session_regenerate_id()</strong> with the destroy
                                parameter set to <info>true</info>. Return value should be <info>true</info> for success,
                                <info>false</info> for failure.
  <info>callable</info>  <strong>$gc</strong>                 A callable with the following signature: <info>bool</info>gc<info>int</info><strong>$lifetime</strong>
                                
                                The garbage collector callback is invoked internally by PHP
                                periodically in order to purge old session data.  The frequency is
                                controlled by session.gc_probability and session.gc_divisor. The
                                value of lifetime which is passed to this callback can be set in
                                session.gc_maxlifetime. Return value should be <info>true</info> for success,
                                <info>false</info> for failure.
  <info>callable</info>  <strong>$create_sid</strong>         A callable with the following signature: <info>string</info>create_sid
                                
                                This callback is executed when a new session ID is required. No
                                parameters are provided, and the return value should be a string
                                that is a valid session ID for your handler.
  <info>callable</info>  <strong>$validate_sid</strong>       A callable with the following signature: <info>bool</info>validate_sid<info>string</info><strong>$key</strong>
                                
                                This callback is executed when a session is to be started, a session
                                ID is supplied and session.use_strict_mode is enabled. The <strong>$key</strong> is
                                the session ID to validate. A session ID is valid, if a session with
                                that ID already exists. The return value should be <info>true</info> for success,
                                <info>false</info> for failure.
  <info>callable</info>  <strong>$update_timestamp</strong>   A callable with the following signature:
                                <info>bool</info>update_timestamp<info>string</info><strong>$key</strong><info>string</info><strong>$val</strong>
                                
                                This callback is executed when a session is updated. <strong>$key</strong> is the
                                session ID, <strong>$val</strong> is the session data. The return value should be
                                <info>true</info> for success, <info>false</info> for failure.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * 
     The session.save_handler
     configuration directive
    
   * 
     The session.serialize_handler
     configuration directive.
    
   * The <strong>register_shutdown_function()</strong>
   * The <strong>session_register_shutdown()</strong>
   * 
     Refer to save_handler.inc
     for a full procedural reference implementation
    


id: session_start
type: function
doc:
<comment>Description:</comment>
  Start new or resume existing session
  
  <strong>session_start()</strong> creates a session or resumes the current one based on a session identifier passed
  via a GET or POST request, or passed via a cookie.
  
  When <strong>session_start()</strong> is called or when a session auto starts, PHP will call the open and read
  session save handlers.  These will either be a built-in save handler provided by default or by PHP
  extensions (such as SQLite or Memcached); or can be custom handler as defined by
  <strong>session_set_save_handler()</strong>. The read callback will retrieve any existing session data (stored in a
  special serialized format) and will be unserialized and used to automatically populate the
  $_SESSION superglobal when the read callback returns the saved session data back to PHP session
  handling.
  
  To use a named session, call <strong>session_name()</strong> before calling <strong>session_start()</strong>.
  
  When session.use_trans_sid is enabled, the <strong>session_start()</strong> function will register an internal
  output handler for URL rewriting.
  
  If a user uses <return>ob_gzhandler</return> or similar with <strong>ob_start()</strong>, the function order is important for proper
  output.  For example, <return>ob_gzhandler</return> must be registered before starting the session.

<comment>Param:</comment>
  <info>array</info>  <strong>$options</strong>  If provided, this is an associative array of options that will override the
                   currently set session configuration directives. The keys should not include the
                   <return>session.</return> prefix.
                   
                   In addition to the normal set of configuration directives, a <return>read_and_close</return>
                   option may also be provided. If set to <info>true</info>, this will result in the session
                   being closed immediately after being read, thereby avoiding unnecessary locking
                   if the session data won't be changed.

<comment>Return:</comment>
  <info>bool</info>  This function returns <info>true</info> if a session was successfully started, otherwise <info>false</info>.

<comment>See Also:</comment>
   * $_SESSION
   * 
     The session.auto_start
     configuration directive
    
   * <strong>session_id()</strong>


id: session_status
type: function
doc:
<comment>Description:</comment>
  Returns the current session status
  
  <strong>session_status()</strong> is used to return the current session status.

<comment>Return:</comment>
  <info>int</info>  <info>PHP_SESSION_DISABLED</info> if sessions are disabled.<info>PHP_SESSION_NONE</info> if sessions are enabled, but
       none exists.<info>PHP_SESSION_ACTIVE</info> if sessions are enabled, and one exists.
       
       <info>PHP_SESSION_DISABLED</info> if sessions are disabled.
       
       <info>PHP_SESSION_NONE</info> if sessions are enabled, but none exists.
       
       <info>PHP_SESSION_ACTIVE</info> if sessions are enabled, and one exists.

<comment>See Also:</comment>
   * <strong>session_start()</strong>


id: session_unset
type: function
doc:
<comment>Description:</comment>
  Free all session variables
  
  The <strong>session_unset()</strong> function frees all session variables currently registered.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: session_write_close
type: function
doc:
<comment>Description:</comment>
  Write session data and end session
  
  End the current session and store session data.
  
  Session data is usually stored after your script terminated without the need to call
  <strong>session_write_close()</strong>, but as session data is locked to prevent concurrent writes only one script
  may operate on a session at any time. When using framesets together with sessions you will
  experience the frames loading one by one due to this locking. You can reduce the time needed to
  load all the frames by ending the session as soon as all changes to session variables are done.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * 
     The <strong>session_register_shutdown()</strong>
    


id: set_error_handler
type: function
doc:
<comment>Description:</comment>
  Sets a user-defined error handler function
  
  Sets a user function (<strong>$callback</strong>) to handle errors in a script.
  
  This function can be used to define custom error handlers during runtime, for example in
  applications which need to do file/data cleanup when a critical error happens, or when triggering
  an error in response to certain conditions (using <strong>trigger_error()</strong>).
  
  It is important to remember that the standard PHP error handler is completely bypassed for the
  error types specified by <strong>$error_levels</strong>  unless the callback function returns <info>false</info>.
  <strong>error_reporting()</strong> settings will have no effect and the error handler will be called regardless -
  however, it's still possible to read the current value of error_reporting and act appropriately.
  
  Also note that it is the handler's responsibility to stop the script's execution if necessary by
  calling <strong>exit()</strong>. If the error-handler function returns, script execution will continue with the
  next statement after the one that caused an error.
  
  The following error types cannot be handled with a user defined function: <info>E_ERROR</info>, <info>E_PARSE</info>,
  <info>E_CORE_ERROR</info>, <info>E_CORE_WARNING</info>, <info>E_COMPILE_ERROR</info>, <info>E_COMPILE_WARNING</info> independent of where they were
  raised, and most of <info>E_STRICT</info> raised in the file where <strong>set_error_handler()</strong> is called.
  
  If errors occur before the script is executed (e.g. on file uploads) the  custom error handler
  cannot be called since it is not registered at that  time.

<comment>Param:</comment>
  <info>callable|null</info>  <strong>$callback</strong>      If <info>null</info> is passed, the handler is reset to its default state.
                                Otherwise, the handler is a callback with the following signature:
                                
                                
                                <info>bool</info>handler<info>int</info><strong>$errno</strong><info>string</info><strong>$errstr</strong><info>string</info><strong>$errfile</strong><info>int</info><strong>$errline</strong><info>array</info><strong>$errcontext</strong><strong>$errno</strong>
                                The first parameter, <strong>$errno</strong>, will be passed the level of the error
                                raised, as an integer. <strong>$errstr</strong> The second parameter, <strong>$errstr</strong>, will
                                be passed the error message, as a string. <strong>$errfile</strong> If the callback
                                accepts a third parameter, <strong>$errfile</strong>, it will be passed the filename
                                that the error was raised in, as a string. <strong>$errline</strong> If the callback
                                accepts a fourth parameter, <strong>$errline</strong>, it will be passed the line
                                number where the error was raised, as an integer. <strong>$errcontext</strong> If the
                                callback accepts a fifth parameter, <strong>$errcontext</strong>, it will be passed
                                an array that points to the active symbol table at the point the
                                error occurred. In other words, <strong>$errcontext</strong> will contain an array of
                                every variable that existed in the scope the error was triggered in.
                                User error handlers must not modify the error context.  This
                                parameter has been DEPRECATED as of PHP 7.2.0, and REMOVED as of PHP
                                8.0.0. If the function defines this parameter without a default, an
                                error of "too few arguments" will be raised when it is called.
                                
                                The first parameter, <strong>$errno</strong>, will be passed the level of the error
                                raised, as an integer.
                                
                                The second parameter, <strong>$errstr</strong>, will be passed the error message, as
                                a string.
                                
                                If the callback accepts a third parameter, <strong>$errfile</strong>, it will be
                                passed the filename that the error was raised in, as a string.
                                
                                If the callback accepts a fourth parameter, <strong>$errline</strong>, it will be
                                passed the line number where the error was raised, as an integer.
                                
                                If the callback accepts a fifth parameter, <strong>$errcontext</strong>, it will be
                                passed an array that points to the active symbol table at the point
                                the error occurred. In other words, <strong>$errcontext</strong> will contain an
                                array of every variable that existed in the scope the error was
                                triggered in. User error handlers must not modify the error context.
                                
                                This parameter has been DEPRECATED as of PHP 7.2.0, and REMOVED as
                                of PHP 8.0.0. If the function defines this parameter without a
                                default, an error of "too few arguments" will be raised when it is
                                called.
                                
                                If the function returns <info>false</info> then the normal error handler
                                continues.
  <info>int</info>            <strong>$errno</strong>         The first parameter, <strong>$errno</strong>, will be passed the level of the error
                                raised, as an integer.
  <info>string</info>         <strong>$errstr</strong>        The second parameter, <strong>$errstr</strong>, will be passed the error message, as
                                a string.
  <info>string</info>         <strong>$errfile</strong>       If the callback accepts a third parameter, <strong>$errfile</strong>, it will be
                                passed the filename that the error was raised in, as a string.
  <info>int</info>            <strong>$errline</strong>       If the callback accepts a fourth parameter, <strong>$errline</strong>, it will be
                                passed the line number where the error was raised, as an integer.
  <info>array</info>          <strong>$errcontext</strong>    If the callback accepts a fifth parameter, <strong>$errcontext</strong>, it will be
                                passed an array that points to the active symbol table at the point
                                the error occurred. In other words, <strong>$errcontext</strong> will contain an
                                array of every variable that existed in the scope the error was
                                triggered in. User error handlers must not modify the error context.
                                
                                This parameter has been DEPRECATED as of PHP 7.2.0, and REMOVED as
                                of PHP 8.0.0. If the function defines this parameter without a
                                default, an error of "too few arguments" will be raised when it is
                                called.
  <info>int</info>            <strong>$error_levels</strong>  Can be used to mask the triggering of the <strong>$callback</strong> function just
                                like the error_reporting ini setting  controls which errors are
                                shown. Without this mask set the <strong>$callback</strong> will be called for every
                                error regardless to the setting of the error_reporting setting.

<comment>Return:</comment>
  <info>callable|null</info>  Returns the previously defined error handler (if any). If the built-in error
                 handler is used <info>null</info> is returned. If the previous error handler was a class method,
                 this function will return an indexed array with the class and the method name.

<comment>See Also:</comment>
   * <class>ErrorException</class>
   * <strong>error_reporting()</strong>
   * <strong>restore_error_handler()</strong>
   * <strong>trigger_error()</strong>
   * error level constants


id: set_exception_handler
type: function
doc:
<comment>Description:</comment>
  Sets a user-defined exception handler function 
    
  
  Sets the default exception handler if an exception is not caught within a try/catch block.
  Execution will stop after the <strong>$callback</strong> is called.

<comment>Param:</comment>
  <info>callable|null</info>  <strong>$callback</strong>  The function to be called when an uncaught exception occurs. This
                            handler function needs to accept one parameter, which will be the
                            <class>Throwable</class> object that was thrown. Both <class>Error</class> and <class>Exception</class> implement the
                            <class>Throwable</class> interface. This is the handler signature:
                            
                            <info>void</info>handler<info>Throwable</info><strong>$ex</strong>
                            
                            <info>null</info> may be passed instead, to reset this handler to its default state.

<comment>Return:</comment>
  <info>callable|null</info>  Returns the previously defined exception handler, or <info>null</info> on error. If no previous
                 handler was defined, <info>null</info> is also returned.

<comment>See Also:</comment>
   * <strong>restore_exception_handler()</strong>
   * <strong>restore_error_handler()</strong>
   * <strong>error_reporting()</strong>
   * Exceptions


id: set_file_buffer
type: function
doc:
<comment>Description:</comment>
  Alias of stream_set_write_buffer
  
  This function is an alias of:  <strong>stream_set_write_buffer()</strong>.


id: set_include_path
type: function
doc:
<comment>Description:</comment>
  Sets the include_path configuration option
  
  Sets the include_path configuration option for the duration of the script.

<comment>Param:</comment>
  <info>string</info>  <strong>$include_path</strong>  The new value for the include_path

<comment>Return:</comment>
  <info>string|false</info>  Returns the old include_path on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ini_set()</strong>
   * <strong>get_include_path()</strong>
   * <strong>restore_include_path()</strong>
   * <strong>include()</strong>


id: set_time_limit
type: function
doc:
<comment>Description:</comment>
  Limits the maximum execution time
  
  Set the number of seconds a script is allowed to run. If this is reached, the script returns a
  fatal error. The default limit is 30 seconds or, if it exists, the <return>max_execution_time</return> value
  defined in the php.ini.
  
  When called, <strong>set_time_limit()</strong> restarts the timeout counter from zero. In other words, if the
  timeout is the default 30 seconds, and 25 seconds into script execution a call such as
  <return>set_time_limit(20)</return> is made, the script will run for a total of 45 seconds before timing out.

<comment>Param:</comment>
  <info>int</info>  <strong>$seconds</strong>  The maximum execution time, in seconds. If set to zero, no time limit is imposed.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success, or <info>false</info> on failure.

<comment>See Also:</comment>
   * max_execution_time
   * max_input_time


id: setcookie
type: function
doc:
<comment>Description:</comment>
  Send a cookie
  
  Alternative signature available as of PHP 7.3.0 (not supported with named parameters):
  
  <strong>setcookie()</strong> defines a cookie to be sent along with the rest of the HTTP headers. Like other
  headers, cookies must be sent before any output from your script (this is a protocol restriction).
  This requires that you place calls to this function prior to any output, including <return>\<html&gt;</return> and <return>\<head&gt;</return> tags as well as any whitespace.
  
  Once the cookies have been set, they can be accessed on the next page load with the $_COOKIE
  array. Cookie values may also exist in $_REQUEST.

<comment>Param:</comment>
  <info>string</info>  <strong>$name</strong>                The name of the cookie.
  <info>string</info>  <strong>$value</strong>               The value of the cookie.  This value is stored on the clients
                               computer; do not store sensitive information.  Assuming the <strong>$name</strong> is
                               <return>'cookiename'</return>, this value is retrieved through $_COOKIE['cookiename']
  <info>int</info>     <strong>$expires_or_options</strong>  The time the cookie expires.  This is a Unix timestamp so is in
                               number of seconds since the epoch. One way to set this is by adding
                               the number of seconds before the cookie should expire to the result
                               of calling <strong>time()</strong>. For instance, <return>time()+60*60*24*30</return> will set the
                               cookie to expire in 30 days. Another option is to use the <strong>mktime()</strong>
                               function. If set to <return>0</return>, or omitted, the cookie will expire at the end
                               of the session (when the browser closes).
                               
                                You may notice the <strong>$expires_or_options</strong> parameter takes on a Unix
                               timestamp, as opposed to the date format <return>Wdy, DD-Mon-YYYY HH:MM:SS
                               GMT</return>, this is because PHP does this conversion internally.
                               
                               You may notice the <strong>$expires_or_options</strong> parameter takes on a Unix
                               timestamp, as opposed to the date format <return>Wdy, DD-Mon-YYYY HH:MM:SS
                               GMT</return>, this is because PHP does this conversion internally.
  <info>string</info>  <strong>$path</strong>                The path on the server in which the cookie will be available on. If
                               set to <return>'/'</return>, the cookie will be available within the entire <strong>$domain</strong>.
                               If set to <return>'/foo/'</return>, the cookie will only be available within the <return>/foo/</return>
                               directory and all sub-directories such as <return>/foo/bar/</return> of <strong>$domain</strong>.  The
                               default value is the current directory that the cookie is being set
                               in.
  <info>string</info>  <strong>$domain</strong>              The (sub)domain that the cookie is available to. Setting this to a
                               subdomain (such as <return>'www.example.com'</return>) will make the cookie available
                               to that subdomain and all other sub-domains of it (i.e.
                               w2.www.example.com). To make the cookie available to the whole domain
                               (including all subdomains of it), simply set the value to the domain
                               name (<return>'example.com'</return>, in this case).
                               
                               Older browsers still implementing the deprecated RFC 2109 may require
                               a leading <return>.</return> to match all subdomains.
  <info>bool</info>    <strong>$secure</strong>              Indicates that the cookie should only be transmitted over a secure
                               HTTPS connection from the client. When set to <info>true</info>, the cookie will
                               only be set if a secure connection exists. On the server-side, it's
                               on the programmer to send this kind of cookie only on secure
                               connection (e.g. with respect to $_SERVER["HTTPS"]).
  <info>bool</info>    <strong>$httponly</strong>            When <info>true</info> the cookie will be made accessible only through the HTTP
                               protocol. This means that the cookie won't be accessible by scripting
                               languages, such as JavaScript. It has been suggested that this
                               setting can effectively help to reduce identity theft through XSS
                               attacks (although it is not supported by all browsers), but that
                               claim is often disputed. <info>true</info> or <info>false</info>
  <info>array</info>   <strong>$options</strong>             An associative <info>array</info> which may have any of the keys <return>expires</return>, <return>path</return>,
                               <return>domain</return>, <return>secure</return>, <return>httponly</return> and <return>samesite</return>. If any other key is present an
                               error of level <info>E_WARNING</info> is generated. The values have the same
                               meaning as described for the  parameters with the same name. The
                               value of the <return>samesite</return> element should be either <return>None</return>, <return>Lax</return> or <return>Strict</return>.
                               If any of the allowed options are not given, their default values are
                               the same as the default values of the explicit parameters. If the
                               <return>samesite</return> element is omitted, no SameSite cookie attribute is set.

<comment>Return:</comment>
  <info>bool</info>  If output exists prior to calling this function, <strong>setcookie()</strong> will fail and return <info>false</info>. If
        <strong>setcookie()</strong> successfully runs, it will return <info>true</info>. This does not indicate whether the user
        accepted the cookie.

<comment>See Also:</comment>
   * <strong>header()</strong>
   * <strong>setrawcookie()</strong>
   * cookies section
   * RFC 6265
   * RFC 2109


id: setlocale
type: function
doc:
<comment>Description:</comment>
  Set locale information
  
  Alternative signature (not supported with named arguments):
  
  Sets locale information.
  
  The locale information is maintained per process, not per thread. If you are running PHP on a
  multithreaded server API , you may experience sudden changes in locale settings while a script is
  running, though the script itself never called  <strong>setlocale()</strong>. This happens due to other scripts
  running in different threads of the same process at the same time, changing the process-wide
  locale using <strong>setlocale()</strong>. On Windows, locale information is maintained per thread as of PHP 7.0.5.

<comment>Param:</comment>
  <info>int</info>     <strong>$category</strong>      <strong>$category</strong> is a named constant specifying the category of the functions
                         affected by the locale setting: <info>LC_ALL</info> for all of the below <info>LC_COLLATE</info> for
                         string comparison, see <strong>strcoll()</strong> <info>LC_CTYPE</info> for character classification and
                         conversion, for example <strong>ctype_alpha()</strong> <info>LC_MONETARY</info> for <strong>localeconv()</strong>
                         <info>LC_NUMERIC</info> for decimal separator (See also <strong>localeconv()</strong>) <info>LC_TIME</info> for date
                         and time formatting with <strong>strftime()</strong> <info>LC_MESSAGES</info> for system responses
                         (available if PHP was compiled with <return>libintl</return>)
                         
                         <info>LC_ALL</info> for all of the below
                         
                         <info>LC_COLLATE</info> for string comparison, see <strong>strcoll()</strong>
                         
                         <info>LC_CTYPE</info> for character classification and conversion, for example
                         <strong>ctype_alpha()</strong>
                         
                         <info>LC_MONETARY</info> for <strong>localeconv()</strong>
                         
                         <info>LC_NUMERIC</info> for decimal separator (See also <strong>localeconv()</strong>)
                         
                         <info>LC_TIME</info> for date and time formatting with <strong>strftime()</strong>
                         
                         <info>LC_MESSAGES</info> for system responses (available if PHP was compiled with
                         <return>libintl</return>)
  <info>string</info>  <strong>$locales</strong>       If <strong>$locales</strong> is the empty string <return>""</return>, the locale names will be set from the
                         values of environment variables with the same names as the above
                         categories, or from "LANG".
                         
                         If <strong>$locales</strong> is <return>"0"</return>, the locale setting is not affected, only the current
                         setting is returned.
                         
                         If <strong>$locales</strong> is followed by additional parameters then each parameter is
                         tried to be set as new locale until success. This is useful if a locale is
                         known under different names on different systems or for providing a
                         fallback for a possibly not available locale.
  <info>string</info>  <strong>$rest</strong>          Optional string parameters to try as locale settings until success.
  <info>array</info>   <strong>$locale_array</strong>  Each array element is tried to be set as new locale until success. This is
                         useful if a locale is known under different names on different systems or
                         for providing a fallback for a possibly not available locale.

<comment>Return:</comment>
  <info>string|false</info>  Returns the new current locale, or <info>false</info> if the locale functionality is not
                implemented on your platform, the specified locale does not exist or the category
                name is invalid.
                
                An invalid category name also causes a warning message. Category/locale names can be
                found in RFC 1766 and ISO 639. Different systems have different naming schemes for
                locales.
                
                The return value of <strong>setlocale()</strong> depends on the system that PHP is running.  It
                returns exactly what the system <return>setlocale</return> function returns.


id: setrawcookie
type: function
doc:
<comment>Description:</comment>
  Send a cookie without urlencoding the cookie value
  
  Alternative signature available as of PHP 7.3.0 (not supported with named parameters):
  
  <strong>setrawcookie()</strong> is exactly the same as <strong>setcookie()</strong> except that the cookie value will not be
  automatically urlencoded when sent to the browser.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>setcookie()</strong>


id: settype
type: function
doc:
<comment>Description:</comment>
  Set the type of a variable
  
  Set the type of variable <strong>$var</strong> to <strong>$type</strong>.

<comment>Param:</comment>
  <info>mixed</info>   <strong>$var</strong>   The variable being converted.
  <info>string</info>  <strong>$type</strong>  Possibles values of <strong>$type</strong> are:  "boolean" or "bool"  "integer" or "int"  "float" or
                 "double"  "string"  "array"  "object"  "null"
                 
                 "boolean" or "bool"
                 
                 "integer" or "int"
                 
                 "float" or "double"
                 
                 "string"
                 
                 "array"
                 
                 "object"
                 
                 "null"

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>gettype()</strong>
   * type-casting
   * type-juggling


id: sha1
type: function
doc:
<comment>Description:</comment>
  Calculate the sha1 hash of a string
  
  Calculates the sha1 hash of <strong>$string</strong> using the US Secure Hash Algorithm 1.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  The input string.
  <info>bool</info>    <strong>$binary</strong>  If the optional <strong>$binary</strong> is set to <info>true</info>, then the sha1 digest is instead returned
                   in raw binary format with a length of 20, otherwise the returned value is a
                   40-character hexadecimal number.

<comment>Return:</comment>
  <info>string</info>  Returns the sha1 hash as a string.

<comment>See Also:</comment>
   * <strong>sha1_file()</strong>
   * <strong>crc32()</strong>
   * <strong>md5()</strong>
   * <strong>hash()</strong>
   * <strong>crypt()</strong>
   * <strong>password_hash()</strong>


id: sha1_file
type: function
doc:
<comment>Description:</comment>
  Calculate the sha1 hash of a file
  
  Calculates the sha1 hash of the file specified by <strong>$filename</strong> using the US Secure Hash Algorithm 1,
  and returns that hash. The hash is a 40-character hexadecimal number.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  The filename of the file to hash.
  <info>bool</info>    <strong>$binary</strong>    When <info>true</info>, returns the digest in raw binary format with a length of 20.

<comment>Return:</comment>
  <info>string|false</info>  Returns a string on success, <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>sha1()</strong>
   * <strong>md5_file()</strong>
   * <strong>crc32()</strong>


id: shell_exec
type: function
doc:
<comment>Description:</comment>
  Execute command via shell and return the complete output as a string
  
  This function is identical to the backtick operator.
  
  On Windows, the underlying pipe is opened in text mode which can cause the function to fail for
  binary output. Consider to use <strong>popen()</strong> instead for such cases.

<comment>Param:</comment>
  <info>string</info>  <strong>$command</strong>  The command that will be executed.

<comment>Return:</comment>
  <info>string|false|null</info>  A <info>string</info> containing the output from the executed command, <info>false</info> if the pipe
                     cannot be established or <info>null</info> if an error occurs or the command produces no
                     output.
                     
                     This function can return <info>null</info> both when an error occurs or the program produces
                     no output. It is not possible to detect execution failures using this function.
                     <strong>exec()</strong> should be used when access to the program exit code is required.

<comment>See Also:</comment>
   * <strong>exec()</strong>
   * <strong>escapeshellcmd()</strong>


id: shm_attach
type: function
doc:
<comment>Description:</comment>
  Creates or open a shared memory segment
  
  <strong>shm_attach()</strong> returns an id that can be used to access the System V shared memory with the given
  <strong>$key</strong>, the first call creates the shared memory segment with  <strong>$size</strong> and the optional perm-bits
  <strong>$permissions</strong>.
  
  A second call to <strong>shm_attach()</strong> for the same <strong>$key</strong> will return a different <class>SysvSharedMemory</class> instance,
  but both instances access the same underlying shared memory. <strong>$size</strong> and <strong>$permissions</strong> will be
  ignored.

<comment>Param:</comment>
  <info>int</info>       <strong>$key</strong>          A numeric shared memory segment ID
  <info>int|null</info>  <strong>$size</strong>         The memory size. If not provided, default to the <return>sysvshm.init_mem</return> in the
                          php.ini, otherwise 10000 bytes.
  <info>int</info>       <strong>$permissions</strong>  The optional permission bits. Default to 0666.

<comment>Return:</comment>
  <info>SysvSharedMemory|false</info>  Returns a <class>SysvSharedMemory</class> instance on success,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shm_detach()</strong>
   * <strong>ftok()</strong>


id: shm_detach
type: function
doc:
<comment>Description:</comment>
  Disconnects from shared memory segment
  
  <strong>shm_detach()</strong> disconnects from the shared memory given by the <strong>$shm</strong> created by <strong>shm_attach()</strong>.
  Remember, that shared memory still exist in the Unix system and the data is still present.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>  A shared memory segment obtained from <strong>shm_attach()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shm_attach()</strong>
   * <strong>shm_remove()</strong>
   * <strong>shm_remove_var()</strong>


id: shm_get_var
type: function
doc:
<comment>Description:</comment>
  Returns a variable from shared memory
  
  <strong>shm_get_var()</strong> returns the variable with a given <strong>$key</strong>, in the given shared memory segment. The
  variable is still present in the shared memory.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>  A shared memory segment obtained from <strong>shm_attach()</strong>.
  <info>int</info>               <strong>$key</strong>  The variable key.

<comment>Return:</comment>
  <info>mixed</info>  Returns the variable with the given key.

<comment>See Also:</comment>
   * <strong>shm_has_var()</strong>
   * <strong>shm_put_var()</strong>


id: shm_has_var
type: function
doc:
<comment>Description:</comment>
  Check whether a specific entry exists
  
  Checks whether a specific key exists inside a shared memory segment.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>  A shared memory segment obtained from <strong>shm_attach()</strong>.
  <info>int</info>               <strong>$key</strong>  The variable key.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the entry exists, otherwise <info>false</info>

<comment>See Also:</comment>
   * <strong>shm_get_var()</strong>
   * <strong>shm_put_var()</strong>


id: shm_put_var
type: function
doc:
<comment>Description:</comment>
  Inserts or updates a variable in shared memory
  
  <strong>shm_put_var()</strong> inserts or updates the <strong>$value</strong> with the given <strong>$key</strong>.
  
  Warnings (<info>E_WARNING</info> level) will be issued if <strong>$shm</strong> is not a valid SysV shared memory index or if
  there was not enough shared memory remaining to complete your request.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>    A shared memory segment obtained from <strong>shm_attach()</strong>.
  <info>int</info>               <strong>$key</strong>    The variable key.
  <info>mixed</info>             <strong>$value</strong>  The variable. All variable types that <strong>serialize()</strong> supports may be used:
                            generally this means all types except for resources and some internal
                            objects that cannot be serialized.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shm_get_var()</strong>
   * <strong>shm_has_var()</strong>


id: shm_remove
type: function
doc:
<comment>Description:</comment>
  Removes shared memory from Unix systems
  
  <strong>shm_remove()</strong> removes the shared memory <strong>$shm</strong>. All data will be destroyed.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>  A shared memory segment obtained from <strong>shm_attach()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shm_remove_var()</strong>


id: shm_remove_var
type: function
doc:
<comment>Description:</comment>
  Removes a variable from shared memory
    
  
  Removes a variable with a given <strong>$key</strong> and frees the occupied memory.

<comment>Param:</comment>
  <info>SysvSharedMemory</info>  <strong>$shm</strong>  A shared memory segment obtained from <strong>shm_attach()</strong>.
  <info>int</info>               <strong>$key</strong>  The variable key.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shm_remove()</strong>


id: shmop_close
type: function
doc:
<comment>Description:</comment>
  Close shared memory block
  
  This function has no effect. Prior to PHP 8.0.0, this function was used to close the resource.
  
  <strong>shmop_close()</strong> is used to close a shared memory block.

<comment>Param:</comment>
  <info>Shmop</info>  <strong>$shmop</strong>  The shared memory block resource created by  <strong>shmop_open()</strong>

<comment>Return:</comment>
  <info>void</info>  No value is returned.

<comment>See Also:</comment>
   * <strong>shmop_open()</strong>


id: shmop_delete
type: function
doc:
<comment>Description:</comment>
  Delete shared memory block
  
  <strong>shmop_delete()</strong> is used to delete a shared memory block.

<comment>Param:</comment>
  <info>Shmop</info>  <strong>$shmop</strong>  The shared memory block resource created by  <strong>shmop_open()</strong>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: shmop_open
type: function
doc:
<comment>Description:</comment>
  Create or open shared memory block
  
  <strong>shmop_open()</strong> can create or open a shared memory block.

<comment>Param:</comment>
  <info>int</info>     <strong>$key</strong>          System's id for the shared memory block. Can be passed as a decimal or hex.
  <info>string</info>  <strong>$mode</strong>         The flags that you can use:  "a" for access (sets SHM_RDONLY for shmat) use
                        this flag when you need to open an existing shared memory segment for read
                        only  "c" for create (sets IPC_CREATE) use this flag when you need to create
                        a new shared memory segment or if a segment with the same key exists, try to
                        open it for read and write  "w" for read & write access use this flag when
                        you need to read and write to a shared memory segment, use this flag in most
                        cases.  "n" create a new memory segment (sets IPC_CREATE|IPC_EXCL) use this
                        flag when you want to create a new shared memory segment but if one already
                        exists with the same flag, fail. This is useful for security purposes, using
                        this you can prevent race condition exploits.
                        
                        "a" for access (sets SHM_RDONLY for shmat) use this flag when you need to
                        open an existing shared memory segment for read only
                        
                        "c" for create (sets IPC_CREATE) use this flag when you need to create a new
                        shared memory segment or if a segment with the same key exists, try to open
                        it for read and write
                        
                        "w" for read & write access use this flag when you need to read and write to
                        a shared memory segment, use this flag in most cases.
                        
                        "n" create a new memory segment (sets IPC_CREATE|IPC_EXCL) use this flag
                        when you want to create a new shared memory segment but if one already
                        exists with the same flag, fail. This is useful for security purposes, using
                        this you can prevent race condition exploits.
  <info>int</info>     <strong>$permissions</strong>  The permissions that you wish to assign to your memory segment, those are
                        the same as permission for a file. Permissions need to be passed in octal
                        form, like for example <return>0644</return>
  <info>int</info>     <strong>$size</strong>         The size of the shared memory block you wish to create in bytes

<comment>Return:</comment>
  <info>Shmop|false</info>  On success <strong>shmop_open()</strong> will return a <class>Shmop</class> instance that you can use to access the
               shared memory segment you've created. <info>false</info> is returned on failure.

<comment>See Also:</comment>
   * <strong>shmop_close()</strong>
   * <strong>shmop_delete()</strong>


id: shmop_read
type: function
doc:
<comment>Description:</comment>
  Read data from shared memory block
  
  <strong>shmop_read()</strong> will read a string from shared memory block.

<comment>Param:</comment>
  <info>Shmop</info>  <strong>$shmop</strong>   The shared memory block identifier created by  <strong>shmop_open()</strong>
  <info>int</info>    <strong>$offset</strong>  Offset from which to start reading; must be greater than or equal to zero and less
                  than or equal to the actual size of the shared memory segment.
  <info>int</info>    <strong>$size</strong>    The number of bytes to read; must be greater than or equal to zero, and the sum of
                  <strong>$offset</strong> and <strong>$size </strong> must be less than or equal to the actual size of the shared
                  memory segment. <return>0</return> reads shmop_size($shmid) - $start bytes.

<comment>Return:</comment>
  <info>string</info>  Returns the data or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>shmop_write()</strong>


id: shmop_size
type: function
doc:
<comment>Description:</comment>
  Get size of shared memory block
  
  <strong>shmop_size()</strong> is used to get the size, in bytes of the shared memory block.

<comment>Param:</comment>
  <info>Shmop</info>  <strong>$shmop</strong>  The shared memory block identifier created by  <strong>shmop_open()</strong>

<comment>Return:</comment>
  <info>int</info>  Returns an int, which represents the number of bytes the shared memory block occupies.


id: shmop_write
type: function
doc:
<comment>Description:</comment>
  Write data into shared memory block
  
  <strong>shmop_write()</strong> will write a string into shared memory block.

<comment>Param:</comment>
  <info>Shmop</info>   <strong>$shmop</strong>   The shared memory block identifier created by  <strong>shmop_open()</strong>
  <info>string</info>  <strong>$data</strong>    A string to write into shared memory block
  <info>int</info>     <strong>$offset</strong>  Specifies where to start writing data inside the shared memory segment. The
                   offset must be greater than or equal to zero and less than or equal to the actual
                   size of the shared memory segment.

<comment>Return:</comment>
  <info>int</info>  The size of the written <strong>$data</strong>.

<comment>See Also:</comment>
   * <strong>shmop_read()</strong>


id: show_source
type: function
doc:
<comment>Description:</comment>
  Alias of highlight_file
  
  This function is an alias of:  <strong>highlight_file()</strong>.


id: shuffle
type: function
doc:
<comment>Description:</comment>
  Shuffle an array
  
  This function shuffles (randomizes the order of the elements in) an array.
  
  This function does not generate cryptographically secure values, and must not be used for
  cryptographic purposes, or purposes that require returned values to be unguessable.
  
  If cryptographically secure randomness is required, the <class>Random\Randomizer</class> may be used with the
  <class>Random\Engine\Secure</class> engine. For simple use cases, the <strong>random_int()</strong> and <strong>random_bytes()</strong> functions
  provide a convenient and secure API that is backed by the operating system’s CSPRNG.

<comment>Param:</comment>
  <info>array</info>  <strong>$array</strong>  The array.

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * <strong>Random\Randomizer::shuffleArray()</strong>
   * <strong>Random\Randomizer::shuffleBytes()</strong>
   * <strong>Random\Randomizer::pickArrayKeys()</strong>
   * The comparison of array sorting functions


id: simdjson_decode
type: function
doc:
<comment>Description:</comment>
  Decodes a JSON string
  
  Takes a JSON encoded string and converts it into a PHP value. This uses a faster Simultaneous
  Instruction, Multiple Data implementation than <strong>json_decode()</strong> when it is supported by the computer
  architecture.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>         The <strong>$json</strong> <info>string</info> being decoded.
                        
                        This function only works with UTF-8 encoded strings.
                        
                        This function parses valid inputs which <strong>json_decode()</strong> can decode, provided
                        that they are less than 4 GiB long.
  <info>bool</info>    <strong>$associative</strong>  When <info>true</info>, JSON objects will be returned as associative <info>array</info>s; when <info>false</info>,
                        JSON objects will be returned as <info>object</info>s.
  <info>int</info>     <strong>$depth</strong>        Maximum nesting depth of the structure being decoded. The value must be
                        greater than <return>0</return>, and less than or equal to <return>2147483647</return>.
                         Callers should use reasonably small values, because larger depths require
                        more buffer space and will increase the recursion depth, unlike the current
                        <strong>json_decode()</strong> implementation.

<comment>Return:</comment>
  <info>mixed</info>  Returns the value encoded in <strong>$json</strong> in appropriate PHP type. Values <return>true</return>, <return>false</return> and <return>null</return> are
         returned as <info>true</info>, <info>false</info> and <info>null</info> respectively.

<comment>See Also:</comment>
   * <strong>json_encode()</strong>
   * <strong>json_decode()</strong>


id: simdjson_is_valid
type: function
doc:
<comment>Description:</comment>
  Check if a JSON string is valid
  
  Takes a JSON encoded string and returns true if it is valid.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>   The <strong>$json</strong> <info>string</info> being validated.
                  
                  This function only works with UTF-8 encoded strings.
                  
                  This function validates inputs which <strong>json_decode()</strong> can decode, provided that they
                  are less than 4 GiB long.
  <info>int</info>     <strong>$depth</strong>  Maximum nesting depth of the structure being validated. The value must be greater
                  than <return>0</return>, and less than or equal to <return>2147483647</return>.
                   Callers should use reasonably small values, because larger depths require more
                  buffer space and will increase the recursion depth, unlike the current
                  <strong>json_decode()</strong> implementation.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if <strong>$json</strong> is a valid JSON string, <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>json_encode()</strong>
   * <strong>json_decode()</strong>


id: simdjson_key_count
type: function
doc:
<comment>Description:</comment>
  Returns the value at a JSON pointer.
  
  Count the number of elements of the object/array found at the requested JSON pointer.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>                  The <strong>$json</strong> <info>string</info> being queried.
  <info>string</info>  <strong>$key</strong>                   The JSON pointer <info>string</info>.
  <info>int</info>     <strong>$depth</strong>                 Maximum nesting depth of the structure being validated. The value
                                 must be greater than <return>0</return>, and less than or equal to <return>2147483647</return>.
                                  Callers should use reasonably small values, because larger depths
                                 require more buffer space and will increase the recursion depth,
                                 unlike the current <strong>json_decode()</strong> implementation.
  <info>bool</info>    <strong>$throw_if_uncountable</strong>  When true, a <class>SimdJsonException</class> will be thrown instead of returning
                                 0 when the value the JSON pointer points to is neither an object
                                 nor an array.

<comment>Return:</comment>
  <info>int</info>  Returns an <info>int</info> with the number of elements of the value at the given JSON pointer.


id: simdjson_key_exists
type: function
doc:
<comment>Description:</comment>
  Check if the JSON contains the value referred to by a JSON pointer.
  
  Count the number of elements of the object/array found at the requested JSON pointer.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>                  The <strong>$json</strong> <info>string</info> being queried.
  <info>string</info>  <strong>$key</strong>                   The JSON pointer <info>string</info>.
  <info>int</info>     <strong>$depth</strong>                 Maximum nesting depth of the structure being validated. The value
                                 must be greater than <return>0</return>, and less than or equal to <return>2147483647</return>.
                                  Callers should use reasonably small values, because larger depths
                                 require more buffer space and will increase the recursion depth,
                                 unlike the current <strong>json_decode()</strong> implementation.
  <info></info>        <strong>$throw_if_uncountable</strong>  When true, a <class>SimdJsonException</class> will be thrown instead of returning
                                 0 when the value the JSON pointer points to is neither an object
                                 nor an array.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the JSON pointer is valid and refers to a value found within a valid JSON
        string. Returns <info>false</info> if the JSON is valid but does not contain the JSON pointer.


id: simdjson_key_value
type: function
doc:
<comment>Description:</comment>
  Decodes the value of a JSON string located at the requested JSON pointer.
  
  Decodes and returns the value found at the requested JSON pointer.

<comment>Param:</comment>
  <info>string</info>  <strong>$json</strong>         The <strong>$json</strong> <info>string</info> being queried and decoded.
                        
                        This function only works with UTF-8 encoded strings.
                        
                        This function parses valid inputs which <strong>json_decode()</strong> can decode, provided
                        that they are less than 4 GiB long.
  <info>string</info>  <strong>$key</strong>          The JSON pointer <info>string</info>.
  <info>bool</info>    <strong>$associative</strong>  When <info>true</info>, JSON objects will be returned as associative <info>array</info>s; when <info>false</info>,
                        JSON objects will be returned as <info>object</info>s.
  <info>int</info>     <strong>$depth</strong>        Maximum nesting depth of the structure being decoded. The value must be
                        greater than <return>0</return>, and less than or equal to <return>2147483647</return>.
                         Callers should use reasonably small values, because larger depths require
                        more buffer space and will increase the recursion depth, unlike the current
                        <strong>json_decode()</strong> implementation.

<comment>Return:</comment>
  <info>mixed</info>  Returns the part of the value encoded in <strong>$json</strong> that <strong>$key</strong> refers to in appropriate PHP type.
         Values <return>true</return>, <return>false</return> and <return>null</return> are returned as <info>true</info>, <info>false</info> and <info>null</info> respectively.

<comment>See Also:</comment>
   * <strong>json_encode()</strong>
   * <strong>simdjson_decode()</strong>


id: similar_text
type: function
doc:
<comment>Description:</comment>
  Calculate the similarity between two strings
  
  This calculates the similarity between two strings as described in Programming Classics:
  Implementing the World's Best Algorithms by Oliver (ISBN 0-131-00413-1). Note that this
  implementation does not use a stack as in Oliver's pseudo code, but recursive calls which may or
  may not speed up the whole process. Note also that the complexity of this algorithm is O(N**3)
  where N is the length of the longest string.

<comment>Param:</comment>
  <info>string</info>  <strong>$string1</strong>  The first string.
  <info>string</info>  <strong>$string2</strong>  The second string.
                    
                    Swapping the <strong>$string1</strong> and <strong>$string2</strong> may yield a different result; see the example
                    below.
  <info>float</info>   <strong>$percent</strong>  By passing a reference as third argument, <strong>similar_text()</strong> will calculate the
                    similarity in percent, by dividing the result of <strong>similar_text()</strong> by the average
                    of the lengths of the given strings times <return>100</return>.

<comment>Return:</comment>
  <info>int</info>  Returns the number of matching chars in both strings.
       
       The number of matching characters is calculated by finding the longest first common
       substring, and then doing this for the prefixes and the suffixes, recursively. The lengths of
       all found common substrings are added.

<comment>See Also:</comment>
   * <strong>levenshtein()</strong>
   * <strong>soundex()</strong>


id: simplexml_import_dom
type: function
doc:
<comment>Description:</comment>
  Get a SimpleXMLElement object from a DOM node
  
  This function takes a node of a DOM document and makes it into a SimpleXML node. This new object
  can then be used as a native SimpleXML element.

<comment>Param:</comment>
  <info>SimpleXMLElement|DOMNode</info>  <strong>$node</strong>        A DOM Element node
  <info>string|null</info>               <strong>$class_name</strong>  You may use this optional parameter so that
                                         <strong>simplexml_import_dom()</strong> will return an object of  the
                                         specified class. That class should extend the
                                         <info>SimpleXMLElement</info> class.

<comment>Return:</comment>
  <info>SimpleXMLElement|null</info>  Returns a <info>SimpleXMLElement</info> or <info>null</info> on failure.

<comment>See Also:</comment>
   * <strong>dom_import_simplexml()</strong>
   * 


id: simplexml_load_file
type: function
doc:
<comment>Description:</comment>
  Interprets an XML file into an object
    
  
  Convert the well-formed XML document in the given file to an object.

<comment>Param:</comment>
  <info>string</info>       <strong>$filename</strong>             Path to the XML file
  <info>string|null</info>  <strong>$class_name</strong>           You may use this optional parameter so that
                                     <strong>simplexml_load_file()</strong> will return an object of  the specified
                                     class. That class should extend the  <info>SimpleXMLElement</info> class.
  <info>int</info>          <strong>$options</strong>              Bitwise <return>OR</return> of the libxml option constants.
  <info>string</info>       <strong>$namespace_or_prefix</strong>  Namespace prefix or URI.
  <info>bool</info>         <strong>$is_prefix</strong>            <info>true</info> if <strong>$namespace_or_prefix</strong> is a prefix, <info>false</info> if it's a URI;
                                     defaults to <info>false</info>.

<comment>Return:</comment>
  <info>SimpleXMLElement|false</info>  Returns an <info>object</info> of class <info>SimpleXMLElement</info> with properties containing the
                          data held within the XML document, or <info>false</info> on failure.
                          
                          This function may
                          return Boolean <info>false</info>, but may also return a non-Boolean value which
                          evaluates to <info>false</info>. Please read the section on Booleans for more
                          information. Use the ===
                          operator for testing the return value of this
                          function.

<comment>See Also:</comment>
   * <strong>simplexml_load_string()</strong>
   * SimpleXMLElement::__construct
   * 
   * <strong>libxml_use_internal_errors()</strong>
   * 
   * <strong>libxml_set_streams_context()</strong>


id: simplexml_load_string
type: function
doc:
<comment>Description:</comment>
  Interprets a string of XML into an object
    
  
  Takes a well-formed XML string and returns it as an object.

<comment>Param:</comment>
  <info>string</info>       <strong>$data</strong>                 A well-formed XML string
  <info>string|null</info>  <strong>$class_name</strong>           You may use this optional parameter so that
                                     <strong>simplexml_load_string()</strong> will return an object of  the specified
                                     class. That class should extend the  <info>SimpleXMLElement</info> class.
  <info>int</info>          <strong>$options</strong>              Bitwise <return>OR</return> of the libxml option constants.
  <info>string</info>       <strong>$namespace_or_prefix</strong>  Namespace prefix or URI.
  <info>bool</info>         <strong>$is_prefix</strong>            <info>true</info> if <strong>$namespace_or_prefix</strong> is a prefix, <info>false</info> if it's a URI;
                                     defaults to <info>false</info>.

<comment>Return:</comment>
  <info>SimpleXMLElement|false</info>  Returns an <info>object</info> of class <info>SimpleXMLElement</info> with properties containing the
                          data held within the xml document, or <info>false</info> on failure.
                          
                          This function may
                          return Boolean <info>false</info>, but may also return a non-Boolean value which
                          evaluates to <info>false</info>. Please read the section on Booleans for more
                          information. Use the ===
                          operator for testing the return value of this
                          function.

<comment>See Also:</comment>
   * <strong>simplexml_load_file()</strong>
   * SimpleXMLElement::__construct
   * 
   * <strong>libxml_use_internal_errors()</strong>
   * 


id: sin
type: function
doc:
<comment>Description:</comment>
  Sine
  
  <strong>sin()</strong> returns the sine of the <strong>$num</strong> parameter.  The <strong>$num</strong> parameter is in radians.

<comment>Param:</comment>
  <info>float</info>  <strong>$num</strong>  A value in radians

<comment>Return:</comment>
  <info>float</info>  The sine of <strong>$num</strong>

<comment>See Also:</comment>
   * <strong>asin()</strong>
   * <strong>sinh()</strong>
   * <strong>cos()</strong>
   * <strong>tan()</strong>
   * <strong>deg2rad()</strong>


id: sinh
type: function
doc:
<comment>Description:</comment>
  Hyperbolic sine
  
  Returns the hyperbolic sine of <strong>$num</strong>, defined as <return>(exp($num) - exp(-$num))/2</return>.

<comment>Param:</comment>
  <info>float</info>  <strong>$num</strong>  The argument to process

<comment>Return:</comment>
  <info>float</info>  The hyperbolic sine of <strong>$num</strong>

<comment>See Also:</comment>
   * <strong>sin()</strong>
   * <strong>asinh()</strong>
   * <strong>cosh()</strong>
   * <strong>tanh()</strong>


id: sizeof
type: function
doc:
<comment>Description:</comment>
  Alias of count
  
  This function is an alias of:  <strong>count()</strong>.


id: sleep
type: function
doc:
<comment>Description:</comment>
  Delay execution
  
  Delays the program execution for the given number of <strong>$seconds</strong>.
  
  In order to delay program execution for a fraction of a second, use <strong>usleep()</strong> as the <strong>sleep()</strong>
  function expects an <info>int</info>. For example, sleep(0.25) will pause program execution for <return>0</return> seconds.

<comment>Param:</comment>
  <info>int</info>  <strong>$seconds</strong>  Halt time in seconds (must be greater than or equal to <return>0</return>).

<comment>Return:</comment>
  <info>int</info>  Returns zero on success.
       
       If the call was interrupted by a signal, <strong>sleep()</strong> returns a non-zero value. On Windows, this
       value will always be <return>192</return> (the value of the <info>WAIT_IO_COMPLETION</info> constant within the Windows
       API). On other platforms, the return value will be the number of seconds left to sleep.

<comment>See Also:</comment>
   * <strong>usleep()</strong>
   * <strong>time_nanosleep()</strong>
   * <strong>time_sleep_until()</strong>
   * <strong>set_time_limit()</strong>


id: snmp2_get
type: function
doc:
<comment>Description:</comment>
  Fetch an SNMP object
  
  The <strong>snmp2_get()</strong> function is used to read the value of an SNMP object specified by the <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The SNMP agent.
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>snmp2_set()</strong>


id: snmp2_getnext
type: function
doc:
<comment>Description:</comment>
  Fetch the SNMP object which follows the given object id
  
  The <strong>snmp2_get_next()</strong> function is used to read the value of the SNMP object that follows the
  specified <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id which precedes the wanted one.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error. In case of an error, an E_WARNING
         message is shown.

<comment>See Also:</comment>
   * <strong>snmp2_get()</strong>
   * <strong>snmp2_walk()</strong>


id: snmp2_real_walk
type: function
doc:
<comment>Description:</comment>
  Return all objects including their respective object ID within the specified one
  
  The <strong>snmp2_real_walk()</strong> function is used to traverse over a number of SNMP objects starting from
  <strong>$object_id</strong> and return not only their values but also their object ids.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id which precedes the wanted one.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an associative array of the SNMP object ids and their values on success or
               <info>false</info> on error. In case of an error, an E_WARNING message is shown.

<comment>See Also:</comment>
   * <strong>snmp2_walk()</strong>


id: snmp2_set
type: function
doc:
<comment>Description:</comment>
  Set the value of an SNMP object
  
  <strong>snmp2_set()</strong> is used to set the value of an SNMP object specified by the <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The write community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id.
  <info>array|string</info>  <strong>$type</strong>       The MIB defines the type of each object id. It has to be specified as a
                            single character from the below list.
                            
                            If <info>OPAQUE_SPECIAL_TYPES</info> was defined while compiling the SNMP library,
                            the following are also valid:
                            
                            Most of these will use the obvious corresponding ASN.1 type.  's', 'x',
                            'd' and 'b' are all different ways of specifying an OCTET STRING value,
                            and the 'u' unsigned type is also used for handling Gauge32 values.
                            
                            If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or
                            by specifying it in the libsnmp config, '=' may be used as the <strong>$type</strong>
                            parameter for all object ids as the type can then be automatically read
                            from the MIB.
                            
                            Note that there are two ways to set a variable of the type BITS like
                            e.g. "SYNTAX    BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4),
                            ssh(5), https(6)}":
                            
                            Using type "b" and a list of bit numbers. This method is not recommended
                            since GET query for the same OID would return e.g. 0xF8.
                            
                            Using type "x" and a hex number but without(!) the usual "0x" prefix.
                            
                            See examples section for more details.
  <info>array|string</info>  <strong>$value</strong>      The new value.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.
        
        If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet.
        Reason: (badValue) The value given has the wrong type or length." is shown. If an unknown or
        invalid OID is specified the warning probably reads "Could not add variable".

<comment>See Also:</comment>
   * <strong>snmp2_get()</strong>


id: snmp2_walk
type: function
doc:
<comment>Description:</comment>
  Fetch all the SNMP objects from an agent
  
  <strong>snmp2_walk()</strong> function is used to read all the values from an SNMP agent specified by the
  <strong>$hostname</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  If <info>null</info>, <strong>$object_id</strong> is taken as the root of the SNMP objects tree and
                            all objects under that tree are returned as an array.
                            
                            If <strong>$object_id</strong> is specified, all the SNMP objects below that <strong>$object_id</strong>
                            are returned.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an array of SNMP object values starting from the <strong>$object_id</strong> as root or <info>false</info>
               on error.

<comment>See Also:</comment>
   * <strong>snmp2_real_walk()</strong>


id: snmp3_get
type: function
doc:
<comment>Description:</comment>
  Fetch an SNMP object
  
  The <strong>snmp3_get()</strong> function is used to read the value of an SNMP object specified by the <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>            The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$security_name</strong>       the security name, usually some kind of username
  <info>string</info>        <strong>$security_level</strong>      the security level (noAuthNoPriv|authNoPriv|authPriv)
  <info>string</info>        <strong>$auth_protocol</strong>       the authentication protocol (<return>"MD5"</return>, <return>"SHA"</return>, <return>"SHA256"</return>, or
                                     <return>"SHA512"</return>)
  <info>string</info>        <strong>$auth_passphrase</strong>     the authentication pass phrase
  <info>string</info>        <strong>$privacy_protocol</strong>    the privacy protocol (DES or AES)
  <info>string</info>        <strong>$privacy_passphrase</strong>  the privacy pass phrase
  <info>array|string</info>  <strong>$object_id</strong>           The SNMP object id.
  <info>int</info>           <strong>$timeout</strong>             The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>             The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>snmp3_set()</strong>


id: snmp3_getnext
type: function
doc:
<comment>Description:</comment>
  Fetch the SNMP object which follows the given object id
  
  The <strong>snmp3_getnext()</strong> function is used to read the value of the SNMP object that follows the
  specified <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>            The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$security_name</strong>       the security name, usually some kind of username
  <info>string</info>        <strong>$security_level</strong>      the security level (noAuthNoPriv|authNoPriv|authPriv)
  <info>string</info>        <strong>$auth_protocol</strong>       the authentication protocol (<return>"MD5"</return>, <return>"SHA"</return>, <return>"SHA256"</return>, or
                                     <return>"SHA512"</return>)
  <info>string</info>        <strong>$auth_passphrase</strong>     the authentication pass phrase
  <info>string</info>        <strong>$privacy_protocol</strong>    the privacy protocol (DES or AES)
  <info>string</info>        <strong>$privacy_passphrase</strong>  the privacy pass phrase
  <info>array|string</info>  <strong>$object_id</strong>           The SNMP object id.
  <info>int</info>           <strong>$timeout</strong>             The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>             The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error. In case of an error, an E_WARNING
         message is shown.

<comment>See Also:</comment>
   * <strong>snmp3_get()</strong>
   * <strong>snmp3_walk()</strong>


id: snmp3_real_walk
type: function
doc:
<comment>Description:</comment>
  Return all objects including their respective object ID within the specified one
  
  The <strong>snmp3_real_walk()</strong> function is used to traverse over a number of SNMP objects starting from
  <strong>$object_id</strong> and return not only their values but also their object ids.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>            The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$security_name</strong>       the security name, usually some kind of username
  <info>string</info>        <strong>$security_level</strong>      the security level (noAuthNoPriv|authNoPriv|authPriv)
  <info>string</info>        <strong>$auth_protocol</strong>       the authentication protocol (MD5 or SHA)
  <info>string</info>        <strong>$auth_passphrase</strong>     the authentication pass phrase
  <info>string</info>        <strong>$privacy_protocol</strong>    the authentication protocol (<return>"MD5"</return>, <return>"SHA"</return>, <return>"SHA256"</return>, or
                                     <return>"SHA512"</return>)
  <info>string</info>        <strong>$privacy_passphrase</strong>  the privacy pass phrase
  <info>array|string</info>  <strong>$object_id</strong>           The SNMP object id.
  <info>int</info>           <strong>$timeout</strong>             The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>             The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an associative array of the SNMP object ids and their values on success or
               <info>false</info> on error. In case of an error, an E_WARNING message is shown.

<comment>See Also:</comment>
   * <strong>snmpwalk()</strong>


id: snmp3_set
type: function
doc:
<comment>Description:</comment>
  Set the value of an SNMP object
  
  <strong>snmp3_set()</strong> is used to set the value of an SNMP object specified by the <strong>$object_id</strong>.
  
  Even if the security level does not use an auth or priv protocol/password valid values have to be
  specified.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>            The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$security_name</strong>       the security name, usually some kind of username
  <info>string</info>        <strong>$security_level</strong>      the security level (noAuthNoPriv|authNoPriv|authPriv)
  <info>string</info>        <strong>$auth_protocol</strong>       the authentication protocol (MD5 or SHA)
  <info>string</info>        <strong>$auth_passphrase</strong>     the authentication pass phrase
  <info>string</info>        <strong>$privacy_protocol</strong>    the privacy protocol (DES or AES)
  <info>string</info>        <strong>$privacy_passphrase</strong>  the privacy pass phrase
  <info>array|string</info>  <strong>$object_id</strong>           The SNMP object id.
  <info>array|string</info>  <strong>$type</strong>                The MIB defines the type of each object id. It has to be
                                     specified as a single character from the below list.
                                     
                                     If <info>OPAQUE_SPECIAL_TYPES</info> was defined while compiling the SNMP
                                     library, the following are also valid:
                                     
                                     Most of these will use the obvious corresponding ASN.1 type.
                                     's', 'x', 'd' and 'b' are all different ways of specifying an
                                     OCTET STRING value, and the 'u' unsigned type is also used for
                                     handling Gauge32 values.
                                     
                                     If the MIB-Files are loaded by into the MIB Tree with
                                     "snmp_read_mib" or by specifying it in the libsnmp config, '='
                                     may be used as the <strong>$type</strong> parameter for all object ids as the
                                     type can then be automatically read from the MIB.
                                     
                                     Note that there are two ways to set a variable of the type BITS
                                     like e.g. "SYNTAX    BITS {telnet(0), ftp(1), http(2), icmp(3),
                                     snmp(4), ssh(5), https(6)}":
                                     
                                     Using type "b" and a list of bit numbers. This method is not
                                     recommended since GET query for the same OID would return e.g.
                                     0xF8.
                                     
                                     Using type "x" and a hex number but without(!) the usual "0x"
                                     prefix.
                                     
                                     See examples section for more details.
  <info>array|string</info>  <strong>$value</strong>               The new value
  <info>int</info>           <strong>$timeout</strong>             The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>             The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.
        
        If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet.
        Reason: (badValue) The value given has the wrong type or length." is shown. If an unknown or
        invalid OID is specified the warning probably reads "Could not add variable".


id: snmp3_walk
type: function
doc:
<comment>Description:</comment>
  Fetch all the SNMP objects from an agent
  
  <strong>snmp3_walk()</strong> function is used to read all the values from an SNMP agent specified by the
  <strong>$hostname</strong>.
  
  Even if the security level does not use an auth or priv protocol/password valid values have to be
  specified.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>            The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$security_name</strong>       the security name, usually some kind of username
  <info>string</info>        <strong>$security_level</strong>      the security level (noAuthNoPriv|authNoPriv|authPriv)
  <info>string</info>        <strong>$auth_protocol</strong>       the authentication protocol (<return>"MD5"</return>, <return>"SHA"</return>, <return>"SHA256"</return>, or
                                     <return>"SHA512"</return>)
  <info>string</info>        <strong>$auth_passphrase</strong>     the authentication pass phrase
  <info>string</info>        <strong>$privacy_protocol</strong>    the privacy protocol (DES or AES)
  <info>string</info>        <strong>$privacy_passphrase</strong>  the privacy pass phrase
  <info>array|string</info>  <strong>$object_id</strong>           If <info>null</info>, <strong>$object_id</strong> is taken as the root of the SNMP objects
                                     tree and all objects under that tree are returned as an array.
                                     
                                     If <strong>$object_id</strong> is specified, all the SNMP objects below that
                                     <strong>$object_id</strong> are returned.
  <info>int</info>           <strong>$timeout</strong>             The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>             The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an array of SNMP object values starting from the <strong>$object_id</strong> as root or <info>false</info>
               on error.

<comment>See Also:</comment>
   * <strong>snmp3_real_walk()</strong>


id: snmp_get_quick_print
type: function
doc:
<comment>Description:</comment>
  Fetches the current value of the NET-SNMP library's quick_print setting
    
  
  Returns the current value stored in the NET-SNMP Library for quick_print.   quick_print is off by
  default.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if quick_print is on, <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>snmp_set_quick_print()</strong> for a full description
     of what quick_print does.


id: snmp_get_valueretrieval
type: function
doc:
<comment>Description:</comment>
  Return the method how the SNMP values will be returned

<comment>Return:</comment>
  <info>int</info>  OR-ed combitantion of constants ( <info>SNMP_VALUE_LIBRARY</info> or <info>SNMP_VALUE_PLAIN</info> ) with possible
       SNMP_VALUE_OBJECT set.

<comment>See Also:</comment>
   * <strong>snmp_set_valueretrieval()</strong>
   * 


id: snmp_read_mib
type: function
doc:
<comment>Description:</comment>
  Reads and parses a MIB file into the active MIB tree
    
  
  This function is used to load additional, e.g. vendor specific, MIBs so that human readable OIDs
  like <return>VENDOR-MIB::foo.1</return> instead of error prone numeric OIDs can be used.
  
  The order in which the MIBs are loaded does matter as the underlying Net-SNMP library will print
  warnings if referenced objects cannot be resolved.

<comment>Param:</comment>
  <info>string</info>  <strong>$filename</strong>  The filename of the MIB.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: snmp_set_enum_print
type: function
doc:
<comment>Description:</comment>
  Return all values that are enums with their enum value instead of the raw integer
    
  
  This function toggles if snmpwalk/snmpget etc. should automatically lookup enum values in the MIB
  and return them together with their human readable string.

<comment>Param:</comment>
  <info>bool</info>  <strong>$enable</strong>  As the value is interpreted as boolean by the Net-SNMP library, it can only be "0"
                 or "1".

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.


id: snmp_set_oid_numeric_print
type: function
doc:
<comment>Description:</comment>
  Alias of snmp_set_oid_output_format
  
  This function is an alias of:  <strong>snmp_set_oid_output_format()</strong>.

<comment>See Also:</comment>
   * <strong>snmp_set_oid_output_format()</strong>


id: snmp_set_oid_output_format
type: function
doc:
<comment>Description:</comment>
  Set the OID output format
    
  
  <strong>snmp_set_oid_output_format()</strong> sets the output format to be full or numeric.

<comment>Param:</comment>
  <info>int</info>  <strong>$format</strong>  

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.


id: snmp_set_quick_print
type: function
doc:
<comment>Description:</comment>
  Set the value of enable within the NET-SNMP library
    
  
  Sets the value of <strong>$enable</strong> within the NET-SNMP library.  When this is set (1), the SNMP library
  will return 'quick printed' values.  This means that just the value will be printed.  When <strong>$enable</strong>
  is not enabled (default) the NET-SNMP library prints extra information including the type of the
  value (i.e. IpAddress or OID).  Additionally,  if quick_print is not enabled, the library prints
  additional hex values  for all strings of three characters or less.
  
  By default the NET-SNMP library returns verbose values, quick_print is used to return only the
  value.
  
  Currently strings are still returned with extra quotes, this will be corrected in a later release.

<comment>Param:</comment>
  <info>bool</info>  <strong>$enable</strong>  

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * <strong>snmp_get_quick_print()</strong>


id: snmp_set_valueretrieval
type: function
doc:
<comment>Description:</comment>
  Specify the method how the SNMP values will be returned

<comment>Param:</comment>
  <info>int</info>  <strong>$method</strong>  

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * <strong>snmp_get_valueretrieval()</strong>
   * 


id: snmpget
type: function
doc:
<comment>Description:</comment>
  Fetch an SNMP object
  
  The <strong>snmpget()</strong> function is used to read the value of an SNMP object specified by the <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The SNMP agent.
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>snmpset()</strong>


id: snmpgetnext
type: function
doc:
<comment>Description:</comment>
  Fetch the SNMP object which follows the given object id
    
  
  The <strong>snmpgetnext()</strong> function is used to read the value of the SNMP object that follows the specified
  <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id which precedes the wanted one.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>mixed</info>  Returns SNMP object value on success or <info>false</info> on error. In case of an error, an E_WARNING
         message is shown.

<comment>See Also:</comment>
   * <strong>snmpget()</strong>
   * <strong>snmpwalk()</strong>


id: snmprealwalk
type: function
doc:
<comment>Description:</comment>
  Return all objects including their respective object ID within the specified one
    
  
  The <strong>snmprealwalk()</strong> function is used to traverse over a number of SNMP objects starting from
  <strong>$object_id</strong> and return not only their values but also their object ids.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id which precedes the wanted one.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an associative array of the SNMP object ids and their values on success or
               <info>false</info> on error. In case of an error, an E_WARNING message is shown.

<comment>See Also:</comment>
   * <strong>snmpwalk()</strong>


id: snmpset
type: function
doc:
<comment>Description:</comment>
  Set the value of an SNMP object
  
  <strong>snmpset()</strong> is used to set the value of an SNMP object specified by the <strong>$object_id</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The hostname of the SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The write community.
  <info>array|string</info>  <strong>$object_id</strong>  The SNMP object id.
  <info>array|string</info>  <strong>$type</strong>       The MIB defines the type of each object id. It has to be specified as a
                            single character from the below list.
                            
                            If <info>OPAQUE_SPECIAL_TYPES</info> was defined while compiling the SNMP library,
                            the following are also valid:
                            
                            Most of these will use the obvious corresponding ASN.1 type.  's', 'x',
                            'd' and 'b' are all different ways of specifying an OCTET STRING value,
                            and the 'u' unsigned type is also used for handling Gauge32 values.
                            
                            If the MIB-Files are loaded by into the MIB Tree with "snmp_read_mib" or
                            by specifying it in the libsnmp config, '=' may be used as the <strong>$type</strong>
                            parameter for all object ids as the type can then be automatically read
                            from the MIB.
                            
                            Note that there are two ways to set a variable of the type BITS like
                            e.g. "SYNTAX    BITS {telnet(0), ftp(1), http(2), icmp(3), snmp(4),
                            ssh(5), https(6)}":
                            
                            Using type "b" and a list of bit numbers. This method is not recommended
                            since GET query for the same OID would return e.g. 0xF8.
                            
                            Using type "x" and a hex number but without(!) the usual "0x" prefix.
                            
                            See examples section for more details.
  <info>array|string</info>  <strong>$value</strong>      The new value.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.
        
        If the SNMP host rejects the data type, an E_WARNING message like "Warning: Error in packet.
        Reason: (badValue) The value given has the wrong type or length." is shown. If an unknown or
        invalid OID is specified the warning probably reads "Could not add variable".

<comment>See Also:</comment>
   * <strong>snmpget()</strong>


id: snmpwalk
type: function
doc:
<comment>Description:</comment>
  Fetch all the SNMP objects from an agent
  
  <strong>snmpwalk()</strong> function is used to read all the values from an SNMP agent specified by the <strong>$hostname</strong>.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The SNMP agent (server).
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  If <info>null</info>, <strong>$object_id</strong> is taken as the root of the SNMP objects tree and
                            all objects under that tree are returned as an array.
                            
                            If <strong>$object_id</strong> is specified, all the SNMP objects below that <strong>$object_id</strong>
                            are returned.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an array of SNMP object values starting from the <strong>$object_id</strong> as root or <info>false</info>
               on error.

<comment>See Also:</comment>
   * <strong>snmprealwalk()</strong>


id: snmpwalkoid
type: function
doc:
<comment>Description:</comment>
  Query for a tree of information about a network entity
    
  
  <strong>snmpwalkoid()</strong> function is used to read all object ids and their respective values from an SNMP
  agent specified by   <strong>$hostname</strong>.
  
  The existence of <strong>snmpwalkoid()</strong> and <strong>snmpwalk()</strong> has historical reasons.  Both functions are provided
  for backward compatibility. Use <strong>snmprealwalk()</strong> instead.

<comment>Param:</comment>
  <info>string</info>        <strong>$hostname</strong>   The SNMP agent.
  <info>string</info>        <strong>$community</strong>  The read community.
  <info>array|string</info>  <strong>$object_id</strong>  If <info>null</info>, <strong>$object_id</strong> is taken as the root of the SNMP objects tree and
                            all objects under that tree are returned as an array.
                            
                            If <strong>$object_id</strong> is specified, all the SNMP objects below that <strong>$object_id</strong>
                            are returned.
  <info>int</info>           <strong>$timeout</strong>    The number of microseconds until the first timeout.
  <info>int</info>           <strong>$retries</strong>    The number of times to retry if timeouts occur.

<comment>Return:</comment>
  <info>array|false</info>  Returns an associative array with object ids and their respective object value
               starting from the <strong>$object_id</strong> as root or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>snmpwalk()</strong>


id: socket_accept
type: function
doc:
<comment>Description:</comment>
  Accepts a connection on a socket
  
  After the socket <strong>$socket</strong> has been created using <strong>socket_create()</strong>, bound to a name with
  <strong>socket_bind()</strong>, and told to listen for connections with <strong>socket_listen()</strong>, this function will accept
  incoming connections on that socket. Once a successful connection is made, a new <class>Socket</class> instance
  is returned, which may be used for communication. If there are multiple connections queued on the
  socket, the first will be used. If there are no pending connections, <strong>socket_accept()</strong> will block
  until a connection becomes present. If <strong>$socket</strong> has been made non-blocking using
  <strong>socket_set_blocking()</strong> or <strong>socket_set_nonblock()</strong>, <info>false</info> will be returned.
  
  The <class>Socket</class> instance returned by <strong>socket_accept()</strong> may not be used to accept new connections. The
  original listening socket <strong>$socket</strong>, however, remains open and may be reused.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong>.

<comment>Return:</comment>
  <info>Socket|false</info>  Returns a new <class>Socket</class> instance on success, or <info>false</info> on error. The actual error code
                can be retrieved by calling <strong>socket_last_error()</strong>. This error code may be passed to
                <strong>socket_strerror()</strong> to get a textual explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_create()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_strerror()</strong>


id: socket_addrinfo_bind
type: function
doc:
<comment>Description:</comment>
  Create and bind to a socket from a given addrinfo
  
  Create a <class>Socket</class> instance, and bind it to the provided <class>AddressInfo</class>.  The return value of this
  function may be used with <strong>socket_listen()</strong>.

<comment>Param:</comment>
  <info>AddressInfo</info>  <strong>$address</strong>  <class>AddressInfo</class> instance created from <strong>socket_addrinfo_lookup()</strong>.

<comment>Return:</comment>
  <info>Socket|false</info>  Returns a <class>Socket</class> instance on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_addrinfo_connect()</strong>
   * <strong>socket_addrinfo_explain()</strong>
   * <strong>socket_addrinfo_lookup()</strong>
   * <strong>socket_listen()</strong>


id: socket_addrinfo_connect
type: function
doc:
<comment>Description:</comment>
  Create and connect to a socket from a given addrinfo
  
  Create a <class>Socket</class> instance, and connect it to the provided <class>AddressInfo</class> instance.  The return value
  of this function may be used with the rest of the socket functions.

<comment>Param:</comment>
  <info>AddressInfo</info>  <strong>$address</strong>  <class>AddressInfo</class> instance created from <strong>socket_addrinfo_lookup()</strong>

<comment>Return:</comment>
  <info>Socket|false</info>  Returns a <class>Socket</class> instance on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_addrinfo_bind()</strong>
   * <strong>socket_addrinfo_explain()</strong>
   * <strong>socket_addrinfo_lookup()</strong>


id: socket_addrinfo_explain
type: function
doc:
<comment>Description:</comment>
  Get information about addrinfo
  
  <strong>socket_addrinfo_explain()</strong> exposed the underlying <return>addrinfo</return> structure.

<comment>Param:</comment>
  <info>AddressInfo</info>  <strong>$address</strong>  <class>AddressInfo</class> instance created from <strong>socket_addrinfo_lookup()</strong>

<comment>Return:</comment>
  <info>array</info>  Returns an array containing the fields in the <return>addrinfo</return> structure.

<comment>See Also:</comment>
   * <strong>socket_addrinfo_bind()</strong>
   * <strong>socket_addrinfo_connect()</strong>
   * <strong>socket_addrinfo_lookup()</strong>


id: socket_addrinfo_lookup
type: function
doc:
<comment>Description:</comment>
  Get array with contents of getaddrinfo about the given hostname
  
  Lookup different ways we can connect to <strong>$host</strong>.  The returned array contains a set of <class>AddressInfo</class>
  instances that we can bind to using <strong>socket_addrinfo_bind()</strong>.

<comment>Param:</comment>
  <info>string</info>       <strong>$host</strong>     Hostname to search.
  <info>string|null</info>  <strong>$service</strong>  The service to connect to. If service is a numeric string, it designates
                         the port. Otherwise it designates a network service name, which is mapped
                         to a port by the operating system.
  <info>array</info>        <strong>$hints</strong>    Hints provide criteria for selecting addresses returned.  You may specify
                         the hints as defined by getaddrinfo.

<comment>Return:</comment>
  <info>array|false</info>  Returns an array of <class>AddressInfo</class> instances that can be used with the other
               socket_addrinfo functions. On failure, <info>false</info> is returned.

<comment>See Also:</comment>
   * <strong>socket_addrinfo_bind()</strong>
   * <strong>socket_addrinfo_connect()</strong>
   * <strong>socket_addrinfo_explain()</strong>


id: socket_atmark
type: function
doc:
<comment>Description:</comment>
  Determines whether socket is at out-of-band mark
  
  Determines whether <strong>$socket</strong> is at out-of-band mark.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_connect()</strong>
   * <strong>socket_create()</strong>


id: socket_bind
type: function
doc:
<comment>Description:</comment>
  Binds a name to a socket
  
  Binds the name given in <strong>$address</strong> to the socket described by <strong>$socket</strong>. This has to be done before a
  connection is established using <strong>socket_connect()</strong> or <strong>socket_listen()</strong>.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   A <class>Socket</class> instance created with <strong>socket_create()</strong>.
  <info>string</info>  <strong>$address</strong>  If the socket is of the <info>AF_INET</info> family, the <strong>$address</strong> is an IP in dotted-quad
                    notation (e.g. <return>127.0.0.1</return>).
                    
                    If the socket is of the <info>AF_UNIX</info> family, the <strong>$address</strong> is the path of a
                    Unix-domain socket (e.g. /tmp/my.sock).
  <info>int</info>     <strong>$port</strong>     The <strong>$port</strong> parameter is only used when binding an <info>AF_INET</info> socket, and designates
                    the port on which to listen for connections.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.
        
        The error code can be retrieved with <strong>socket_last_error()</strong>. This code may be passed to
        <strong>socket_strerror()</strong> to get a textual explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_create()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_clear_error
type: function
doc:
<comment>Description:</comment>
  Clears the error on the socket or the last error code
  
  This function clears the error code on the given socket or the global last socket error if no
  socket is specified.
  
  This function allows explicitly resetting the error code value either of a socket or of the
  extension global last error code. This may be useful to detect within a part of the application if
  an error occurred or not.

<comment>Param:</comment>
  <info>Socket|null</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong>.

<comment>Return:</comment>
  <info>void</info>  No value is returned.

<comment>See Also:</comment>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_close
type: function
doc:
<comment>Description:</comment>
  Closes a Socket instance
  
  <strong>socket_close()</strong> closes the <class>Socket</class> instance given by <strong>$socket</strong>.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.

<comment>Return:</comment>
  <info>void</info>  No value is returned.

<comment>See Also:</comment>
   * <strong>socket_bind()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_create()</strong>
   * <strong>socket_strerror()</strong>


id: socket_cmsg_space
type: function
doc:
<comment>Description:</comment>
  Calculate message buffer size
  
  Calculates the size of the buffer that should be allocated for receiving the ancillary data.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>int</info>  <strong>$level</strong>  
  <info>int</info>  <strong>$type</strong>   

<comment>Return:</comment>
  <info>int|null</info>  

<comment>See Also:</comment>
   * <strong>socket_recvmsg()</strong>
   * <strong>socket_sendmsg()</strong>


id: socket_connect
type: function
doc:
<comment>Description:</comment>
  Initiates a connection on a socket
  
  Initiate a connection to <strong>$address</strong> using the <class>Socket</class> instance <strong>$socket</strong>, which must be <class>Socket</class> instance
  created with <strong>socket_create()</strong>.

<comment>Param:</comment>
  <info>Socket</info>    <strong>$socket</strong>   A <class>Socket</class> instance created with <strong>socket_create()</strong>.
  <info>string</info>    <strong>$address</strong>  The <strong>$address</strong> parameter is either an IPv4 address in dotted-quad notation (e.g.
                      <return>127.0.0.1</return>) if  <strong>$socket</strong> is <info>AF_INET</info>, a valid  IPv6 address (e.g. <return>::1</return>) if IPv6
                      support is enabled and  <strong>$socket</strong> is <info>AF_INET6</info> or the pathname of a Unix domain
                      socket, if the socket family is <info>AF_UNIX</info>.
  <info>int|null</info>  <strong>$port</strong>     The <strong>$port</strong> parameter is only used and is mandatory when connecting to an
                      <info>AF_INET</info> or an  <info>AF_INET6</info> socket, and designates the port on the remote host to
                      which a connection should be made.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure. The error code can be retrieved with
        <strong>socket_last_error()</strong>. This code may be passed to <strong>socket_strerror()</strong> to get a textual
        explanation of the error.
        
        If the socket is non-blocking then this function returns <info>false</info> with an error <return>Operation now
        in progress</return>.

<comment>See Also:</comment>
   * <strong>socket_bind()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_create()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_create
type: function
doc:
<comment>Description:</comment>
  Create a socket (endpoint for communication)
  
  Creates and returns a <class>Socket</class> instance, also referred to as an endpoint of communication. A typical
  network connection is made up of 2 sockets, one performing the role of the client, and another
  performing the role of the server.

<comment>Param:</comment>
  <info>int</info>  <strong>$domain</strong>    The <strong>$domain</strong> parameter specifies the protocol family to be used by the socket.
  <info>int</info>  <strong>$type</strong>      The <strong>$type</strong> parameter selects the type of communication to be used by the socket.
  <info>int</info>  <strong>$protocol</strong>  The <strong>$protocol</strong> parameter sets the specific protocol within the specified <strong>$domain</strong> to
                  be used when communicating on the returned socket. The proper value can be
                  retrieved by name by using <strong>getprotobyname()</strong>. If the desired protocol is TCP, or
                  UDP the corresponding constants <info>SOL_TCP</info>, and <info>SOL_UDP</info> can also be used.

<comment>Return:</comment>
  <info>Socket|false</info>  <strong>socket_create()</strong> returns a <class>Socket</class> instance on success, or <info>false</info> on error. The actual
                error code can be retrieved by calling <strong>socket_last_error()</strong>. This error code may be
                passed to <strong>socket_strerror()</strong> to get a textual explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_accept()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_create_listen
type: function
doc:
<comment>Description:</comment>
  Opens a socket on port to accept connections 
  
  <strong>socket_create_listen()</strong> creates a new <class>Socket</class> instance of type <info>AF_INET</info> listening on all local
  interfaces on the given port waiting for new connections.
  
  This function is meant to ease the task of creating a new socket which only listens to accept new
  connections.

<comment>Param:</comment>
  <info>int</info>  <strong>$port</strong>     The port on which to listen on all interfaces.
  <info>int</info>  <strong>$backlog</strong>  The <strong>$backlog</strong> parameter defines the maximum length the queue of pending connections
                 may grow to. <info>SOMAXCONN</info> may be passed as <strong>$backlog</strong> parameter, see <strong>socket_listen()</strong> for
                 more information.

<comment>Return:</comment>
  <info>Socket|false</info>  <strong>socket_create_listen()</strong> returns a new <class>Socket</class> instance on success or <info>false</info> on error.
                The error code can be retrieved with <strong>socket_last_error()</strong>. This code may be passed to
                <strong>socket_strerror()</strong> to get a textual explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_create()</strong>
   * <strong>socket_create_pair()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_create_pair
type: function
doc:
<comment>Description:</comment>
  Creates a pair of indistinguishable sockets and stores them in an array
  
  <strong>socket_create_pair()</strong> creates two connected and indistinguishable sockets, and stores them in
  <strong>$pair</strong>. This function is commonly used in IPC (InterProcess Communication).

<comment>Param:</comment>
  <info>int</info>    <strong>$domain</strong>    The <strong>$domain</strong> parameter specifies the protocol family to be used by the socket.
                    See <strong>socket_create()</strong> for the full list.
  <info>int</info>    <strong>$type</strong>      The <strong>$type</strong> parameter selects the type of communication to be used by the socket.
                    See <strong>socket_create()</strong> for the  full list.
  <info>int</info>    <strong>$protocol</strong>  The <strong>$protocol</strong> parameter sets the specific protocol within the specified <strong>$domain</strong>
                    to be used when communicating on the returned socket. The proper value can be
                    retrieved by name by using <strong>getprotobyname()</strong>. If the desired protocol is TCP, or
                    UDP the corresponding constants <info>SOL_TCP</info>, and <info>SOL_UDP</info> can also be used.
                    
                    See <strong>socket_create()</strong> for the full list of supported  protocols.
  <info>array</info>  <strong>$pair</strong>      Reference to an array in which the two <class>Socket</class> instances will be inserted.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_create()</strong>
   * <strong>socket_create_listen()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_export_stream
type: function
doc:
<comment>Description:</comment>
  Export a socket into a stream that encapsulates a socket
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  

<comment>Return:</comment>
  <info>resource|false</info>  Return resource or <info>false</info> on failure.


id: socket_get_option
type: function
doc:
<comment>Description:</comment>
  Gets socket options for the socket 
  
  The <strong>socket_get_option()</strong> function retrieves the value for the option specified by the <strong>$option</strong>
  parameter for the specified <strong>$socket</strong>.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>int</info>     <strong>$level</strong>   The <strong>$level</strong> parameter specifies the protocol level at which the option resides.
                   For example, to retrieve options at the socket level, a <strong>$level</strong> parameter of
                   <info>SOL_SOCKET</info> would be used. Other levels, such as <info>TCP</info>, can be used by specifying
                   the protocol number of that level. Protocol numbers can be found by using the
                   <strong>getprotobyname()</strong> function.
  <info>int</info>     <strong>$option</strong>  Reports whether the <strong>$socket</strong> lingers on  <strong>socket_close()</strong> if data is present. By
                   default,  when the socket is closed, it attempts to send all unsent data. In the
                   case of a connection-oriented socket,  <strong>socket_close()</strong> will wait for its peer to
                   acknowledge the data.
                   
                   If l_onoff is non-zero and  l_linger is zero, all the  unsent data will be
                   discarded and RST (reset) is sent to the  peer in the case of a
                   connection-oriented socket.
                   
                   On the other hand, if l_onoff is  non-zero and l_linger is non-zero,
                   <strong>socket_close()</strong> will block until all the data  is sent or the time specified in
                   l_linger elapses. If the socket is non-blocking,  <strong>socket_close()</strong> will fail and
                   return an error.

<comment>Return:</comment>
  <info>array|int|false</info>  Returns the value of the given option,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_create_listen()</strong>
   * <strong>socket_set_option()</strong>


id: socket_get_status
type: function
doc:
<comment>Description:</comment>
  Alias of stream_get_meta_data
  
  This function is an alias of:  <strong>stream_get_meta_data()</strong>.


id: socket_getopt
type: function
doc:
<comment>Description:</comment>
  Alias of socket_get_option
  
  This function is an alias of:  <strong>socket_get_option()</strong>.


id: socket_getpeername
type: function
doc:
<comment>Description:</comment>
  Queries the remote side of the given socket which may either result in host/port or in a Unix
  filesystem path, dependent on its type
  
  Queries the remote side of the given socket which may either result in host/port or in a Unix
  filesystem path, dependent on its type.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>string</info>  <strong>$address</strong>  If the given socket is of type <info>AF_INET</info> or <info>AF_INET6</info>, <strong>socket_getpeername()</strong> will
                    return the peers (remote) IP address in appropriate notation (e.g. <return>127.0.0.1</return> or
                    <return>fe80::1</return>) in the <strong>$address</strong> parameter and, if the optional <strong>$port</strong> parameter is
                    present, also the associated port.
                    
                    If the given socket is of type <info>AF_UNIX</info>, <strong>socket_getpeername()</strong> will return the
                    Unix filesystem path (e.g. <return>/var/run/daemon.sock</return>) in the <strong>$address</strong> parameter.
  <info>int</info>     <strong>$port</strong>     If given, this will hold the port associated to <strong>$address</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure. <strong>socket_getpeername()</strong> may also return <info>false</info> if
        the socket type is not any of <info>AF_INET</info>, <info>AF_INET6</info>, or <info>AF_UNIX</info>, in which case the last socket
        error code is not updated.

<comment>See Also:</comment>
   * <strong>socket_getsockname()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_getsockname
type: function
doc:
<comment>Description:</comment>
  Queries the local side of the given socket which may either result in host/port or in a Unix
  filesystem path, dependent on its type
  
  <strong>socket_getsockname()</strong> should not be used with <info>AF_UNIX</info> sockets created with <strong>socket_connect()</strong>. Only
  sockets created with <strong>socket_accept()</strong> or a primary server socket following a call to <strong>socket_bind()</strong>
  will return meaningful values.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>string</info>  <strong>$address</strong>  If the given socket is of type <info>AF_INET</info> or <info>AF_INET6</info>, <strong>socket_getsockname()</strong> will
                    return the local IP address in appropriate notation (e.g. <return>127.0.0.1</return> or <return>fe80::1</return>)
                    in the <strong>$address</strong> parameter and, if the optional <strong>$port</strong> parameter is present, also
                    the associated port.
                    
                    If the given socket is of type <info>AF_UNIX</info>, <strong>socket_getsockname()</strong> will return the
                    Unix filesystem path (e.g. <return>/var/run/daemon.sock</return>) in the <strong>$address</strong> parameter.
  <info>int</info>     <strong>$port</strong>     If provided, this will hold the associated port.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure. <strong>socket_getsockname()</strong> may also return <info>false</info> if
        the socket type is not any of <info>AF_INET</info>, <info>AF_INET6</info>, or <info>AF_UNIX</info>, in which case the last socket
        error code is not updated.

<comment>See Also:</comment>
   * <strong>socket_getpeername()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_import_stream
type: function
doc:
<comment>Description:</comment>
  Import a stream
  
  Imports a stream that encapsulates a socket into a socket extension resource.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stream</strong>  The stream resource to import.

<comment>Return:</comment>
  <info>Socket|false</info>  Returns <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>stream_socket_server()</strong>


id: socket_last_error
type: function
doc:
<comment>Description:</comment>
  Returns the last error on the socket 
  
  If a <class>Socket</class> instance is passed to this function, the last error which occurred on this particular
  socket is returned. If <strong>$socket</strong> is <info>null</info>, the error code of the last failed socket function is
  returned. The latter is particularly helpful for functions like <strong>socket_create()</strong> which don't return
  a socket on failure and <strong>socket_select()</strong> which can fail for reasons not directly tied to a
  particular socket.  The error code is suitable to be fed to <strong>socket_strerror()</strong> which returns a
  string describing the given error code.
  
  If no error had occurred, or the error had been cleared with <strong>socket_clear_error()</strong>, the function
  returns <return>0</return>.

<comment>Param:</comment>
  <info>Socket|null</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong>.

<comment>Return:</comment>
  <info>int</info>  This function returns a socket error code.


id: socket_listen
type: function
doc:
<comment>Description:</comment>
  Listens for a connection on a socket
  
  After the socket <strong>$socket</strong> has been created using <strong>socket_create()</strong> and bound to a name with
  <strong>socket_bind()</strong>, it may be told to listen for incoming connections on <strong>$socket</strong>.
  
  <strong>socket_listen()</strong> is applicable only to sockets of type <info>SOCK_STREAM</info> or <info>SOCK_SEQPACKET</info>.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_addrinfo_bind()</strong>
  <info>int</info>     <strong>$backlog</strong>  A maximum of <strong>$backlog</strong> incoming connections will be queued for processing. If a
                    connection request arrives with the queue full the client may receive an error
                    with an indication of <return>ECONNREFUSED</return>, or, if the underlying protocol supports
                    retransmission, the request may be ignored so that retries may succeed.
                    
                    The maximum number passed to the <strong>$backlog</strong> parameter highly depends on the
                    underlying platform. On Linux, it is silently truncated to <info>SOMAXCONN</info>. On win32,
                    if passed <info>SOMAXCONN</info>, the underlying service provider responsible for the socket
                    will set the backlog to a maximum reasonable value. There is no standard
                    provision to find out the actual backlog value on this platform.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure. The error code can be retrieved with
        <strong>socket_last_error()</strong>. This code may be passed to <strong>socket_strerror()</strong> to get a textual
        explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_accept()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_connect()</strong>
   * <strong>socket_create()</strong>
   * <strong>socket_strerror()</strong>
   * <strong>socket_addrinfo_bind()</strong>


id: socket_read
type: function
doc:
<comment>Description:</comment>
  Reads a maximum of length bytes from a socket
  
  The function <strong>socket_read()</strong> reads from the <class>Socket</class> instance <strong>$socket</strong> created by the <strong>socket_create()</strong>
  or <strong>socket_accept()</strong> functions.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>int</info>     <strong>$length</strong>  The maximum number of bytes read is specified by the <strong>$length</strong> parameter. Otherwise
                   you can use <info>\r</info>, <info>\n</info>, or <info>\0</info> to end reading (depending on the <strong>$mode</strong> parameter, see
                   below).
  <info>int</info>     <strong>$mode</strong>    Optional <strong>$mode</strong> parameter is a named constant: <info>PHP_BINARY_READ</info> (Default) - use the
                   system <return>recv()</return> function. Safe for reading binary data. <info>PHP_NORMAL_READ</info> - reading
                   stops at <return>\n</return> or <return>\r</return>.
                   
                   <info>PHP_BINARY_READ</info> (Default) - use the system <return>recv()</return> function. Safe for reading
                   binary data.
                   
                   <info>PHP_NORMAL_READ</info> - reading stops at <return>\n</return> or <return>\r</return>.

<comment>Return:</comment>
  <info>string|false</info>  <strong>socket_read()</strong> returns the data as a string on success, or <info>false</info> on error (including
                if the remote host has closed the connection). The error code can be retrieved with
                <strong>socket_last_error()</strong>. This code may be passed to <strong>socket_strerror()</strong> to get a textual
                representation of the error.
                
                <strong>socket_read()</strong> returns a zero length string ("") when there is no more data to read.

<comment>See Also:</comment>
   * <strong>socket_accept()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>
   * <strong>socket_write()</strong>


id: socket_recv
type: function
doc:
<comment>Description:</comment>
  Receives data from a connected socket 
  
  The <strong>socket_recv()</strong> function receives <strong>$length</strong> bytes of data in <strong>$data</strong> from <strong>$socket</strong>. <strong>socket_recv()</strong> can
  be used to gather data from connected sockets. Additionally, one or more flags can be specified to
  modify the behaviour of the function.
  
  <strong>$data</strong> is passed by reference, so it must be specified as a variable in the argument list. Data
  read from <strong>$socket</strong> by <strong>socket_recv()</strong> will be returned in <strong>$data</strong>.

<comment>Param:</comment>
  <info>Socket</info>       <strong>$socket</strong>  The <strong>$socket</strong> must be a <class>Socket</class> instance previously created by socket_create().
  <info>string|null</info>  <strong>$data</strong>    The data received will be fetched to the variable specified with <strong>$data</strong>. If
                        an error occurs, if the connection is reset, or if no data is available,
                        <strong>$data</strong> will be set to <info>null</info>.
  <info>int</info>          <strong>$length</strong>  Up to <strong>$length</strong> bytes will be fetched from remote host.
  <info>int</info>          <strong>$flags</strong>   The value of <strong>$flags</strong> can be any combination of  the following flags, joined
                        with the binary OR (<return>|</return>) operator.

<comment>Return:</comment>
  <info>int|false</info>  <strong>socket_recv()</strong> returns the number of bytes received, or <info>false</info> if there was an error. The
             actual error code can be retrieved by  calling <strong>socket_last_error()</strong>. This error code may
             be passed to <strong>socket_strerror()</strong> to get a textual explanation of the error.


id: socket_recvfrom
type: function
doc:
<comment>Description:</comment>
  Receives data from a socket whether or not it is connection-oriented
  
  The <strong>socket_recvfrom()</strong> function receives <strong>$length</strong> bytes of data in <strong>$data</strong> from <strong>$address</strong> on port <strong>$port</strong>
  (if the socket is not of type <info>AF_UNIX</info>) using <strong>$socket</strong>. <strong>socket_recvfrom()</strong> can be used to gather data
  from both connected and unconnected sockets. Additionally, one or more flags can be specified to
  modify the behaviour of the function.
  
  The <strong>$address</strong> and <strong>$port</strong> must be passed by reference. If the socket is not connection-oriented,
  <strong>$address</strong> will be set to the internet protocol address of the remote host or the path to the UNIX
  socket. If the socket is connection-oriented, <strong>$address</strong> is <info>null</info>. Additionally, the <strong>$port</strong> will
  contain the port of the remote host in the case of an unconnected <info>AF_INET</info> or <info>AF_INET6</info> socket.
  
  This function is
  binary-safe.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   The <strong>$socket</strong> must be a <class>Socket</class> instance previously created by socket_create().
  <info>string</info>  <strong>$data</strong>     The data received will be fetched to the variable specified with <strong>$data</strong>.
  <info>int</info>     <strong>$length</strong>   Up to <strong>$length</strong> bytes will be fetched from remote host.
  <info>int</info>     <strong>$flags</strong>    The value of <strong>$flags</strong> can be any combination of  the following flags, joined with
                    the binary OR (<return>|</return>) operator.
  <info>string</info>  <strong>$address</strong>  If the socket is of the type <info>AF_UNIX</info> type, <strong>$address</strong> is the path to the file.
                    Else, for unconnected sockets, <strong>$address</strong> is the IP address of, the remote host,
                    or <info>null</info> if the socket is connection-oriented.
  <info>int</info>     <strong>$port</strong>     This argument only applies to <info>AF_INET</info> and <info>AF_INET6</info> sockets, and specifies the
                    remote port from which the data is received. If the socket is
                    connection-oriented, <strong>$port</strong> will be <info>null</info>.

<comment>Return:</comment>
  <info>int|false</info>  <strong>socket_recvfrom()</strong> returns the number of bytes received, or <info>false</info> if there was an error.
             The actual error code can be retrieved by  calling <strong>socket_last_error()</strong>. This error code
             may be passed to <strong>socket_strerror()</strong> to get a textual explanation of the error.

<comment>See Also:</comment>
   * <strong>socket_recv()</strong>
   * <strong>socket_send()</strong>
   * <strong>socket_sendto()</strong>
   * <strong>socket_create()</strong>


id: socket_recvmsg
type: function
doc:
<comment>Description:</comment>
  Read a message
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   
  <info>array</info>   <strong>$message</strong>  
  <info>int</info>     <strong>$flags</strong>    

<comment>Return:</comment>
  <info>int|false</info>  

<comment>See Also:</comment>
   * <strong>socket_sendmsg()</strong>
   * <strong>socket_cmsg_space()</strong>


id: socket_select
type: function
doc:
<comment>Description:</comment>
  Runs the select() system call on the given arrays of sockets with a specified timeout
  
  <strong>socket_select()</strong> accepts arrays of sockets and waits for them to change status. Those coming with
  BSD sockets background will recognize that those socket arrays are in fact the so-called file
  descriptor sets. Three independent arrays of sockets are watched.

<comment>Param:</comment>
  <info>array|null</info>  <strong>$read</strong>          The sockets listed in the <strong>$read</strong> array will be watched to see if
                             characters become available for reading (more precisely, to see if a
                             read will not block - in particular, a socket is also ready on
                             end-of-file, in which case a <strong>socket_read()</strong> will return a zero length
                             string).
  <info>array|null</info>  <strong>$write</strong>         The sockets listed in the <strong>$write</strong> array will be watched to see if a
                             write will not block.
  <info>array|null</info>  <strong>$except</strong>        The sockets listed in the <strong>$except</strong> array will be watched for exceptions.
  <info>int|null</info>    <strong>$seconds</strong>       The <strong>$seconds</strong> and <strong>$microseconds</strong> together form the <return>timeout</return> parameter. The
                             <return>timeout</return> is an upper bound on the amount of time elapsed before
                             <strong>socket_select()</strong> return. <strong>$seconds</strong> may be zero , causing <strong>socket_select()</strong>
                             to return immediately. This is useful for polling. If <strong>$seconds</strong> is <info>null</info>
                             (no timeout), <strong>socket_select()</strong> can block indefinitely.
  <info>int</info>         <strong>$microseconds</strong>  

<comment>Return:</comment>
  <info>int|false</info>  On success <strong>socket_select()</strong> returns the number of sockets contained in the modified
             arrays, which may be zero if the timeout expires before anything interesting happens.On
             error <info>false</info> is returned. The error code can be retrieved with <strong>socket_last_error()</strong>.
             
             Be sure to use the <return>===</return> operator when checking for an error. Since the <strong>socket_select()</strong>
             may return 0 the comparison with <return>==</return> would evaluate to <info>true</info>: Understanding
             <strong>socket_select()</strong>'s result
             ]]>

<comment>See Also:</comment>
   * <strong>socket_read()</strong>
   * <strong>socket_write()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_strerror()</strong>


id: socket_send
type: function
doc:
<comment>Description:</comment>
  Sends data to a connected socket
  
  The function <strong>socket_send()</strong> sends <strong>$length</strong> bytes to the socket <strong>$socket</strong> from <strong>$data</strong>.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>string</info>  <strong>$data</strong>    A buffer containing the data that will be sent to the remote host.
  <info>int</info>     <strong>$length</strong>  The number of bytes that will be sent to the remote host from  <strong>$data</strong>.
  <info>int</info>     <strong>$flags</strong>   The value of <strong>$flags</strong> can be any combination of  the following flags, joined with
                   the binary OR (<return>|</return>) operator. Possible values for <strong>$flags</strong><info>MSG_OOB</info> Send OOB
                   (out-of-band) data. <info>MSG_EOR</info> Indicate a record mark. The sent data completes the
                   record. <info>MSG_EOF</info> Close the sender side of the socket and include an appropriate
                   notification of this at the end of the sent data. The sent data completes the
                   transaction. <info>MSG_DONTROUTE</info> Bypass routing, use direct interface.

<comment>Return:</comment>
  <info>int|false</info>  <strong>socket_send()</strong> returns the number of bytes sent, or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>socket_sendto()</strong>


id: socket_sendmsg
type: function
doc:
<comment>Description:</comment>
  Send a message
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>   
  <info>array</info>   <strong>$message</strong>  
  <info>int</info>     <strong>$flags</strong>    

<comment>Return:</comment>
  <info>int|false</info>  Returns the number of bytes sent,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_recvmsg()</strong>
   * <strong>socket_cmsg_space()</strong>


id: socket_sendto
type: function
doc:
<comment>Description:</comment>
  Sends a message to a socket, whether it is connected or not 
  
  The function <strong>socket_sendto()</strong> sends <strong>$length</strong> bytes from <strong>$data</strong> through the socket <strong>$socket</strong> to the
  <strong>$port</strong> at the address <strong>$address</strong>.

<comment>Param:</comment>
  <info>Socket</info>    <strong>$socket</strong>   A <class>Socket</class> instance created using <strong>socket_create()</strong>.
  <info>string</info>    <strong>$data</strong>     The sent data will be taken from buffer <strong>$data</strong>.
  <info>int</info>       <strong>$length</strong>   <strong>$length</strong> bytes from <strong>$data</strong> will be sent.
  <info>int</info>       <strong>$flags</strong>    The value of <strong>$flags</strong> can be any combination of  the following flags, joined
                      with the binary OR (<return>|</return>) operator. Possible values for <strong>$flags</strong><info>MSG_OOB</info> Send OOB
                      (out-of-band) data. <info>MSG_EOR</info> Indicate a record mark. The sent data completes
                      the record. <info>MSG_EOF</info> Close the sender side of the socket and include an
                      appropriate notification of this at the end of the sent data. The sent data
                      completes the transaction. <info>MSG_DONTROUTE</info> Bypass routing, use direct interface.
  <info>string</info>    <strong>$address</strong>  IP address of the remote host.
  <info>int|null</info>  <strong>$port</strong>     <strong>$port</strong> is the remote port number at which the data will be sent.

<comment>Return:</comment>
  <info>int|false</info>  <strong>socket_sendto()</strong> returns the number of bytes sent to the remote host, or <info>false</info> if an
             error occurred.

<comment>See Also:</comment>
   * <strong>socket_send()</strong>


id: socket_set_block
type: function
doc:
<comment>Description:</comment>
  Sets blocking mode on a socket
  
  The <strong>socket_set_block()</strong> function removes the  <info>O_NONBLOCK</info> flag on the socket specified by the
  <strong>$socket</strong> parameter.
  
  When an operation (e.g. receive, send, connect, accept, ...) is performed on  a blocking socket,
  the script will pause its execution until it receives a signal or it can perform the operation.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_set_nonblock()</strong>
   * <strong>socket_set_option()</strong>


id: socket_set_blocking
type: function
doc:
<comment>Description:</comment>
  Alias of stream_set_blocking
  
  This function is an alias of:   <strong>stream_set_blocking()</strong>.


id: socket_set_nonblock
type: function
doc:
<comment>Description:</comment>
  Sets nonblocking mode for file descriptor fd 
  
  The <strong>socket_set_nonblock()</strong> function sets the  <info>O_NONBLOCK</info> flag on the socket specified by the
  <strong>$socket</strong> parameter.
  
  When an operation (e.g. receive, send, connect, accept, ...) is performed on  a non-blocking
  socket, the script will not pause its execution until it receives a  signal or it can perform the
  operation. Rather, if the operation would result in a block, the called function will fail.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_set_block()</strong>
   * <strong>socket_set_option()</strong>
   * <strong>stream_set_blocking()</strong>


id: socket_set_option
type: function
doc:
<comment>Description:</comment>
  Sets socket options for the socket
  
  The <strong>socket_set_option()</strong> function sets the option specified by the <strong>$option</strong> parameter, at the
  specified protocol <strong>$level</strong>, to the value pointed to by the <strong>$value</strong> parameter for the  <strong>$socket</strong>.

<comment>Param:</comment>
  <info>Socket</info>            <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong> or <strong>socket_accept()</strong>.
  <info>int</info>               <strong>$level</strong>   The <strong>$level</strong> parameter specifies the protocol level at which the option
                             resides. For example, to set options at the socket level, a <strong>$level</strong>
                             parameter of <info>SOL_SOCKET</info> would be used. Other levels, such as TCP, can
                             be used by specifying the protocol number of that level.  Protocol
                             numbers can be found by using the  <strong>getprotobyname()</strong> function.
  <info>int</info>               <strong>$option</strong>  The available socket options are the same as those for the
                             <strong>socket_get_option()</strong> function.
  <info>array|string|int</info>  <strong>$value</strong>   The option value.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_create()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_strerror()</strong>
   * <strong>socket_last_error()</strong>
   * <strong>socket_get_option()</strong>


id: socket_set_timeout
type: function
doc:
<comment>Description:</comment>
  Alias of stream_set_timeout
  
  This function is an alias of:  <strong>stream_set_timeout()</strong>.


id: socket_setopt
type: function
doc:
<comment>Description:</comment>
  Alias of socket_set_option
  
  This function is an alias of:  <strong>socket_set_option()</strong>.


id: socket_shutdown
type: function
doc:
<comment>Description:</comment>
  Shuts down a socket for receiving, sending, or both
  
  The <strong>socket_shutdown()</strong> function allows you to stop incoming, outgoing or all data (the default)
  from being sent through the <strong>$socket</strong>
  
  The associated buffer, or buffers, may or may not be emptied.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>  A <class>Socket</class> instance created with <strong>socket_create()</strong>.
  <info>int</info>     <strong>$mode</strong>    The value of <strong>$mode</strong> can be one of the following: possible values for <strong>$mode</strong><return>0</return>
                   Shutdown socket reading <return>1</return> Shutdown socket writing <return>2</return> Shutdown socket reading and
                   writing

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: socket_strerror
type: function
doc:
<comment>Description:</comment>
  Return a string describing a socket error
  
  <strong>socket_strerror()</strong> takes as its <strong>$error_code</strong> parameter a socket error code as returned by
  <strong>socket_last_error()</strong> and returns the corresponding explanatory text.
  
  Although the error messages generated by the socket extension are in  English, the system messages
  retrieved with this function will appear depending on the current locale (<info>LC_MESSAGES</info>).

<comment>Param:</comment>
  <info>int</info>  <strong>$error_code</strong>  A valid socket error number, likely produced by  <strong>socket_last_error()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns the error message associated with the <strong>$error_code</strong> parameter.

<comment>See Also:</comment>
   * <strong>socket_accept()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_create()</strong>


id: socket_write
type: function
doc:
<comment>Description:</comment>
  Write to a socket
  
  The function <strong>socket_write()</strong> writes to the <strong>$socket</strong> from the given <strong>$data</strong>.

<comment>Param:</comment>
  <info>Socket</info>    <strong>$socket</strong>  
  <info>string</info>    <strong>$data</strong>    The buffer to be written.
  <info>int|null</info>  <strong>$length</strong>  The optional parameter <strong>$length</strong> can specify an alternate length of bytes written
                     to the socket. If this length is greater than the buffer length, it is silently
                     truncated to the length of the buffer.

<comment>Return:</comment>
  <info>int|false</info>  Returns the number of bytes successfully written to the socket or <info>false</info> on failure. The
             error code can be retrieved with <strong>socket_last_error()</strong>. This code may be passed to
             <strong>socket_strerror()</strong> to get a textual explanation of the error.
             
             It is perfectly valid for <strong>socket_write()</strong> to return zero which means no bytes have been
             written. Be sure to use the <return>===</return> operator to check for <info>false</info> in case of an error.

<comment>See Also:</comment>
   * <strong>socket_accept()</strong>
   * <strong>socket_bind()</strong>
   * <strong>socket_connect()</strong>
   * <strong>socket_listen()</strong>
   * <strong>socket_read()</strong>
   * <strong>socket_strerror()</strong>


id: socket_wsaprotocol_info_export
type: function
doc:
<comment>Description:</comment>
  Exports the WSAPROTOCOL_INFO Structure
  
  Exports the <return>WSAPROTOCOL_INFO</return> structure into shared memory and returns an identifier to be used
  with <strong>socket_wsaprotocol_info_import()</strong>. The exported ID is only valid for the given <strong>$process_id</strong>.
  
  This function is available only on Windows.

<comment>Param:</comment>
  <info>Socket</info>  <strong>$socket</strong>      A <class>Socket</class> instance.
  <info>int</info>     <strong>$process_id</strong>  The ID of the process which will import the socket.

<comment>Return:</comment>
  <info>string|false</info>  Returns an identifier to be used for the import,  or <info>false</info> on failure

<comment>See Also:</comment>
   * <strong>socket_wsaprotocol_info_import()</strong>
   * <strong>socket_wsaprotocol_info_release()</strong>


id: socket_wsaprotocol_info_import
type: function
doc:
<comment>Description:</comment>
  Imports a Socket from another Process
  
  Imports a socket which has formerly been exported from another process.
  
  This function is available only on Windows.

<comment>Param:</comment>
  <info>string</info>  <strong>$info_id</strong>  The ID which has been returned by a former call to
                    <strong>socket_wsaprotocol_info_export()</strong>.

<comment>Return:</comment>
  <info>Socket|false</info>  Returns a <class>Socket</class> instance on success,  or <info>false</info> on failure

<comment>See Also:</comment>
   * <strong>socket_wsaprotocol_info_export()</strong>


id: socket_wsaprotocol_info_release
type: function
doc:
<comment>Description:</comment>
  Releases an exported WSAPROTOCOL_INFO Structure
  
  Releases the shared memory corresponding to the given <strong>$info_id</strong>.
  
  This function is available only on Windows.

<comment>Param:</comment>
  <info>string</info>  <strong>$info_id</strong>  The ID which has been returned by a former call to
                    <strong>socket_wsaprotocol_info_export()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>socket_wsaprotocol_info_export()</strong>


id: sodium_add
type: function
doc:
<comment>Description:</comment>
  Add large numbers
  
  This adds the parameter <strong>$string2</strong> to <strong>$string1</strong>, overwriting the value stored in <strong>$string1</strong>. This
  function assumes both parameters are binary strings that represent unsigned integers in
  little-endian byte order.

<comment>Param:</comment>
  <info>string</info>  <strong>$string1</strong>  String representing an arbitrary-length unsigned integer in little-endian byte
                    order. This parameter is passed by reference and will hold the sum of the two
                    parameters.
  <info>string</info>  <strong>$string2</strong>  String representing an arbitrary-length unsigned integer in little-endian byte
                    order.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: sodium_base642bin
type: function
doc:
<comment>Description:</comment>
  Decodes a base64-encoded string into raw binary.
  
  Converts a base64 encoded string into raw binary. Unlike <strong>base64_decode()</strong>, <strong>sodium_base642bin()</strong> is
  constant-time (a property that is important for any code that touches cryptographic inputs, such
  as plaintexts or keys) and supports multiple character sets.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  <info>string</info>; Encoded string.
  <info>int</info>     <strong>$id</strong>      <info>SODIUM_BASE64_VARIANT_ORIGINAL</info> for standard (<return>A-Za-z0-9/\+</return>) Base64 encoding.
                   <info>SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING</info> for standard (<return>A-Za-z0-9/\+</return>) Base64
                   encoding, without <return>=</return> padding characters. <info>SODIUM_BASE64_VARIANT_URLSAFE</info> for
                   URL-safe (<return>A-Za-z0-9\-_</return>) Base64 encoding. <info>SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING</info>
                   for URL-safe (<return>A-Za-z0-9\-_</return>) Base64 encoding, without <return>=</return> padding characters.
  <info>string</info>  <strong>$ignore</strong>  Characters to ignore when decoding (e.g. whitespace characters).

<comment>Return:</comment>
  <info>string</info>  Decoded string.


id: sodium_bin2base64
type: function
doc:
<comment>Description:</comment>
  Encodes a raw binary string with base64.
  
  Converts a raw binary string into a base64-encoded string. Unlike <strong>base64_encode()</strong>,
  <strong>sodium_bin2base64()</strong> is constant-time (a property that is important for any code that touches
  cryptographic inputs, such as plaintexts or keys) and supports multiple character sets.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  Raw binary string.
  <info>int</info>     <strong>$id</strong>      <info>SODIUM_BASE64_VARIANT_ORIGINAL</info> for standard (<return>A-Za-z0-9/\+</return>) Base64 encoding.
                   <info>SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING</info> for standard (<return>A-Za-z0-9/\+</return>) Base64
                   encoding, without <return>=</return> padding characters. <info>SODIUM_BASE64_VARIANT_URLSAFE</info> for
                   URL-safe (<return>A-Za-z0-9\-_</return>) Base64 encoding. <info>SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING</info>
                   for URL-safe (<return>A-Za-z0-9\-_</return>) Base64 encoding, without <return>=</return> padding characters.

<comment>Return:</comment>
  <info>string</info>  Base64-encoded string.


id: sodium_bin2hex
type: function
doc:
<comment>Description:</comment>
  Encode to hexadecimal
  
  Converts a raw binary string into a hex-encoded string. Unlike the standard hex-encoding function,
  <strong>sodium_bin2hex()</strong> is constant-time (a property that is important for any code that touches
  cryptographic inputs, such as plaintexts or keys).

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  Raw binary string.

<comment>Return:</comment>
  <info>string</info>  Hex encoded string.


id: sodium_compare
type: function
doc:
<comment>Description:</comment>
  Compare large numbers
  
  Compare two strings as if they were arbitrary-length, unsigned little-endian integers, without
  side-channel leakage.

<comment>Param:</comment>
  <info>string</info>  <strong>$string1</strong>  Left operand
  <info>string</info>  <strong>$string2</strong>  Right operand

<comment>Return:</comment>
  <info>int</info>  Returns <return>-1</return> if <strong>$string1</strong> is less than <strong>$string2</strong>.
       
       Returns <return>1</return> if <strong>$string1</strong> is greater than <strong>$string2</strong>.
       
       Returns <return>0</return> if both strings are equal.


id: sodium_crypto_aead_aes256gcm_decrypt
type: function
doc:
<comment>Description:</comment>
  Verify then decrypt a message with AES-256-GCM
  
  Verify then decrypt with AES-256-GCM. Only available if
  <strong>sodium_crypto_aead_aes256gcm_is_available()</strong> returns <info>true</info>.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>       Must be in the format provided by <strong>sodium_crypto_aead_aes256gcm_encrypt()</strong>
                            (ciphertext and tag, concatenated).
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 12 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string|false</info>  Returns the plaintext on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_aes256gcm_encrypt
type: function
doc:
<comment>Description:</comment>
  Encrypt then authenticate with AES-256-GCM
  
  Encrypt then authenticate with AES-256-GCM. Only available if
  <strong>sodium_crypto_aead_aes256gcm_is_available()</strong> returns <info>true</info>.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>          The plaintext message to encrypt.
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 12 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Returns the ciphertext and authentication tag as a string of raw binary bytes. (Format:
          ciphertext, then tag.)


id: sodium_crypto_aead_aes256gcm_is_available
type: function
doc:
<comment>Description:</comment>
  Check if hardware supports AES256-GCM
  
  The return value of this function depends on whether or not the hardware supports
  hardware-accelerated AES.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if it is safe to encrypt with AES-256-GCM, and <info>false</info> otherwise.


id: sodium_crypto_aead_aes256gcm_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random AES-256-GCM key
  
  Generate a random key for use with <strong>sodium_crypto_aead_aes256gcm_encrypt()</strong> and
  <strong>sodium_crypto_aead_aes256gcm_decrypt()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 256-bit random key.


id: sodium_crypto_aead_chacha20poly1305_decrypt
type: function
doc:
<comment>Description:</comment>
  Verify then decrypt with ChaCha20-Poly1305
  
  Verify then decrypt with ChaCha20-Poly1305.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>       Must be in the format provided by
                            <strong>sodium_crypto_aead_chacha20poly1305_encrypt()</strong> (ciphertext and tag,
                            concatenated).
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 8 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string|false</info>  Returns the plaintext on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_chacha20poly1305_encrypt
type: function
doc:
<comment>Description:</comment>
  Encrypt then authenticate with ChaCha20-Poly1305
  
  Encrypt then authenticate with ChaCha20-Poly1305.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>          The plaintext message to encrypt.
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 8 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Returns the ciphertext and tag on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_chacha20poly1305_ietf_decrypt
type: function
doc:
<comment>Description:</comment>
  Verify that the ciphertext includes a valid tag
  
  Verify then decrypt with ChaCha20-Poly1305 (IETF variant).
  
  The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>       Must be in the format provided by
                            <strong>sodium_crypto_aead_chacha20poly1305_ietf_encrypt()</strong> (ciphertext and tag,
                            concatenated).
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 12 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string|false</info>  Returns the plaintext on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_chacha20poly1305_ietf_encrypt
type: function
doc:
<comment>Description:</comment>
  Encrypt a message
  
  Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant).
  
  The IETF variant uses 96-bit nonces and 32-bit internal counters, instead of 64-bit for both.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>          The plaintext message to encrypt.
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 12 bytes long.
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Returns the ciphertext and tag on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_chacha20poly1305_ietf_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random ChaCha20-Poly1305 (IETF) key.
  
  Generate a random key for use with <strong>sodium_crypto_aead_chacha20poly1305_ietf_encrypt()</strong> and
  <strong>sodium_crypto_aead_chacha20poly1305_ietf_decrypt()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 256-bit random key.


id: sodium_crypto_aead_chacha20poly1305_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random ChaCha20-Poly1305 key.
  
  Generate a random key for use with <strong>sodium_crypto_aead_chacha20poly1305_encrypt()</strong> and
  <strong>sodium_crypto_aead_chacha20poly1305_decrypt()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 256-bit random key.


id: sodium_crypto_aead_xchacha20poly1305_ietf_decrypt
type: function
doc:
<comment>Description:</comment>
  (Preferred) Verify then decrypt with XChaCha20-Poly1305
  
  Verify then decrypt with ChaCha20-Poly1305 (eXtended-nonce variant).
  
  Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>       Must be in the format provided by
                            <strong>sodium_crypto_aead_chacha20poly1305_ietf_encrypt()</strong> (ciphertext and tag,
                            concatenated).
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 24 bytes long. This
                            is a large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string|false</info>  Returns the plaintext on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_xchacha20poly1305_ietf_encrypt
type: function
doc:
<comment>Description:</comment>
  (Preferred) Encrypt then authenticate with XChaCha20-Poly1305
  
  Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant).
  
  Generally, XChaCha20-Poly1305 is the best of the provided AEAD modes to use.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>          The plaintext message to encrypt.
  <info>string</info>  <strong>$additional_data</strong>  Additional, authenticated data. This is used in the verification of the
                            authentication tag appended to the ciphertext, but it is not encrypted
                            or stored in the ciphertext.
  <info>string</info>  <strong>$nonce</strong>            A number that must be only used once, per message. 24 bytes long. This
                            is a large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>              Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Returns the ciphertext and tag on success,  or <info>false</info> on failure.


id: sodium_crypto_aead_xchacha20poly1305_ietf_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random XChaCha20-Poly1305 key.
  
  Generate a random key for use with <strong>sodium_crypto_aead_xchacha20poly1305_ietf_encrypt()</strong> and
  <strong>sodium_crypto_aead_xchacha20poly1305_ietf_decrypt()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 256-bit random key.


id: sodium_crypto_auth
type: function
doc:
<comment>Description:</comment>
  Compute a tag for the message
  
  Symmetric message authentication via <strong>sodium_crypto_auth()</strong> provides integrity, but not
  confidentiality.
  
  Unlike with digital signatures (e.g. <strong>sodium_crypto_sign_detached()</strong>), any party capable of
  verifying a message is also capable of authenticating their own messages. (Hence, symmetric
  authentication.)

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message you intend to authenticate
  <info>string</info>  <strong>$key</strong>      Authentication key

<comment>Return:</comment>
  <info>string</info>  Authentication tag


id: sodium_crypto_auth_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random key for sodium_crypto_auth
  
  Generate a key for use with <strong>sodium_crypto_auth()</strong> and <strong>sodium_crypto_auth_verify()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 256-bit random key.


id: sodium_crypto_auth_verify
type: function
doc:
<comment>Description:</comment>
  Verifies that the tag is valid for the message
  
  Verify the authentication tag is valid for a given message and key.
  
  Unlike with digital signatures (e.g. <strong>sodium_crypto_sign_verify_detached()</strong>), any party capable of
  verifying a message is also capable of authenticating their own messages. (Hence, symmetric
  authentication.)

<comment>Param:</comment>
  <info>string</info>  <strong>$mac</strong>      Authentication tag produced by <strong>sodium_crypto_auth()</strong>
  <info>string</info>  <strong>$message</strong>  Message
  <info>string</info>  <strong>$key</strong>      Authentication key

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: sodium_crypto_box
type: function
doc:
<comment>Description:</comment>
  Authenticated public-key encryption
  
  Encrypt a message using asymmetric (public key) cryptography.
  
  The algorithm used by functions prefixed with <strong>sodium_crypto_box()</strong> are Elliptic Curve
  Diffie-Hellman over the Montgomery curve, Curve25519; usually abbreviated as X25519.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>   The message to be encrypted.
  <info>string</info>  <strong>$nonce</strong>     A number that must be only used once, per message. 24 bytes long. This is a
                     large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key_pair</strong>  See <strong>sodium_crypto_box_keypair_from_secretkey_and_publickey()</strong>. This should
                     include the sender's X25519 secret key and the recipient's X25519 public key.

<comment>Return:</comment>
  <info>string</info>  Returns the encrypted message (ciphertext plus authentication tag). The ciphertext will be
          16 bytes longer than the plaintext, and a raw binary string. See <strong>sodium_bin2base64()</strong> for
          safe encoding for storage.


id: sodium_crypto_box_keypair
type: function
doc:
<comment>Description:</comment>
  Randomly generate a secret key and a corresponding public key
  
  Generates a secret key and a public key as one string.
  
  To get the secret key out of this unified keypair string, see <strong>sodium_crypto_box_secretkey()</strong>. To
  get the public key out of this unified keypair string, see <strong>sodium_crypto_box_publickey()</strong>.

<comment>Return:</comment>
  <info>string</info>  One string containing both the X25519 secret key and corresponding X25519 public key.


id: sodium_crypto_box_keypair_from_secretkey_and_publickey
type: function
doc:
<comment>Description:</comment>
  Create a unified keypair string from a secret key and public key
  
  This function exists to satisfy the API requirements of e.g. <strong>crypto_box()</strong>. Pass in one party's
  secret key and the other's public key, and you will obtain a "keypair" for your conversation.

<comment>Param:</comment>
  <info>string</info>  <strong>$secret_key</strong>  Secret key.
  <info>string</info>  <strong>$public_key</strong>  Public key.

<comment>Return:</comment>
  <info>string</info>  X25519 Keypair.


id: sodium_crypto_box_open
type: function
doc:
<comment>Description:</comment>
  Authenticated public-key decryption
  
  Decrypt a message using asymmetric (public key) cryptography.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>  The encrypted message to attempt to decrypt.
  <info>string</info>  <strong>$nonce</strong>       A number that must be only used once, per message. 24 bytes long. This is a
                       large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key_pair</strong>    See <strong>sodium_crypto_box_keypair_from_secretkey_and_publickey()</strong>. This should
                       include the sender's public key and the recipient's secret key.

<comment>Return:</comment>
  <info>string|false</info>  Returns the plaintext message on success,  or <info>false</info> on failure.


id: sodium_crypto_box_publickey
type: function
doc:
<comment>Description:</comment>
  Extract the public key from a crypto_box keypair
  
  Given a keypair, fetch only the public key.

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  A keypair, such as one generated by <strong>sodium_crypto_box_keypair()</strong> or
                     <strong>sodium_crypto_box_seed_keypair()</strong>

<comment>Return:</comment>
  <info>string</info>  X25519 public key.


id: sodium_crypto_box_publickey_from_secretkey
type: function
doc:
<comment>Description:</comment>
  Calculate the public key from a secret key
  
  Given a secret key, calculate the corresponding public key.
  
  This only works with the type of keys intended for use with <strong>crypto_box()</strong> (which uses Elliptic
  Curve Diffie-Hellman over the Montgomery curve, Curve25519; abbreviated as X25519), not
  <strong>crypto_sign()</strong> (which uses Edwards Digital Signature Algorithm over the Edwards Curve with the
  corresponding paramaters; abbreviated Ed25519).

<comment>Param:</comment>
  <info>string</info>  <strong>$secret_key</strong>  X25519 secret key

<comment>Return:</comment>
  <info>string</info>  X25519 public key.


id: sodium_crypto_box_seal
type: function
doc:
<comment>Description:</comment>
  Anonymous public-key encryption
  
  Encrypt a message such that only the recipient can decrypt it.
  
  Unlike with <strong>sodium_crypto_box()</strong>, you only need to know the recipient's public key to use
  <strong>sodium_crypto_box_seal()</strong>. One consequence of this convenience, however, is that the ciphertext
  isn't bound to a static public key, and is therefore not authenticated. Hence, anonymous
  public-key encryption.
  
  <strong>sodium_crypto_box_seal()</strong> still provides ciphertext integrity. Just not sender identity
  authentication.
  
  If you also need sender authentication, the <strong>sodium_crypto_sign()</strong> functions are likely the best
  place to start.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>     The message to encrypt.
  <info>string</info>  <strong>$public_key</strong>  The public key that corresponds to the only key that can decrypt the message.

<comment>Return:</comment>
  <info>string</info>  A ciphertext string in the format of (one-time public key, encrypted message,
          authentication tag).


id: sodium_crypto_box_seal_open
type: function
doc:
<comment>Description:</comment>
  Anonymous public-key decryption
  
  Decrypt a message that was encrypted with <strong>sodium_crypto_box_seal()</strong>

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>  The encrypted message
  <info>string</info>  <strong>$key_pair</strong>    The keypair of the recipient. Must include the secret key.

<comment>Return:</comment>
  <info>string|false</info>  The plaintext on success,  or <info>false</info> on failure.


id: sodium_crypto_box_secretkey
type: function
doc:
<comment>Description:</comment>
  Extracts the secret key from a crypto_box keypair
  
  Given a keypair, fetch only the secret key.

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  A keypair, such as one generated by <strong>sodium_crypto_box_keypair()</strong> or
                     <strong>sodium_crypto_box_seed_keypair()</strong>

<comment>Return:</comment>
  <info>string</info>  X25519 secret key.


id: sodium_crypto_box_seed_keypair
type: function
doc:
<comment>Description:</comment>
  Deterministically derive the key pair from a single key
  
  Clamps the seed to form a secret key, derives the public key, and returns the two as a keypair.
  
  The <return>*_seed_keypair</return> functions are ideal for generating a keypair from a password and salt. Use the
  result as a <strong>$seed</strong> to generate the desired keys.

<comment>Param:</comment>
  <info>string</info>  <strong>$seed</strong>  Some cryptographic input. Must be 32 bytes.

<comment>Return:</comment>
  <info>string</info>  X25519 Keypair (secret key and public key).


id: sodium_crypto_core_ristretto255_add
type: function
doc:
<comment>Description:</comment>
  Adds an element
  
  Adds an element <strong>$q</strong> to <strong>$p</strong>. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$p</strong>  An element.
  <info>string</info>  <strong>$q</strong>  An element.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_random()</strong>
   * <strong>sodium_crypto_core_ristretto255_sub()</strong>


id: sodium_crypto_core_ristretto255_from_hash
type: function
doc:
<comment>Description:</comment>
  Maps a vector
  
  Maps a 64-bytes vector <strong>$s</strong> to a group element. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  A 64-bytes vector.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_hex2bin()</strong>
   * <strong>sodium_bin2hex()</strong>
   * <strong>sodium_crypto_core_ristretto255_from_hash()</strong>


id: sodium_crypto_core_ristretto255_is_valid_point
type: function
doc:
<comment>Description:</comment>
  Determines if a point on the ristretto255 curve
  
  Determines if a point on the ristretto255 curve, in canonical form, on the main subgroup, and that
  the point doesn't have a small order. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  An Elliptic-curve point.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if <strong>$s</strong> is on the ristretto255 curve, <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>
   * <strong>sodium_crypto_scalarmult_ristretto255_base()</strong>


id: sodium_crypto_core_ristretto255_random
type: function
doc:
<comment>Description:</comment>
  Generates a random key
  
  Generates a random key. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_add()</strong>
   * <strong>sodium_crypto_core_ristretto255_sub()</strong>


id: sodium_crypto_core_ristretto255_scalar_add
type: function
doc:
<comment>Description:</comment>
  Adds a scalar value
  
  Adds an element <strong>$y</strong> to <strong>$x</strong>. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$x</strong>  Scalar, representing the X coordinate.
  <info>string</info>  <strong>$y</strong>  Scalar, representing the Y coordinate.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>
   * <strong>sodium_crypto_core_ristretto255_scalar_sub()</strong>


id: sodium_crypto_core_ristretto255_scalar_complement
type: function
doc:
<comment>Description:</comment>
  The sodium_crypto_core_ristretto255_scalar_complement purpose
  
  Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  Scalar value.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>


id: sodium_crypto_core_ristretto255_scalar_invert
type: function
doc:
<comment>Description:</comment>
  Inverts a scalar value
  
  Inverts a scalar value. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  Scalar value.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>


id: sodium_crypto_core_ristretto255_scalar_mul
type: function
doc:
<comment>Description:</comment>
  Multiplies a scalar value
  
  Multiplies a scalar value. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$x</strong>  Scalar, representing the X coordinate.
  <info>string</info>  <strong>$y</strong>  Scalar, representing the Y coordinate.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>


id: sodium_crypto_core_ristretto255_scalar_negate
type: function
doc:
<comment>Description:</comment>
  Negates a scalar value
  
  Negates a scalar value. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  Scalar value.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>


id: sodium_crypto_core_ristretto255_scalar_random
type: function
doc:
<comment>Description:</comment>
  Generates a random key
  
  Generates a random key. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_add()</strong>
   * <strong>sodium_crypto_core_ristretto255_scalar_sub()</strong>


id: sodium_crypto_core_ristretto255_scalar_reduce
type: function
doc:
<comment>Description:</comment>
  Reduces a scalar value
  
  Reduces a scalar value. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$s</strong>  Scalar value.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>


id: sodium_crypto_core_ristretto255_scalar_sub
type: function
doc:
<comment>Description:</comment>
  Subtracts a scalar value
  
  Subtracts a scalar <strong>$y</strong> from <strong>$x</strong>. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$x</strong>  Scalar, representing the X coordinate.
  <info>string</info>  <strong>$y</strong>  Scalar, representing the Y coordinate.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_scalar_random()</strong>
   * <strong>sodium_crypto_core_ristretto255_scalar_add()</strong>


id: sodium_crypto_core_ristretto255_sub
type: function
doc:
<comment>Description:</comment>
  Subtracts an element
  
  Subtracts an element <strong>$q</strong> from <strong>$p</strong>. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$p</strong>  An element.
  <info>string</info>  <strong>$q</strong>  An element.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_core_ristretto255_random()</strong>
   * <strong>sodium_crypto_core_ristretto255_add()</strong>


id: sodium_crypto_generichash
type: function
doc:
<comment>Description:</comment>
  Get a hash of the message
  
  Hash a message with BLAKE2b.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message being hashed.
  <info>string</info>  <strong>$key</strong>      (Optional) cryptographic key. This serves the same function as a HMAC key, but
                    it's utilized as a reserved section of the internal BLAKE2 state.
  <info>int</info>     <strong>$length</strong>   Output size.

<comment>Return:</comment>
  <info>string</info>  The cryptographic hash as raw bytes. If a hex-encoded output is desired, the result can be
          passed to <strong>sodium_bin2hex()</strong>.


id: sodium_crypto_generichash_final
type: function
doc:
<comment>Description:</comment>
  Complete the hash
  
  The finalization method for the streaming generichash API.

<comment>Param:</comment>
  <info>string</info>  <strong>$state</strong>   Hash state returned from <strong>sodium_crypto_generichash_init()</strong>
  <info>int</info>     <strong>$length</strong>  Output length.

<comment>Return:</comment>
  <info>string</info>  Cryptographic hash.


id: sodium_crypto_generichash_init
type: function
doc:
<comment>Description:</comment>
  Initialize a hash for streaming
  
  The initialization method for the streaming generichash API.

<comment>Param:</comment>
  <info>string</info>  <strong>$key</strong>     The generichash key.
  <info>int</info>     <strong>$length</strong>  The expected output length of the hash function.

<comment>Return:</comment>
  <info>string</info>  Returns a hash state, serialized as a raw binary string.


id: sodium_crypto_generichash_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random generichash key
  
  Generate a random key for use with the generichash API.

<comment>Return:</comment>
  <info>string</info>  A random 256-bit key.


id: sodium_crypto_generichash_update
type: function
doc:
<comment>Description:</comment>
  Add message to a hash
  
  Appends a message to the internal hash state.

<comment>Param:</comment>
  <info>string</info>  <strong>$state</strong>    The return value of <strong>sodium_crypto_generichash_init()</strong>.
  <info>string</info>  <strong>$message</strong>  Data to append to the hashing state.

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.


id: sodium_crypto_kdf_derive_from_key
type: function
doc:
<comment>Description:</comment>
  Derive a subkey
  
  Derive a subkey from a root key and additional context.
  
  Similar to <strong>hash_hkdf()</strong>.

<comment>Param:</comment>
  <info>int</info>     <strong>$subkey_length</strong>  Length of the key to return (in bytes)
  <info>int</info>     <strong>$subkey_id</strong>      Return the Nth subkey from a given root key. Useful for seeking.
  <info>string</info>  <strong>$context</strong>        Application-specific context.
  <info>string</info>  <strong>$key</strong>            The root key from which the subkey is derived.

<comment>Return:</comment>
  <info>string</info>  A string of pseudorandom (raw binary) bytes.


id: sodium_crypto_kdf_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random root key for the KDF interface
  
  Generates a random key suitable for serving as the root key for
  <strong>sodium_crypto_kdf_derive_from_key()</strong>.

<comment>Return:</comment>
  <info>string</info>  A random 256-bit key.


id: sodium_crypto_kx_client_session_keys
type: function
doc:
<comment>Description:</comment>
  Calculate the client-side session keys.
  
  Calculate the client-side session keys, using the X25519 + BLAKE2b key-exchange method.

<comment>Param:</comment>
  <info>string</info>  <strong>$client_key_pair</strong>  A crypto_kx keypair, such as one generated by
                            <strong>sodium_crypto_kx_keypair()</strong>.
  <info>string</info>  <strong>$server_key</strong>       A crypto_kx public key.

<comment>Return:</comment>
  <info>array</info>  An array consisting of two strings. The first should be used for receiving data from the
         server. The second should be used for sending data to the server.


id: sodium_crypto_kx_keypair
type: function
doc:
<comment>Description:</comment>
  Creates a new sodium keypair
  
  Create a new sodium keypair consisting of the secret key (32 bytes) followed by the public key (32
  bytes). The keys can be retrieved by calling <strong>sodium_crypto_kx_secretkey()</strong> and
  <strong>sodium_crypto_kx_publickey()</strong>, respectively.

<comment>Return:</comment>
  <info>string</info>  Returns the new keypair on success; throws an exception otherwise.


id: sodium_crypto_kx_publickey
type: function
doc:
<comment>Description:</comment>
  Extract the public key from a crypto_kx keypair
  
  Extract the public key from a crypto_kx keypair.

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  X25519 keypair, such as one generated by <strong>sodium_crypto_kx_keypair()</strong>.

<comment>Return:</comment>
  <info>string</info>  X25519 public key.


id: sodium_crypto_kx_secretkey
type: function
doc:
<comment>Description:</comment>
  Extract the secret key from a crypto_kx keypair.
  
  Extract the secret key from a crypto_kx keypair.

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  X25519 keypair, such as one generated by <strong>sodium_crypto_kx_keypair()</strong>.

<comment>Return:</comment>
  <info>string</info>  X25519 secret key.


id: sodium_crypto_kx_seed_keypair
type: function
doc:
<comment>Description:</comment>
  Description
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$seed</strong>  

<comment>Return:</comment>
  <info>string</info>  


id: sodium_crypto_kx_server_session_keys
type: function
doc:
<comment>Description:</comment>
  Calculate the server-side session keys.
  
  Calculate the server-side session keys, using the X25519 + BLAKE2b key-exchange method.

<comment>Param:</comment>
  <info>string</info>  <strong>$server_key_pair</strong>  A crypto_kx keypair, such as one generated by
                            <strong>sodium_crypto_kx_keypair()</strong>.
  <info>string</info>  <strong>$client_key</strong>       A crypto_kx public key.

<comment>Return:</comment>
  <info>array</info>  An array consisting of two strings. The first should be used for receiving data from the
         client. The second should be used for sending data to the client.


id: sodium_crypto_pwhash
type: function
doc:
<comment>Description:</comment>
  Derive a key from a password, using Argon2
  
  This function provides low-level access to libsodium's crypto_pwhash key derivation function.
  Unless you have specific reason to use this function, you should use <strong>sodium_crypto_pwhash_str()</strong> or
  <strong>password_hash()</strong> functions instead.
  
  A common reason to use this particular function is to derive the seeds for cryptographic keys from
  a password and salt, and then use these seeds to generate the actual keys needed for some purpose
  (e.g. <strong>sodium_crypto_sign_detached()</strong>).

<comment>Param:</comment>
  <info>int</info>     <strong>$length</strong>    <info>int</info>; The length of the password hash to generate, in bytes.
  <info>string</info>  <strong>$password</strong>  <info>string</info>; The password to generate a hash for.
  <info>string</info>  <strong>$salt</strong>      A salt to add to the password before hashing. The salt should be unpredictable,
                     ideally generated from a good random number source such as <strong>random_bytes()</strong>, and
                     have a length of at least <info>SODIUM_CRYPTO_PWHASH_SALTBYTES</info> bytes.
  <info>int</info>     <strong>$opslimit</strong>  Represents a maximum amount of computations to perform. Raising this number
                     will make the function require more CPU cycles to compute a key. There are some
                     constants available to set the operations limit to appropriate values depending
                     on intended use, in order of strength:
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE</info>,
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE</info> and
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE</info>.
  <info>int</info>     <strong>$memlimit</strong>  The maximum amount of RAM that the function will use, in bytes. There are
                     constants to help you choose an appropriate value, in order of size:
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE</info>,
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE</info>, and
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE</info>. Typically these should be paired with
                     the matching <strong>$opslimit</strong> values.
  <info>int</info>     <strong>$algo</strong>      <info>int</info> A number indicating the hash algorithm to use. By default
                     <info>SODIUM_CRYPTO_PWHASH_ALG_DEFAULT</info> (the currently recommended algorithm, which
                     can change from one version of libsodium to another), or explicitly using
                     <info>SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13</info>, representing the Argon2id algorithm
                     version 1.3.

<comment>Return:</comment>
  <info>string</info>  Returns the derived key. The return value is a binary string of the hash, not an
          ASCII-encoded representation, and does not contain additional information about the
          parameters used to create the hash, so you will need to keep that information if you are
          ever going to verify the password in future. Use <strong>sodium_crypto_pwhash_str()</strong> to avoid
          needing to do all that.


id: sodium_crypto_pwhash_scryptsalsa208sha256
type: function
doc:
<comment>Description:</comment>
  Derives a key from a password, using scrypt
  
  This is the scrypt counterpart to <strong>sodium_crypto_pwhash()</strong>.
  
  A common reason to use this particular function is to derive the seeds for cryptographic keys from
  a password and salt, and then use these seeds to generate the actual keys needed for some purpose
  (e.g. <strong>sodium_crypto_sign_detached()</strong>).

<comment>Param:</comment>
  <info>int</info>     <strong>$length</strong>    The length of the password hash to generate, in bytes.
  <info>string</info>  <strong>$password</strong>  The password to generate a hash for.
  <info>string</info>  <strong>$salt</strong>      A salt to add to the password before hashing. The salt should be unpredictable,
                     ideally generated from a good random number source such as <strong>random_bytes()</strong>, and
                     have a length of at least <info>SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES</info>
                     bytes.
  <info>int</info>     <strong>$opslimit</strong>  Represents a maximum amount of computations to perform. Raising this number
                     will make the function require more CPU cycles to compute a key. There are some
                     constants available to set the operations limit to appropriate values depending
                     on intended use, in order of strength:
                     <info>SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE</info> and
                     <info>SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE</info>.
  <info>int</info>     <strong>$memlimit</strong>  The maximum amount of RAM that the function will use, in bytes. There are
                     constants to help you choose an appropriate value, in order of size:
                     <info>SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE</info> and
                     <info>SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE</info>. Typically these
                     should be paired with the matching <strong>$opslimit</strong> values.

<comment>Return:</comment>
  <info>string</info>  A string of bytes of the desired length.


id: sodium_crypto_pwhash_scryptsalsa208sha256_str
type: function
doc:
<comment>Description:</comment>
  Get an ASCII encoded hash
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$password</strong>  
  <info>int</info>     <strong>$opslimit</strong>  
  <info>int</info>     <strong>$memlimit</strong>  

<comment>Return:</comment>
  <info>string</info>  


id: sodium_crypto_pwhash_scryptsalsa208sha256_str_verify
type: function
doc:
<comment>Description:</comment>
  Verify that the password is a valid password verification string
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$hash</strong>      
  <info>string</info>  <strong>$password</strong>  

<comment>Return:</comment>
  <info>bool</info>  


id: sodium_crypto_pwhash_str
type: function
doc:
<comment>Description:</comment>
  Get an ASCII-encoded hash
  
  Uses a CPU- and memory-hard hash algorithm along with a randomly-generated salt, and memory and
  CPU limits to generate an ASCII-encoded hash suitable for password storage.

<comment>Param:</comment>
  <info>string</info>  <strong>$password</strong>  <info>string</info>; The password to generate a hash for.
  <info>int</info>     <strong>$opslimit</strong>  Represents a maximum amount of computations to perform. Raising this number
                     will make the function require more CPU cycles to compute a key. There are
                     constants available to set the operations limit to appropriate values depending
                     on intended use, in order of strength:
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE</info>,
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE</info> and
                     <info>SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE</info>.
  <info>int</info>     <strong>$memlimit</strong>  The maximum amount of RAM that the function will use, in bytes. There are
                     constants to help you choose an appropriate value, in order of size:
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE</info>,
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE</info>, and
                     <info>SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE</info>. Typically these should be paired with
                     the matching opslimit values.

<comment>Return:</comment>
  <info>string</info>  Returns the hashed password.
          
          In order to produce the same password hash from the same password, the same values for
          <strong>$opslimit</strong> and <strong>$memlimit</strong> must be used. These are embedded within the generated hash, so
          everything that's needed to verify the hash is included. This allows the
          <strong>sodium_crypto_pwhash_str_verify()</strong> function to verify the hash without needing separate
          storage for the other parameters.

<comment>See Also:</comment>
   * <strong>sodium_crypto_pwhash_str_verify()</strong>
   * <strong>sodium_crypto_pwhash()</strong>
   * <strong>password_hash()</strong>
   * <strong>password_verify()</strong>
   * Libsodium Argon2 docs


id: sodium_crypto_pwhash_str_needs_rehash
type: function
doc:
<comment>Description:</comment>
  Determine whether or not to rehash a password
  
  Determine whether or not to rehash a password, based on the current hash <strong>$opslimit</strong> and <strong>$memlimit</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$password</strong>  Password hash
  <info>int</info>     <strong>$opslimit</strong>  Configured opslimit; see <strong>sodium_crypto_pwhash_str()</strong>
  <info>int</info>     <strong>$memlimit</strong>  Configured memlimit; see <strong>sodium_crypto_pwhash_str()</strong>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the provided memlimit/opslimit do not match what's stored in the hash.
        Returns <info>false</info> if they match.


id: sodium_crypto_pwhash_str_verify
type: function
doc:
<comment>Description:</comment>
  Verifies that a password matches a hash
  
  Checks that a password hash created using <strong>sodium_crypto_pwhash_str()</strong> matches a given plain-text
  password. Note that the parameters are in the opposite order to the same parameters in the similar
  <strong>password_verify()</strong> function.

<comment>Param:</comment>
  <info>string</info>  <strong>$hash</strong>      A hash created by <strong>password_hash()</strong>.
  <info>string</info>  <strong>$password</strong>  The user's password.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the password and hash match, or <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>sodium_crypto_pwhash_str()</strong>
   * <strong>password_hash()</strong>
   * <strong>password_verify()</strong>


id: sodium_crypto_scalarmult
type: function
doc:
<comment>Description:</comment>
  Compute a shared secret given a user's secret key and another user's public key
  
  Elliptic Curve Diffie-Hellman. Calculates scalar n times point p, on an elliptic curve.

<comment>Param:</comment>
  <info>string</info>  <strong>$n</strong>  scalar, which is typically a secret key
  <info>string</info>  <strong>$p</strong>  point (x-coordinate), which is typically a public key

<comment>Return:</comment>
  <info>string</info>  A 32-byte random string.


id: sodium_crypto_scalarmult_base
type: function
doc:
<comment>Description:</comment>
  Alias of sodium_crypto_box_publickey_from_secretkey
  
  This function is an alias of:  <strong>sodium_crypto_box_publickey_from_secretkey()</strong>.


id: sodium_crypto_scalarmult_ristretto255
type: function
doc:
<comment>Description:</comment>
  Computes a shared secret
  
  Calculates scalar <strong>$n</strong> times point <strong>$p</strong>. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$n</strong>  A scalar, which is typically a secret key.
  <info>string</info>  <strong>$p</strong>  A point (x-coordinate), which is typically a public key.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_scalarmult_ristretto255_base()</strong>


id: sodium_crypto_scalarmult_ristretto255_base
type: function
doc:
<comment>Description:</comment>
  Calculates the public key from a secret key
  
  Given a secret key, calculates the corresponding public key. Available as of libsodium 1.0.18.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>string</info>  <strong>$n</strong>  A secret key.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte random <info>string</info>.

<comment>See Also:</comment>
   * <strong>sodium_crypto_scalarmult_ristretto255()</strong>


id: sodium_crypto_secretbox
type: function
doc:
<comment>Description:</comment>
  Authenticated shared-key encryption
  
  Encrypt a message with a symmetric (shared) key.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The plaintext message to encrypt.
  <info>string</info>  <strong>$nonce</strong>    A number that must be only used once, per message. 24 bytes long. This is a
                    large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>      Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Returns the encrypted string.

<comment>See Also:</comment>
   * <strong>sodium_crypto_secretbox_open()</strong>
   * <strong>sodium_crypto_secretbox_keygen()</strong>
   * <strong>random_bytes()</strong>


id: sodium_crypto_secretbox_keygen
type: function
doc:
<comment>Description:</comment>
  Generate random key for sodium_crypto_secretbox
  
  Generate a key for use with <strong>sodium_crypto_secretbox()</strong> and <strong>sodium_crypto_secretbox_open()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns the generated string of cryptographically secure random bytes.

<comment>See Also:</comment>
   * <strong>sodium_bin2hex()</strong>
   * <strong>random_bytes()</strong>


id: sodium_crypto_secretbox_open
type: function
doc:
<comment>Description:</comment>
  Authenticated shared-key decryption
  
  Decrypt an encrypted message with a symmetric (shared) key.

<comment>Param:</comment>
  <info>string</info>  <strong>$ciphertext</strong>  Must be in the format provided by <strong>sodium_crypto_secretbox()</strong> (ciphertext and
                       tag, concatenated).
  <info>string</info>  <strong>$nonce</strong>       A number that must be only used once, per message. 24 bytes long. This is a
                       large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>         Encryption key (256-bit).

<comment>Return:</comment>
  <info>string|false</info>  The decrypted string on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sodium_crypto_secretbox()</strong>
   * <strong>sodium_crypto_secretbox_keygen()</strong>
   * <strong>random_bytes()</strong>


id: sodium_crypto_secretstream_xchacha20poly1305_init_pull
type: function
doc:
<comment>Description:</comment>
  Initialize a secretstream context for decryption
  
  Initialize a secretstream context for decryption.

<comment>Param:</comment>
  <info>string</info>  <strong>$header</strong>  The header of the secretstream. This should be one of the values produced by
                   <strong>sodium_crypto_secretstream_xchacha20poly1305_init_push()</strong>.
  <info>string</info>  <strong>$key</strong>     Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Secretstream state.


id: sodium_crypto_secretstream_xchacha20poly1305_init_push
type: function
doc:
<comment>Description:</comment>
  Initialize a secretstream context for encryption
  
  Initialize a secretstream context for encryption.

<comment>Param:</comment>
  <info>string</info>  <strong>$key</strong>  Cryptography key. See <strong>sodium_crypto_secretstream_xchacha20poly1305_keygen()</strong>.

<comment>Return:</comment>
  <info>array</info>  An array with two string values:


id: sodium_crypto_secretstream_xchacha20poly1305_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random secretstream key.
  
  Generate a random secretstream key.

<comment>Return:</comment>
  <info>string</info>  Returns a string of random bytes.


id: sodium_crypto_secretstream_xchacha20poly1305_pull
type: function
doc:
<comment>Description:</comment>
  Decrypt a chunk of data from an encrypted stream
  
  Decrypt a chunk of data from an encrypted stream.

<comment>Param:</comment>
  <info>string</info>  <strong>$state</strong>            See <strong>sodium_crypto_secretstream_xchacha20poly1305_init_pull()</strong> and
                            <strong>sodium_crypto_secretstream_xchacha20poly1305_init_push()</strong>
  <info>string</info>  <strong>$ciphertext</strong>       The ciphertext chunk to decrypt.
  <info>string</info>  <strong>$additional_data</strong>  Optional additional data to include in the authentication tag.

<comment>Return:</comment>
  <info>array|false</info>  An array with two values: <info>string</info>; The decrypted chunk <info>int</info>; An optional tag (if
               provided during push). Possible values:
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE</info>: the most common tag, that
               doesn't add any information about the nature of the message.
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL</info>: indicates that the message
               marks the end of the stream, and erases the secret key used to encrypt the previous
               sequence. <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH</info>: indicates that the
               message marks the end of a set of messages, but not the end of the stream. For
               example, a huge JSON string sent as multiple chunks can use this tag to indicate to
               the application that the string is complete and that it can be decoded. But the
               stream itself is not closed, and more data may follow.
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY</info>: "forget" the key used to
               encrypt this message and the previous ones, and derive a new secret key.
               
               <info>string</info>; The decrypted chunk
               
               <info>int</info>; An optional tag (if provided during push). Possible values:
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE</info>: the most common tag, that
               doesn't add any information about the nature of the message.
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL</info>: indicates that the message
               marks the end of the stream, and erases the secret key used to encrypt the previous
               sequence. <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH</info>: indicates that the
               message marks the end of a set of messages, but not the end of the stream. For
               example, a huge JSON string sent as multiple chunks can use this tag to indicate to
               the application that the string is complete and that it can be decoded. But the
               stream itself is not closed, and more data may follow.
               <info>SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY</info>: "forget" the key used to
               encrypt this message and the previous ones, and derive a new secret key.


id: sodium_crypto_secretstream_xchacha20poly1305_push
type: function
doc:
<comment>Description:</comment>
  Encrypt a chunk of data so that it can safely be decrypted in a streaming API
  
  Encrypt a chunk of data so that it can safely be decrypted in a streaming API.

<comment>Param:</comment>
  <info>string</info>  <strong>$state</strong>            See <strong>sodium_crypto_secretstream_xchacha20poly1305_init_pull()</strong> and
                            <strong>sodium_crypto_secretstream_xchacha20poly1305_init_push()</strong>
  <info>string</info>  <strong>$message</strong>          
  <info>string</info>  <strong>$additional_data</strong>  
  <info>int</info>     <strong>$tag</strong>              Optional. Can be used to assert decryption behavior (i.e. re-keying or
                            indicating the final chunk in a stream).

<comment>Return:</comment>
  <info>string</info>  Returns the encrypted ciphertext.


id: sodium_crypto_secretstream_xchacha20poly1305_rekey
type: function
doc:
<comment>Description:</comment>
  Explicitly rotate the key in the secretstream state
  
  Explicitly rotate the key in the secretstream state. Overwrites the value passed in.

<comment>Param:</comment>
  <info>string</info>  <strong>$state</strong>  Secretstream state.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: sodium_crypto_shorthash
type: function
doc:
<comment>Description:</comment>
  Compute a short hash of a message and key
  
  <strong>sodium_crypto_shorthash()</strong> wraps a hash function called SipHash-2-4, which is ideal for
  implementing hash tables that are not susceptible to hash collision denial of service attacks
  (Hash-DoS).
  
  SipHash-2-4 isn't a general purpose cryptographic hash function.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message to hash.
  <info>string</info>  <strong>$key</strong>      The hash key.

<comment>Return:</comment>
  <info>string</info>  


id: sodium_crypto_shorthash_keygen
type: function
doc:
<comment>Description:</comment>
  Get random bytes for key
  
  Generate a key for use with <strong>sodium_crypto_shorthash()</strong>.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Return:</comment>
  <info>string</info>  


id: sodium_crypto_sign
type: function
doc:
<comment>Description:</comment>
  Sign a message
  
  Sign a message with a secret key, that can be verified by the corresponding public key. This
  function attaches the signature to the message. See <strong>sodium_crypto_sign_detached()</strong> for detached
  signatures.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>     Message to sign.
  <info>string</info>  <strong>$secret_key</strong>  Secret key. See <strong>sodium_crypto_sign_secretkey()</strong>

<comment>Return:</comment>
  <info>string</info>  Signed message (not encrypted).


id: sodium_crypto_sign_detached
type: function
doc:
<comment>Description:</comment>
  Sign the message
  
  Sign a message with a secret key, that can be verified by the corresponding public key. This
  function returns a detached signature.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>     Message to sign.
  <info>string</info>  <strong>$secret_key</strong>  Secret key. See <strong>sodium_crypto_sign_secretkey()</strong>

<comment>Return:</comment>
  <info>string</info>  Cryptographic signature.


id: sodium_crypto_sign_ed25519_pk_to_curve25519
type: function
doc:
<comment>Description:</comment>
  Convert an Ed25519 public key to a Curve25519 public key
  
  Given an Ed25519 public key, calculate the birationally equivalent X25519 public key.

<comment>Param:</comment>
  <info>string</info>  <strong>$public_key</strong>  Public key suitable for the crypto_sign functions.

<comment>Return:</comment>
  <info>string</info>  Public key suitable for the crypto_box functions.


id: sodium_crypto_sign_ed25519_sk_to_curve25519
type: function
doc:
<comment>Description:</comment>
  Convert an Ed25519 secret key to a Curve25519 secret key
  
  Given an Ed25519 secret key, calculate the birationally equivalent X25519 secret key.

<comment>Param:</comment>
  <info>string</info>  <strong>$secret_key</strong>  Secret key suitable for the crypto_sign functions.

<comment>Return:</comment>
  <info>string</info>  Secret key suitable for the crypto_box functions.


id: sodium_crypto_sign_keypair
type: function
doc:
<comment>Description:</comment>
  Randomly generate a secret key and a corresponding public key
  
  Generate a random Ed25519 keypair as one string.

<comment>Return:</comment>
  <info>string</info>  Ed25519 keypair.


id: sodium_crypto_sign_keypair_from_secretkey_and_publickey
type: function
doc:
<comment>Description:</comment>
  Join a secret key and public key together
  
  Join a secret key and public key together.

<comment>Param:</comment>
  <info>string</info>  <strong>$secret_key</strong>  Ed25519 secret key
  <info>string</info>  <strong>$public_key</strong>  Ed25519 public key

<comment>Return:</comment>
  <info>string</info>  Keypair


id: sodium_crypto_sign_open
type: function
doc:
<comment>Description:</comment>
  Check that the signed message has a valid signature
  
  Verify the signature attached to a message and return the message

<comment>Param:</comment>
  <info>string</info>  <strong>$signed_message</strong>  A message signed with <strong>sodium_crypto_sign()</strong>
  <info>string</info>  <strong>$public_key</strong>      An Ed25519 public key

<comment>Return:</comment>
  <info>string|false</info>  Returns the original signed message on success,  or <info>false</info> on failure.


id: sodium_crypto_sign_publickey
type: function
doc:
<comment>Description:</comment>
  Extract the Ed25519 public key from a keypair
  
  Extract the Ed25519 public key from a keypair

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  Ed25519 keypair (see: <strong>sodium_crypto_sign_keypair()</strong>)

<comment>Return:</comment>
  <info>string</info>  Ed25519 public key


id: sodium_crypto_sign_publickey_from_secretkey
type: function
doc:
<comment>Description:</comment>
  Extract the Ed25519 public key from the secret key
  
  Extract the Ed25519 public key from the secret key

<comment>Param:</comment>
  <info>string</info>  <strong>$secret_key</strong>  Ed25519 secret key

<comment>Return:</comment>
  <info>string</info>  Ed25519 public key


id: sodium_crypto_sign_secretkey
type: function
doc:
<comment>Description:</comment>
  Extract the Ed25519 secret key from a keypair
  
  Extract the Ed25519 secret key from a keypair

<comment>Param:</comment>
  <info>string</info>  <strong>$key_pair</strong>  Ed25519 keypair (see: <strong>sodium_crypto_sign_keypair()</strong>)

<comment>Return:</comment>
  <info>string</info>  Ed25519 secret key


id: sodium_crypto_sign_seed_keypair
type: function
doc:
<comment>Description:</comment>
  Deterministically derive the key pair from a single key
  
  Clamps the seed to form a secret key, derives the public key, and returns the two as a keypair.
  
  The <return>*_seed_keypair</return> functions are ideal for generating a keypair from a password and salt. Use the
  result as a <strong>$seed</strong> to generate the desired keys.

<comment>Param:</comment>
  <info>string</info>  <strong>$seed</strong>  Some cryptographic input. Must be 32 bytes.

<comment>Return:</comment>
  <info>string</info>  Keypair (secret key and public key)


id: sodium_crypto_sign_verify_detached
type: function
doc:
<comment>Description:</comment>
  Verify signature for the message
  
  Verify signature for the message

<comment>Param:</comment>
  <info>string</info>  <strong>$signature</strong>   The cryptographic signature obtained from <strong>sodium_crypto_sign_detached()</strong>
  <info>string</info>  <strong>$message</strong>     The message being verified
  <info>string</info>  <strong>$public_key</strong>  Ed25519 public key

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: sodium_crypto_stream
type: function
doc:
<comment>Description:</comment>
  Generate a deterministic sequence of bytes from a seed
  
  Generate a deterministic sequence of bytes from a seed, using the XSalsa20 stream cipher.

<comment>Param:</comment>
  <info>int</info>     <strong>$length</strong>  The number of bytes to return.
  <info>string</info>  <strong>$nonce</strong>   A number that must be only used once, per message. 24 bytes long. This is a large
                   enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>     Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  String of pseudorandom bytes.


id: sodium_crypto_stream_keygen
type: function
doc:
<comment>Description:</comment>
  Generate a random sodium_crypto_stream key.
  
  Generate a key for use with <strong>sodium_crypto_stream()</strong> and <strong>sodium_crypto_stream_xor()</strong>.

<comment>Return:</comment>
  <info>string</info>  Encryption key (256-bit).


id: sodium_crypto_stream_xchacha20
type: function
doc:
<comment>Description:</comment>
  Expands the key and nonce into a keystream of pseudorandom bytes
  
  Expands the <strong>$key</strong> and <strong>$nonce</strong> into a keystream of pseudorandom bytes.

<comment>Param:</comment>
  <info>int</info>     <strong>$length</strong>  Number of bytes desired.
  <info>string</info>  <strong>$nonce</strong>   24-byte nonce.
  <info>string</info>  <strong>$key</strong>     Key, possibly generated from <strong>sodium_crypto_stream_xchacha20_keygen()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a pseudorandom stream that can be used with <strong>sodium_crypto_stream_xchacha20_xor()</strong>.


id: sodium_crypto_stream_xchacha20_keygen
type: function
doc:
<comment>Description:</comment>
  Returns a secure random key
  
  Returns a secure random key for use with <strong>sodium_crypto_stream_xchacha20()</strong>.

<comment>Return:</comment>
  <info>string</info>  Returns a 32-byte secure random key for use with <strong>sodium_crypto_stream_xchacha20()</strong>.


id: sodium_crypto_stream_xchacha20_xor
type: function
doc:
<comment>Description:</comment>
  Encrypts a message using a nonce and a secret key (no authentication)
  
  Encrypts a <strong>$message</strong> using a <strong>$nonce</strong> and a secret <strong>$key</strong> (no authentication).
  
  This encryption is unauthenticated, and does not prevent chosen-ciphertext attacks. Make sure to
  combine the ciphertext with a Message Authentication Code, for example with
  <strong>sodium_crypto_aead_xchacha20poly1305_ietf_encrypt()</strong> function, or <strong>sodium_crypto_auth()</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message to encrypt.
  <info>string</info>  <strong>$nonce</strong>    24-byte nonce.
  <info>string</info>  <strong>$key</strong>      Key, possibly generated from <strong>sodium_crypto_stream_xchacha20_keygen()</strong>.

<comment>Return:</comment>
  <info>string</info>  Encrypted message.

<comment>See Also:</comment>
   * <strong>sodium_crypto_stream_xchacha20_xor_ic()</strong>


id: sodium_crypto_stream_xchacha20_xor_ic
type: function
doc:
<comment>Description:</comment>
  Encrypts a message using a nonce and a secret key (no authentication)
  
  The function is similar to <strong>sodium_crypto_stream_xchacha20_xor()</strong> but adds the ability to set the
  initial value of the block counter to a non-zero value. This permits direct access to any block
  without having to compute the previous ones.
  
  This encryption is unauthenticated, and does not prevent chosen-ciphertext attacks. Make sure to
  combine the ciphertext with a Message Authentication Code, for example with
  <strong>sodium_crypto_aead_xchacha20poly1305_ietf_encrypt()</strong> function, or <strong>sodium_crypto_auth()</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message to encrypt.
  <info>string</info>  <strong>$nonce</strong>    24-byte nonce.
  <info>int</info>     <strong>$counter</strong>  The initial value of the block counter.
  <info>string</info>  <strong>$key</strong>      Key, possibly generated from <strong>sodium_crypto_stream_xchacha20_keygen()</strong>.

<comment>Return:</comment>
  <info>string</info>  Encrypted message,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sodium_crypto_stream_xchacha20_xor()</strong>


id: sodium_crypto_stream_xor
type: function
doc:
<comment>Description:</comment>
  Encrypt a message without authentication
  
  This function encrypts a message with XSalsa20, but does not provide any ciphertext guarantees
  about the plaintext.

<comment>Param:</comment>
  <info>string</info>  <strong>$message</strong>  The message to encrypt
  <info>string</info>  <strong>$nonce</strong>    A number that must be only used once, per message. 24 bytes long. This is a
                    large enough bound to generate randomly (i.e. <strong>random_bytes()</strong>).
  <info>string</info>  <strong>$key</strong>      Encryption key (256-bit).

<comment>Return:</comment>
  <info>string</info>  Encrypted message.


id: sodium_hex2bin
type: function
doc:
<comment>Description:</comment>
  Decodes a hexadecimally encoded binary string
  
  Decodes a hexadecimally encoded binary string.
  
  Like <strong>sodium_bin2hex()</strong>, <strong>sodium_hex2bin()</strong> is resistant to side-channel attacks while <strong>hex2bin()</strong> is
  not.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  Hexadecimal representation of data.
  <info>string</info>  <strong>$ignore</strong>  Optional string argument for characters to ignore.

<comment>Return:</comment>
  <info>string</info>  Returns the binary representation of the given <strong>$string</strong> data.


id: sodium_increment
type: function
doc:
<comment>Description:</comment>
  Increment large number
  
  Treat the string as a little-endian unsigned integer, then increase it by 1. Constant-time.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  String to increment.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: sodium_memcmp
type: function
doc:
<comment>Description:</comment>
  Test for equality in constant-time
  
  Compare two strings in constant-time.
  
  In practice, you almost always want to use <strong>hash_equals()</strong> instead, since it provides the same logic
  but returns a <info>bool</info> instead of an <info>int</info>. However, if you're using the return value of a comparison in
  a calculation that's timing-sensitive, and worried about timing leaks with bool-to-int
  conversions, <strong>sodium_memcmp()</strong> is an ideal replacement.

<comment>Param:</comment>
  <info>string</info>  <strong>$string1</strong>  String to compare
  <info>string</info>  <strong>$string2</strong>  Other string to compare

<comment>Return:</comment>
  <info>int</info>  Returns <return>0</return> if both strings are equal; <return>-1</return> otherwise.


id: sodium_memzero
type: function
doc:
<comment>Description:</comment>
  Overwrite a string with NUL characters
  
  <strong>sodium_memzero()</strong> zeroes out the string that is passed by reference.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  String.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: sodium_pad
type: function
doc:
<comment>Description:</comment>
  Add padding data
  
  Right-pad a string to a desired length. Timing-safe.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>      Unpadded string.
  <info>int</info>     <strong>$block_size</strong>  The string will be padded until it is an even multiple of the block size.

<comment>Return:</comment>
  <info>string</info>  Padded string.


id: sodium_unpad
type: function
doc:
<comment>Description:</comment>
  Remove padding data
  
  Unpad a padded string. Timing-safe.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>      Padded string.
  <info>int</info>     <strong>$block_size</strong>  The block size for padding.

<comment>Return:</comment>
  <info>string</info>  Unpadded string.


id: solr_get_version
type: function
doc:
<comment>Description:</comment>
  Returns the current version of the Apache Solr extension
  
  This function returns the current version of the extension as a string.

<comment>Return:</comment>
  <info>string</info>  It returns a string on success and <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>SolrUtils::getSolrVersion()</strong>


id: sort
type: function
doc:
<comment>Description:</comment>
  Sort an array in ascending order
  
  Sorts <strong>$array</strong> in place by values in ascending order.
  
  If two members compare as equal, they retain their original order. Prior to PHP 8.0.0, their
  relative order in the sorted array was undefined.
  
  This function
  assigns new keys to the elements in <strong>$array</strong>.
  It will remove any existing keys that may have been assigned, rather
  than just reordering the keys.
  
  Resets array's internal pointer to the first element.

<comment>Param:</comment>
  <info>array</info>  <strong>$array</strong>  The input array.
  <info>int</info>    <strong>$flags</strong>  The optional second parameter <strong>$flags</strong> may be used to modify the sorting behavior
                 using these values:
                 
                 Sorting type flags: <info>SORT_REGULAR</info> - compare items normally; the details are
                 described in the comparison operators section<info>SORT_NUMERIC</info> - compare items
                 numerically<info>SORT_STRING</info> - compare items as strings<info>SORT_LOCALE_STRING</info> - compare items
                 as strings, based on the current locale. It uses the locale, which can be changed
                 using <strong>setlocale()</strong> <info>SORT_NATURAL</info> - compare items as strings using "natural ordering"
                 like <strong>natsort()</strong> <info>SORT_FLAG_CASE</info> - can be combined (bitwise OR) with <info>SORT_STRING</info> or
                 <info>SORT_NATURAL</info> to sort strings case-insensitively
                 
                 <info>SORT_REGULAR</info> - compare items normally; the details are described in the comparison
                 operators section
                 
                 <info>SORT_NUMERIC</info> - compare items numerically
                 
                 <info>SORT_STRING</info> - compare items as strings
                 
                 <info>SORT_LOCALE_STRING</info> - compare items as strings, based on the current locale. It uses
                 the locale, which can be changed using <strong>setlocale()</strong>
                 
                 <info>SORT_NATURAL</info> - compare items as strings using "natural ordering" like <strong>natsort()</strong>
                 
                 <info>SORT_FLAG_CASE</info> - can be combined (bitwise OR) with <info>SORT_STRING</info> or <info>SORT_NATURAL</info> to
                 sort strings case-insensitively

<comment>Return:</comment>
  <info>true</info>  Always returns <info>true</info>.

<comment>See Also:</comment>
   * <strong>rsort()</strong>
   * The comparison of array sorting functions


id: soundex
type: function
doc:
<comment>Description:</comment>
  Calculate the soundex key of a string
  
  Calculates the soundex key of <strong>$string</strong>.
  
  Soundex keys have the property that words pronounced similarly produce the same soundex key, and
  can thus be used to simplify searches in databases where you know the pronunciation but not the
  spelling.
  
  This particular soundex function is one described by Donald Knuth in "The Art Of Computer
  Programming, vol. 3: Sorting And Searching", Addison-Wesley (1973), pp. 391-392.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  The input string.

<comment>Return:</comment>
  <info>string</info>  Returns the soundex key as a <info>string</info> with four characters. If at least one letter is
          contained in <strong>$string</strong>, the returned string starts with a letter. Otherwise <return>"0000"</return> is
          returned.

<comment>See Also:</comment>
   * <strong>levenshtein()</strong>
   * <strong>metaphone()</strong>
   * <strong>similar_text()</strong>


id: spl_autoload
type: function
doc:
<comment>Description:</comment>
  Default implementation for __autoload()
  
  This function is intended to be used as a default implementation for <strong>__autoload()</strong>. If nothing else
  is specified and <strong>spl_autoload_register()</strong> is called without any parameters then this function will
  be used for any later call to <strong>__autoload()</strong>.

<comment>Param:</comment>
  <info>string</info>       <strong>$class</strong>            The name of the class (and namespace) being instantiated.
  <info>string|null</info>  <strong>$file_extensions</strong>  By default it checks all include paths to contain filenames built
                                 up by the lowercase class name appended by the filename extensions
                                 .inc and .php.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: spl_autoload_call
type: function
doc:
<comment>Description:</comment>
  Try all registered __autoload() functions to load the requested class
  
  This function can be used to manually search for a class or interface using the registered
  __autoload functions.

<comment>Param:</comment>
  <info>string</info>  <strong>$class</strong>  The class name being searched.

<comment>Return:</comment>
  <info>void</info>  No value is returned.


id: spl_autoload_extensions
type: function
doc:
<comment>Description:</comment>
  Register and return default file extensions for spl_autoload
  
  This function can modify and check the file extensions that the built in <strong>__autoload()</strong> fallback
  function <strong>spl_autoload()</strong>  will be using.
  
  There should not be a space between the defined file extensions.

<comment>Param:</comment>
  <info>string|null</info>  <strong>$file_extensions</strong>  If <info>null</info>, it simply returns the current list of extensions each
                                 separated by comma. To modify the list of file extensions, simply
                                 invoke the functions with the new list of file extensions to use in
                                 a single string with each extensions separated by comma.

<comment>Return:</comment>
  <info>string</info>  A comma delimited list of default file extensions for <strong>spl_autoload()</strong>.


id: spl_autoload_functions
type: function
doc:
<comment>Description:</comment>
  Return all registered __autoload() functions
  
  Get all registered __autoload() functions.

<comment>Return:</comment>
  <info>array</info>  An <info>array</info> of all registered __autoload functions. If no function is registered, or the
         autoload queue is not activated, then the return value will be an empty array.


id: spl_autoload_register
type: function
doc:
<comment>Description:</comment>
  Register given function as __autoload() implementation
  
  Register a function with the spl provided __autoload queue. If the queue is not yet activated it
  will be activated.
  
  If your code has an existing <strong>__autoload()</strong> function then this function must be explicitly
  registered on the __autoload queue. This is because <strong>spl_autoload_register()</strong> will effectively
  replace the engine cache for the <strong>__autoload()</strong> function by either <strong>spl_autoload()</strong> or
  <strong>spl_autoload_call()</strong>.
  
  If there must be multiple autoload functions, <strong>spl_autoload_register()</strong>  allows for this. It
  effectively creates a queue of autoload functions, and runs through each of them in the order they
  are defined. By contrast,  <strong>__autoload()</strong> may only be defined once.

<comment>Param:</comment>
  <info>callable|null</info>  <strong>$callback</strong>  The autoload function being registered. If <info>null</info>, then the default
                            implementation of <strong>spl_autoload()</strong> will be registered.
                            
                            The <strong>$class</strong> will not contain the leading backslash of a fully-qualified
                            identifier.
  <info>bool</info>           <strong>$throw</strong>     This parameter specifies whether <strong>spl_autoload_register()</strong> should throw
                            exceptions when the <strong>$callback</strong> cannot be registered.
                            
                            This parameter is ignored as of PHP 8.0.0, and a notice will be emitted
                            if set to <info>false</info>. <strong>spl_autoload_register()</strong> will now always throw a
                            <class>TypeError</class> on invalid arguments.
  <info>bool</info>           <strong>$prepend</strong>   If true, <strong>spl_autoload_register()</strong> will prepend the autoloader on the
                            autoload queue instead of appending it.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>__autoload()</strong>


id: spl_autoload_unregister
type: function
doc:
<comment>Description:</comment>
  Unregister given function as __autoload() implementation
  
  Removes a function from the autoload queue. If the queue is activated and empty after removing the
  given function then it will be deactivated.
  
  When this function results in the queue being deactivated, any __autoload function that previously
  existed will not be reactivated.

<comment>Param:</comment>
  <info>callable</info>  <strong>$callback</strong>  The autoload function being unregistered.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: spl_classes
type: function
doc:
<comment>Description:</comment>
  Return available SPL classes
  
  This function returns an array with the current available SPL classes.

<comment>Return:</comment>
  <info>array</info>  Returns an <info>array</info> containing the currently available SPL classes.


id: spl_object_hash
type: function
doc:
<comment>Description:</comment>
  Return hash id for given object
    
  
  This function returns a unique identifier for the object. This id can be used as a hash key for
  storing objects, or for identifying an object, as long as the object is not destroyed. Once the
  object is destroyed, its hash may  be reused for other objects. This behavior is similar to
  <strong>spl_object_id()</strong>.

<comment>Param:</comment>
  <info>object</info>  <strong>$object</strong>  Any object.

<comment>Return:</comment>
  <info>string</info>  A string that is unique for each currently existing object and is always the same for each
          object.

<comment>See Also:</comment>
   * <strong>spl_object_id()</strong>


id: spl_object_id
type: function
doc:
<comment>Description:</comment>
  Return the integer object handle for given object
    
  
  This function returns a unique identifier for the object. The object id is unique for the lifetime
  of the object. Once the object is destroyed, its id may be reused for other objects. This behavior
  is similar to <strong>spl_object_hash()</strong>.

<comment>Param:</comment>
  <info>object</info>  <strong>$object</strong>  Any object.

<comment>Return:</comment>
  <info>int</info>  An integer identifier that is unique for each currently existing object and is always the
       same for each object.


id: sprintf
type: function
doc:
<comment>Description:</comment>
  Return a formatted string
  
  Returns a string produced according to the formatting string <strong>$format</strong>.

<comment>Param:</comment>
  <info>string</info>  <strong>$format</strong>  The format string is composed of zero or more directives: ordinary characters
                   (excluding <return>%</return>) that are copied directly to the result and conversion
                   specifications, each of which results in fetching its own parameter.
                   
                   A conversion specification follows this prototype:
                   <return>%[argnum$][flags][width][.precision]specifier</return>.
                   
                   An integer followed by a dollar sign <return>$</return>, to specify which number argument to treat
                   in the conversion.
                   
                   FlagsFlagDescription<return>-</return> Left-justify within the given field width; Right
                   justification is the default <return>+</return> Prefix positive numbers with a plus sign <return>+</return>;
                   Default only negative are prefixed with a negative sign. <return> </return>(space) Pads the result
                   with spaces. This is the default. <return>0</return> Only left-pads numbers with zeros. With <return>s</return>
                   specifiers this can also right-pad with zeros. <return>'</return>(char) Pads the result with the
                   character (char).
                   
                   Either an integer that says how many characters (minimum) this conversion should
                   result in, or <return>*</return>. If <return>*</return> is used, then the width is supplied as an additional
                   integer value preceding the one formatted by the specifier.
                   
                   A period <return>.</return> optionally followed by either an integer or <return>*</return>, whose meaning depends
                   on the specifier:  For <return>e</return>, <return>E</return>, <return>f</return> and <return>F</return> specifiers: this is the number of digits to
                   be printed after the decimal point (by default, this is 6).  For <return>g</return>, <return>G</return>, <return>h</return> and <return>H</return>
                   specifiers: this is the maximum number of significant digits to be printed.  For
                   <return>s</return> specifier: it acts as a cutoff point, setting a maximum character limit to the
                   string.   If the period is specified without an explicit value for precision, 0
                   is assumed. If <return>*</return> is used, the precision is supplied as an additional integer
                   value preceding the one formatted by the specifier.
                   
                   For <return>e</return>, <return>E</return>, <return>f</return> and <return>F</return> specifiers: this is the number of digits to be printed after
                   the decimal point (by default, this is 6).
                   
                   For <return>g</return>, <return>G</return>, <return>h</return> and <return>H</return> specifiers: this is the maximum number of significant digits to
                   be printed.
                   
                   For <return>s</return> specifier: it acts as a cutoff point, setting a maximum character limit to
                   the string.
                   
                   If the period is specified without an explicit value for precision, 0 is assumed.
                   If <return>*</return> is used, the precision is supplied as an additional integer value preceding
                   the one formatted by the specifier.
                   
                   SpecifiersSpecifierDescription<return>%</return> A literal percent character. No argument is
                   required. <return>b</return> The argument is treated as an integer and presented as a binary
                   number. <return>c</return> The argument is treated as an integer and presented as the character
                   with that ASCII. <return>d</return> The argument is treated as an integer and presented as a
                   (signed) decimal number. <return>e</return> The argument is treated as scientific notation (e.g.
                   1.2e+2). <return>E</return> Like the <return>e</return> specifier but uses uppercase letter (e.g. 1.2E+2). <return>f</return> The
                   argument is treated as a float and presented as a floating-point number (locale
                   aware). <return>F</return> The argument is treated as a float and presented as a floating-point
                   number (non-locale aware). <return>g</return> General format.  Let P equal the precision if
                   nonzero, 6 if the precision is omitted, or 1 if the precision is zero. Then, if a
                   conversion with style E would have an exponent of X:  If P &gt; X ≥ −4, the
                   conversion is with style f and precision P − (X + 1). Otherwise, the conversion
                   is with style e and precision P − 1. <return>G</return> Like the <return>g</return> specifier but uses <return>E</return> and <return>f</return>. <return>h</return>
                   Like the <return>g</return> specifier but uses <return>F</return>. Available as of PHP 8.0.0. <return>H</return> Like the <return>g</return>
                   specifier but uses <return>E</return> and <return>F</return>. Available as of PHP 8.0.0. <return>o</return> The argument is treated
                   as an integer and presented as an octal number. <return>s</return> The argument is treated and
                   presented as a string. <return>u</return> The argument is treated as an integer and presented as
                   an unsigned decimal number. <return>x</return> The argument is treated as an integer and presented
                   as a hexadecimal number (with lowercase letters). <return>X</return> The argument is treated as an
                   integer and presented as a hexadecimal number (with uppercase letters).
                   
                   General format.
                   
                   Let P equal the precision if nonzero, 6 if the precision is omitted, or 1 if the
                   precision is zero. Then, if a conversion with style E would have an exponent of
                   X:
                   
                   If P &gt; X ≥ −4, the conversion is with style f and precision P − (X + 1).
                   Otherwise, the conversion is with style e and precision P − 1.
                   
                   The <return>c</return> type specifier ignores padding and width
                   
                   Attempting to use a combination of the string and width specifiers with character
                   sets that require more than one byte per character may result in unexpected
                   results
                   
                   Variables will be co-erced to a suitable type for the specifier: Type
                   HandlingTypeSpecifiers<info>string</info><return>s</return><info>int</info><return>d</return>, <return>u</return>, <return>c</return>, <return>o</return>, <return>x</return>, <return>X</return>, <return>b</return><info>float</info><return>e</return>, <return>E</return>, <return>f</return>, <return>F</return>, <return>g</return>, <return>G</return>, <return>h</return>, <return>H</return>
  <info>mixed</info>   <strong>$values</strong>  

<comment>Return:</comment>
  <info>string</info>  Returns a string produced according to the formatting string <strong>$format</strong>.

<comment>See Also:</comment>
   * <strong>printf()</strong>
   * <strong>fprintf()</strong>
   * <strong>vprintf()</strong>
   * <strong>vsprintf()</strong>
   * <strong>vfprintf()</strong>
   * <strong>sscanf()</strong>
   * <strong>fscanf()</strong>
   * <strong>number_format()</strong>
   * <strong>date()</strong>


id: sqlsrv_begin_transaction
type: function
doc:
<comment>Description:</comment>
  Begins a database transaction
  
  The transaction begun by <strong>sqlsrv_begin_transaction()</strong> includes  all statements that were executed
  after the call to  <strong>sqlsrv_begin_transaction()</strong> and before calls to  <strong>sqlsrv_rollback()</strong> or
  <strong>sqlsrv_commit()</strong>.  Explicit transactions should be started and committed or rolled back using
  these functions instead of executing SQL statements that begin and commit/roll  back transactions.
  For more information, see  SQLSRV Transactions.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection resource returned by a call to <strong>sqlsrv_connect()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_commit()</strong>
   * <strong>sqlsrv_rollback()</strong>


id: sqlsrv_cancel
type: function
doc:
<comment>Description:</comment>
  Cancels a statement
  
  Cancels a statement. Any results associated with the statement that have not  been consumed are
  deleted. After <strong>sqlsrv_cancel()</strong> has been  called, the specified statement can be re-executed if it
  was created with  <strong>sqlsrv_prepare()</strong>. Calling <strong>sqlsrv_cancel()</strong>  is not necessary if all the results
  associated with the statement have been  consumed.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement resource to be cancelled.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_free_stmt()</strong>
   * <strong>sqlsrv_prepare()</strong>


id: sqlsrv_client_info
type: function
doc:
<comment>Description:</comment>
  Returns information about the client and specified connection
  
  Returns information about the client and specified connection

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection about which information is returned.

<comment>Return:</comment>
  <info>array</info>  Returns an associative array with keys described in the table below.  Returns <info>false</info>
         otherwise.  Array returned by
         sqlsrv_client_infoKeyDescriptionDriverDllNameSQLNCLI10.DLLDriverODBCVerODBC version
         (xx.yy)DriverVerSQL Server Native Client DLL version (10.5.xxx)ExtensionVerphp_sqlsrv.dll
         version (2.0.xxx.x)

<comment>See Also:</comment>
   * <strong>sqlsrv_server_info()</strong>


id: sqlsrv_close
type: function
doc:
<comment>Description:</comment>
  Closes an open connection and releases resourses associated with the connection
  
  Closes an open connection and releases resourses associated with the connection.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection to be closed.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_connect()</strong>


id: sqlsrv_commit
type: function
doc:
<comment>Description:</comment>
  Commits a transaction that was begun with sqlsrv_begin_transaction
  
  Commits a transaction that was begun with <strong>sqlsrv_begin_transaction()</strong>.  The connection is returned
  to auto-commit mode after <strong>sqlsrv_commit()</strong>  is called. The transaction that is committed includes
  all statements that were  executed after the call to <strong>sqlsrv_begin_transaction()</strong>.  Explicit
  transactions should be started and committed or rolled back using these  functions instead of
  executing SQL statements that begin and commit/roll back  transactions. For more information, see
  SQLSRV Transactions.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection on which the transaction is to be committed.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_begin_transaction()</strong>
   * <strong>sqlsrv_rollback()</strong>


id: sqlsrv_configure
type: function
doc:
<comment>Description:</comment>
  Changes the driver error handling and logging configurations
  
  Changes the driver error handling and logging configurations.

<comment>Param:</comment>
  <info>string</info>  <strong>$setting</strong>  The name of the setting to set. The possible values are
                    "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".
  <info>mixed</info>   <strong>$value</strong>    The value of the specified setting. The following table shows possible values:
                    Error and Logging Setting OptionsSettingOptionsWarningsReturnAsErrors1 (<info>true</info>) or
                    0 (<info>false</info>)LogSubsystemsSQLSRV_LOG_SYSTEM_ALL (-1)  SQLSRV_LOG_SYSTEM_CONN (2)
                    SQLSRV_LOG_SYSTEM_INIT (1)  SQLSRV_LOG_SYSTEM_OFF (0)  SQLSRV_LOG_SYSTEM_STMT
                    (4)  SQLSRV_LOG_SYSTEM_UTIL (8)LogSeveritySQLSRV_LOG_SEVERITY_ALL (-1)
                    SQLSRV_LOG_SEVERITY_ERROR (1)  SQLSRV_LOG_SEVERITY_NOTICE (4)
                    SQLSRV_LOG_SEVERITY_WARNING (2)

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * SQLSRV Error Handling.
   * Logging SQLSRV Activity.


id: sqlsrv_connect
type: function
doc:
<comment>Description:</comment>
  Opens a connection to a Microsoft SQL Server database
  
  Opens a connection to a Microsoft SQL Server database. By default, the connection  is attempted
  using Windows Authentication. To connect using SQL Server  Authentication, include "UID" and "PWD"
  in the connection options array.

<comment>Param:</comment>
  <info>string</info>  <strong>$serverName</strong>      The name of the server to which a connection is established. To connect
                           to a specific instance, follow the server name with a backward slash  and
                           the instance name (e.g. serverName\sqlexpress).
  <info>array</info>   <strong>$connectionInfo</strong>  An associative array that specifies options for connecting to the server.
                           If values for the UID and PWD keys are not specified, the connection
                           will be attempted using Windows Authentication. For a complete list of
                           supported  keys, see SQLSRV Connection Options.

<comment>Return:</comment>
  <info>resource</info>  A connection resource. If a connection cannot be successfully opened, <info>false</info> is returned.

<comment>See Also:</comment>
   * <strong>sqlsrv_close()</strong>
   * <strong>sqlsrv_errors()</strong>
   * <strong>sqlsrv_query()</strong>


id: sqlsrv_errors
type: function
doc:
<comment>Description:</comment>
  Returns error and warning information about the last SQLSRV operation performed
  
  Returns error and warning information about the last SQLSRV operation performed.

<comment>Param:</comment>
  <info>int</info>  <strong>$errorsOrWarnings</strong>  Determines whether error information, warning information, or both are
                          returned. If this parameter is not supplied, both error information and
                          warning information are returned. The following are the supported values
                          for this parameter: SQLSRV_ERR_ALL, SQLSRV_ERR_ERRORS,
                          SQLSRV_ERR_WARNINGS.

<comment>Return:</comment>
  <info>mixed</info>  If errors and/or warnings occurred on the last sqlsrv operation, an array of  arrays
         containing error information is returned. If no errors and/or warnings  occurred on the
         last sqlsrv operation, <info>null</info> is returned. The following table  describes the structure of
         the returned arrays: Array returned by sqlsrv_errorsKeyDescriptionSQLSTATEFor errors that
         originate from the ODBC driver, the SQLSTATE returned  by ODBC. For errors that originate
         from the Microsoft Drivers for PHP for  SQL Server, a SQLSTATE of IMSSP. For warnings that
         originate from the  Microsoft Drivers for PHP for SQL Server, a SQLSTATE of 01SSP. codeFor
         errors that originate from SQL Server, the native SQL Server  error code. For errors that
         originate from the ODBC driver, the error  code returned by ODBC. For errors that originate
         from the Microsoft Drivers  for PHP for SQL Server, the Microsoft Drivers for PHP for SQL
         Server error code. messageA description of the error.

<comment>See Also:</comment>
   * <strong>sqlsrv_configure()</strong>


id: sqlsrv_execute
type: function
doc:
<comment>Description:</comment>
  Executes a statement prepared with sqlsrv_prepare
  
  Executes a statement prepared with <strong>sqlsrv_prepare()</strong>. This  function is ideal for executing a
  prepared statement multiple times with  different parameter values.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  A statement resource returned by <strong>sqlsrv_prepare()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_prepare()</strong>
   * <strong>sqlsrv_query()</strong>


id: sqlsrv_fetch
type: function
doc:
<comment>Description:</comment>
  Makes the next row in a result set available for reading
  
  Makes the next row in a result set available for reading. Use  <strong>sqlsrv_get_field()</strong> to read the
  fields of the row.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>    A statement resource created by executing <strong>sqlsrv_query()</strong>  or <strong>sqlsrv_execute()</strong>.
  <info>int</info>       <strong>$row</strong>     The row to be accessed. This parameter can only be used if the specified
                     statement was prepared with a scrollable cursor. In that case, this parameter
                     can take on one of the following values:
                     SQLSRV_SCROLL_NEXTSQLSRV_SCROLL_PRIORSQLSRV_SCROLL_FIRSTSQLSRV_SCROLL_LASTSQLSRV_SCROLL_ABSOLUTESQLSRV_SCROLL_RELATIVE
  <info>int</info>       <strong>$offset</strong>  Specifies the row to be accessed if the row parameter is set to
                     <info>SQLSRV_SCROLL_ABSOLUTE</info> or <info>SQLSRV_SCROLL_RELATIVE</info>. Note that the first row in a
                     result set has index 0.

<comment>Return:</comment>
  <info>mixed</info>  Returns <info>true</info> if the next row of a result set was successfully retrieved,  <info>false</info> if an error
         occurs, and <info>null</info> if there are no more rows in the result set.

<comment>See Also:</comment>
   * <strong>sqlsrv_get_field()</strong>
   * <strong>sqlsrv_fetch_array()</strong>
   * <strong>sqlsrv_fetch_object()</strong>


id: sqlsrv_fetch_array
type: function
doc:
<comment>Description:</comment>
  Returns a row as an array
  
  Returns the next available row of data as an associative array, a numeric  array, or both (the
  default).

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>       A statement resource returned by sqlsrv_query or sqlsrv_prepare.
  <info>int</info>       <strong>$fetchType</strong>  A predefined constant specifying the type of array to return. Possible
                        values are <info>SQLSRV_FETCH_ASSOC</info>,  <info>SQLSRV_FETCH_NUMERIC</info>, and  <info>SQLSRV_FETCH_BOTH</info>
                        (the default).
                        
                        A fetch type of SQLSRV_FETCH_ASSOC should not be used when consuming a
                        result set with multiple columns of the same name.
  <info>int</info>       <strong>$row</strong>        Specifies the row to access in a result set that uses a scrollable cursor.
                        Possible values are <info>SQLSRV_SCROLL_NEXT</info>,  <info>SQLSRV_SCROLL_PRIOR</info>,
                        <info>SQLSRV_SCROLL_FIRST</info>,  <info>SQLSRV_SCROLL_LAST</info>, <info>SQLSRV_SCROLL_ABSOLUTE</info> and,
                        <info>SQLSRV_SCROLL_RELATIVE</info> (the default). When this parameter  is specified, the
                        <strong>$fetchType</strong> must be explicitly defined.
  <info>int</info>       <strong>$offset</strong>     Specifies the row to be accessed if the row parameter is set to
                        <info>SQLSRV_SCROLL_ABSOLUTE</info> or <info>SQLSRV_SCROLL_RELATIVE</info>. Note that the first row in
                        a result set has index 0.

<comment>Return:</comment>
  <info>array</info>  Returns an array on success, <info>null</info> if there are no more rows to return, and  <info>false</info> if an
         error occurs.

<comment>See Also:</comment>
   * <strong>sqlsrv_connect()</strong>
   * <strong>sqlsrv_query()</strong>
   * <strong>sqlsrv_errors()</strong>
   * <strong>sqlsrv_fetch()</strong>


id: sqlsrv_fetch_object
type: function
doc:
<comment>Description:</comment>
  Retrieves the next row of data in a result set as an object
  
  Retrieves the next row of data in a result set as an instance of the specified  class with
  properties that match the row field names and values that correspond  to the row field values.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>        A statement resource created by <strong>sqlsrv_query()</strong> or  <strong>sqlsrv_execute()</strong>.
  <info>string</info>    <strong>$className</strong>   The name of the class to instantiate. If no class name is specified,
                         stdClass is instantiated.
  <info>array</info>     <strong>$ctorParams</strong>  Values passed to the constructor of the specified class. If the constructor
                         of the specified class takes parameters, the ctorParams array must be
                         supplied.
  <info>int</info>       <strong>$row</strong>         The row to be accessed. This parameter can only be used if the specified
                         statement was prepared with a scrollable cursor. In that case, this
                         parameter  can take on one of the following values:
                         SQLSRV_SCROLL_NEXTSQLSRV_SCROLL_PRIORSQLSRV_SCROLL_FIRSTSQLSRV_SCROLL_LASTSQLSRV_SCROLL_ABSOLUTESQLSRV_SCROLL_RELATIVE
  <info>int</info>       <strong>$offset</strong>      Specifies the row to be accessed if the row parameter is set to
                         <info>SQLSRV_SCROLL_ABSOLUTE</info> or <info>SQLSRV_SCROLL_RELATIVE</info>. Note that the first row
                         in a result set has index 0.

<comment>Return:</comment>
  <info>mixed</info>  Returns an object on success, <info>null</info> if there are no more rows to return,  and <info>false</info> if an
         error occurs or if the specified class does not exist.

<comment>See Also:</comment>
   * <strong>sqlsrv_fetch()</strong>
   * <strong>sqlsrv_fetch_array()</strong>


id: sqlsrv_field_metadata
type: function
doc:
<comment>Description:</comment>
  Retrieves metadata for the fields of a statement prepared by 
    sqlsrv_prepare or sqlsrv_query
    
  
  Retrieves metadata for the fields of a statement prepared by  <strong>sqlsrv_prepare()</strong> or <strong>sqlsrv_query()</strong>.
  <strong>sqlsrv_field_metadata()</strong> can be called on a statement before  or after statement execution.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement resource for which metadata is returned.

<comment>Return:</comment>
  <info>mixed</info>  Returns an array of arrays on success. Otherwise, <info>false</info> is returned.  Each returned array
         is described by the following table: Array returned by
         sqlsrv_field_metadataKeyDescriptionNameThe name of the field.TypeThe numeric value for the
         SQL type.SizeThe number of characters for fields of character type, the number of  bytes
         for fields of binary type, or <info>null</info> for other types.PrecisionThe precision for types of
         variable precision, <info>null</info> for other types.ScaleThe scale for types of variable scale, <info>null</info>
         for other types.NullableAn enumeration indicating whether the column is nullable, not
         nullable,  or if it is not known. For more information, see sqlsrv_field_metadata  in the
         Microsoft SQLSRV documentation.

<comment>See Also:</comment>
   * <strong>sqlsrv_client_info()</strong>


id: sqlsrv_free_stmt
type: function
doc:
<comment>Description:</comment>
  Frees all resources for the specified statement
  
  Frees all resources for the specified statement. The statement cannot be used  after
  <strong>sqlsrv_free_stmt()</strong> has been called on it. If  <strong>sqlsrv_free_stmt()</strong> is called on an in-progress
  statement  that alters server state, statement execution is terminated and the statement  is
  rolled back.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement for which resources are freed.  Note that <info>null</info> is a valid parameter
                   value. This allows the function to be  called multiple times in a script.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_cancel()</strong>


id: sqlsrv_get_config
type: function
doc:
<comment>Description:</comment>
  Returns the value of the specified configuration setting
  
  Returns the value of the specified configuration setting.

<comment>Param:</comment>
  <info>string</info>  <strong>$setting</strong>  The name of the setting for which the value is returned. For a list of
                    configurable settings, see <strong>sqlsrv_configure()</strong>.

<comment>Return:</comment>
  <info>mixed</info>  Returns the value of the specified setting. If an invalid setting is specified,  <info>false</info> is
         returned.

<comment>See Also:</comment>
   * <strong>sqlsrv_configure()</strong>


id: sqlsrv_get_field
type: function
doc:
<comment>Description:</comment>
  Gets field data from the currently selected row
  
  Gets field data from the currently selected row. Fields must be accessed in  order. Field indices
  start at 0.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>        A statement resource returned by <strong>sqlsrv_query()</strong> or  <strong>sqlsrv_execute()</strong>.
  <info>int</info>       <strong>$fieldIndex</strong>  The index of the field to be retrieved. Field indices start at 0. Fields
                         must be accessed in order. i.e. If you access field index 1, then field
                         index 0 will not be available.
  <info>int</info>       <strong>$getAsType</strong>   The PHP data type for the returned field data. If this parameter is not
                         set, the field data will be returned as its default PHP data type. For
                         information about default PHP data types, see  Default PHP Data Types  in
                         the Microsoft SQLSRV documentation.

<comment>Return:</comment>
  <info>mixed</info>  Returns data from the specified field on success. Returns <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>sqlsrv_fetch()</strong>
   * <strong>sqlsrv_fetch_array()</strong>
   * <strong>sqlsrv_fetch_object()</strong>


id: sqlsrv_has_rows
type: function
doc:
<comment>Description:</comment>
  Indicates whether the specified statement has rows
  
  Indicates whether the specified statement has rows.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  A statement resource returned by <strong>sqlsrv_query()</strong> or  <strong>sqlsrv_execute()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if the specified statement has rows and <info>false</info> if the statement  does not have
        rows or if an error occurred.

<comment>See Also:</comment>
   * <strong>sqlsrv_num_rows()</strong>
   * <strong>sqlsrv_query()</strong>


id: sqlsrv_next_result
type: function
doc:
<comment>Description:</comment>
  Makes the next result of the specified statement active
  
  Makes the next result of the specified statement active. Results include result  sets, row counts,
  and output parameters.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement on which the next result is being called.

<comment>Return:</comment>
  <info>mixed</info>  Returns <info>true</info> if the next result was successfully retrieved, <info>false</info> if an error  occurred,
         and <info>null</info> if there are no more results to retrieve.

<comment>See Also:</comment>
   * <strong>sqlsrv_query()</strong>
   * <strong>sqlsrv_fetch_array()</strong>
   * <strong>sqlsrv_rows_affected()</strong>


id: sqlsrv_num_fields
type: function
doc:
<comment>Description:</comment>
  Retrieves the number of fields (columns) on a statement
  
  Retrieves the number of fields (columns) on a statement.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement for which the number of fields is returned.  <strong>sqlsrv_num_fields()</strong>
                   can be called on a statement before  or after statement execution.

<comment>Return:</comment>
  <info>mixed</info>  Returns the number of fields on success. Returns <info>false</info> otherwise.

<comment>See Also:</comment>
   * <strong>sqlsrv_field_metadata()</strong>
   * <strong>sqlsrv_fetch()</strong>
   * <strong>sqlsrv_get_field()</strong>


id: sqlsrv_num_rows
type: function
doc:
<comment>Description:</comment>
  Retrieves the number of rows in a result set
  
  Retrieves the number of rows in a result set. This function requires that the  statement resource
  be created with a static or keyset cursor. For more information,  see <strong>sqlsrv_query()</strong>,
  <strong>sqlsrv_prepare()</strong>,  or Specifying a Cursor Type and Selecting Rows  in the Microsoft SQLSRV
  documentation.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The statement for which the row count is returned. The statement resource  must
                   be created with a static or keyset cursor. For more information, see
                   <strong>sqlsrv_query()</strong>, <strong>sqlsrv_prepare()</strong>, or  Specifying a Cursor Type and Selecting Rows
                   in the Microsoft SQLSRV documentation.

<comment>Return:</comment>
  <info>mixed</info>  Returns the number of rows retrieved on success and <info>false</info> if an error occurred.  If a
         forward cursor (the default) or dynamic cursor is used, <info>false</info> is returned.

<comment>See Also:</comment>
   * <strong>sqlsrv_has_rows()</strong>
   * <strong>sqlsrv_rows_affected()</strong>


id: sqlsrv_prepare
type: function
doc:
<comment>Description:</comment>
  Prepares a query for execution
  
  Prepares a query for execution. This function is ideal for preparing a query  that will be
  executed multiple times with different parameter values.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>     A connection resource returned by <strong>sqlsrv_connect()</strong>.
  <info>string</info>    <strong>$sql</strong>      The string that defines the query to be prepared and executed.
  <info>array</info>     <strong>$params</strong>   An array specifying parameter information when executing a parameterized
                      query. Array elements can be any of the following: A literal valueA PHP
                      variableAn array with this structure:  array($value [, $direction [, $phpType
                      [, $sqlType]]]) The following table describes the elements in the array
                      structure above:
  <info>array</info>     <strong>$options</strong>  An array specifying query property options. The supported keys are described
                      in the following table:

<comment>Return:</comment>
  <info>mixed</info>  Returns a statement resource on success and <info>false</info> if an error occurred.

<comment>See Also:</comment>
   * <strong>sqlsrv_execute()</strong>
   * <strong>sqlsrv_query()</strong>


id: sqlsrv_query
type: function
doc:
<comment>Description:</comment>
  Prepares and executes a query
  
  Prepares and executes a query.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>     A connection resource returned by <strong>sqlsrv_connect()</strong>.
  <info>string</info>    <strong>$sql</strong>      The string that defines the query to be prepared and executed.
  <info>array</info>     <strong>$params</strong>   An array specifying parameter information when executing a parameterized
                      query.  Array elements can be any of the following: A literal valueA PHP
                      variableAn array with this structure:  array($value [, $direction [, $phpType
                      [, $sqlType]]]) The following table describes the elements in the array
                      structure above:
  <info>array</info>     <strong>$options</strong>  An array specifying query property options. The supported keys are described
                      in the following table:

<comment>Return:</comment>
  <info>mixed</info>  Returns a statement resource on success and <info>false</info> if an error occurred.

<comment>See Also:</comment>
   * <strong>sqlsrv_prepare()</strong>
   * <strong>sqlsrv_execute()</strong>


id: sqlsrv_rollback
type: function
doc:
<comment>Description:</comment>
  Rolls back a transaction that was begun with 
    sqlsrv_begin_transaction
  
  Rolls back a transaction that was begun with <strong>sqlsrv_begin_transaction()</strong>  and returns the
  connection to auto-commit mode.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection resource returned by a call to <strong>sqlsrv_connect()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>sqlsrv_begin_transaction()</strong>
   * <strong>sqlsrv_commit()</strong>


id: sqlsrv_rows_affected
type: function
doc:
<comment>Description:</comment>
  Returns the number of rows modified by the last INSERT, UPDATE, or 
    DELETE query executed
  
  Returns the number of rows modified by the last INSERT, UPDATE, or DELETE  query executed. For
  information about the number of rows returned by a SELECT  query, see <strong>sqlsrv_num_rows()</strong>.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  The executed statement resource for which the number of affected rows is
                   returned.

<comment>Return:</comment>
  <info>int|false</info>  Returns the number of rows affected by the last INSERT, UPDATE, or DELETE query.  If no
             rows were affected, 0 is returned. If the number of affected rows cannot  be
             determined, -1 is returned. If an error occurred, <info>false</info> is returned.

<comment>See Also:</comment>
   * <strong>sqlsrv_num_rows()</strong>


id: sqlsrv_send_stream_data
type: function
doc:
<comment>Description:</comment>
  Sends data from parameter streams to the server
  
  Send data from parameter streams to the server. Up to 8 KB of data is sent  with each call.

<comment>Param:</comment>
  <info>resource</info>  <strong>$stmt</strong>  A statement resource returned by <strong>sqlsrv_query()</strong> or  <strong>sqlsrv_execute()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> if there is more data to send and <info>false</info> if there is not.

<comment>See Also:</comment>
   * <strong>sqlsrv_prepare()</strong>
   * <strong>sqlsrv_query()</strong>


id: sqlsrv_server_info
type: function
doc:
<comment>Description:</comment>
  Returns information about the server
  
  Returns information about the server.

<comment>Param:</comment>
  <info>resource</info>  <strong>$conn</strong>  The connection resource that connects the client and the server.

<comment>Return:</comment>
  <info>array</info>  Returns an array as described in the following table: Returned ArrayCurrentDatabaseThe
         connected-to database.SQLServerVersionThe SQL Server version.SQLServerNameThe name of the
         server.

<comment>See Also:</comment>
   * <strong>sqlsrv_client_info()</strong>


id: sqrt
type: function
doc:
<comment>Description:</comment>
  Square root
  
  Returns the square root of <strong>$num</strong>.

<comment>Param:</comment>
  <info>float</info>  <strong>$num</strong>  The argument to process

<comment>Return:</comment>
  <info>float</info>  The square root of <strong>$num</strong> or the special value <return>NAN</return> for negative numbers.

<comment>See Also:</comment>
   * <strong>pow()</strong>
   * <info>M_SQRTPI</info> - sqrt(pi)
   * <info>M_2_SQRTPI</info> - 2/sqrt(pi)
   * <info>M_SQRT2</info> - sqrt(2)
   * <info>M_SQRT3</info> - sqrt(3)
   * <info>M_SQRT1_2</info> - 1/sqrt(2)


id: srand
type: function
doc:
<comment>Description:</comment>
  Seed the random number generator
  
  Seeds the random number generator with <strong>$seed</strong> or with a random value if <strong>$seed</strong> is <return>0</return>.
  
  There is no need
  to seed the random number generator with <strong>srand()</strong> or
  <strong>mt_srand()</strong> as this is done automatically.
  
  Because the Mt19937 (“Mersenne Twister”) engine accepts only a single 32 bit integer as the seed,
  the number of possible random sequences is limited to just 232 (i.e. 4,294,967,296), despite
  Mt19937’s huge period of 219937-1.
  
  When relying on either implicit or explicit random seeding, duplications will appear much earlier.
  Duplicated seeds are expected with 50% probability after less than 80,000 randomly generated seeds
  according to the birthday problem. A 10% probability of a duplicated seed happens after randomly
  generating roughly 30,000 seeds.
  
  This makes Mt19937 unsuitable for applications where duplicated sequences must not happen with
  more than a negligible probability. If reproducible seeding is required, both the
  <class>Random\Engine\Xoshiro256StarStar</class> and <class>Random\Engine\PcgOneseq128XslRr64</class> engines support much larger
  seeds that are unlikely to collide randomly. If reproducibility is not required, the
  <class>Random\Engine\Secure</class> engine provides cryptographically secure randomness.
  
  As of PHP 7.1.0, <strong>srand()</strong> has been made an alias of <strong>mt_srand()</strong>.

<comment>Param:</comment>
  <info>int</info>  <strong>$seed</strong>  An arbitrary <info>int</info> seed value.

<comment>Return:</comment>
  <info>void</info>  No value is returned.

<comment>See Also:</comment>
   * <strong>rand()</strong>
   * <strong>getrandmax()</strong>
   * <strong>mt_srand()</strong>


id: sscanf
type: function
doc:
<comment>Description:</comment>
  Parses input from a string according to a format
  
  The function <strong>sscanf()</strong> is the input analog of <strong>printf()</strong>. <strong>sscanf()</strong> reads from the string <strong>$string</strong> and
  interprets it according to the specified <strong>$format</strong>.
  
  Any whitespace in the format string matches any whitespace in the input string. This means that
  even a tab (<return>\t</return>) in the format string can match a single space character in the input string.

<comment>Param:</comment>
  <info>string</info>  <strong>$string</strong>  The input <info>string</info> being parsed.
  <info>string</info>  <strong>$format</strong>  The interpreted format for <strong>$string</strong>, which is described in the documentation for
                   <strong>sprintf()</strong> with following differences:  Function is not locale-aware. <return>F</return>, <return>g</return>, <return>G</return> and
                   <return>b</return> are not supported. <return>D</return> stands for decimal number. <return>i</return> stands for integer with base
                   detection. <return>n</return> stands for number of characters processed so far. <return>s</return> stops reading at
                   any whitespace character. <return>*</return> instead of <return>argnum$</return> suppresses the assignment of this
                   conversion specification.
  <info>mixed</info>   <strong>$vars</strong>    Optionally pass in variables by reference that will contain the parsed values.

<comment>Return:</comment>
  <info>array|int|null</info>  If only two parameters were passed to this function, the values parsed will be
                  returned as an array. Otherwise, if optional parameters are passed, the function
                  will return the number of assigned values. The optional parameters must be passed
                  by reference.
                  
                  If there are more substrings expected in the <strong>$format</strong> than there are available
                  within <strong>$string</strong>, <info>null</info> will be returned.

<comment>See Also:</comment>
   * <strong>printf()</strong>
   * <strong>sprintf()</strong>
   * <strong>fprintf()</strong>
   * <strong>vprintf()</strong>
   * <strong>vsprintf()</strong>
   * <strong>vfprintf()</strong>
   * <strong>fscanf()</strong>
   * <strong>number_format()</strong>
   * <strong>date()</strong>


id: ssdeep_fuzzy_compare
type: function
doc:
<comment>Description:</comment>
  Calculates the match score between two fuzzy hash signatures
  
  Calculates the match score between <strong>$signature1</strong> and <strong>$signature2</strong> using  context-triggered piecewise
  hashing, and returns the match score.

<comment>Param:</comment>
  <info>string</info>  <strong>$signature1</strong>  The first fuzzy hash signature string.
  <info>string</info>  <strong>$signature2</strong>  The second fuzzy hash signature string.

<comment>Return:</comment>
  <info>int</info>  Returns an integer from 0 to 100 on success, <info>false</info> otherwise.


id: ssdeep_fuzzy_hash
type: function
doc:
<comment>Description:</comment>
  Create a fuzzy hash from a string
  
  <strong>ssdeep_fuzzy_hash()</strong> calculates the hash of  <strong>$to_hash</strong> using  context-triggered piecewise hashing,
  and returns that hash.

<comment>Param:</comment>
  <info>string</info>  <strong>$to_hash</strong>  The input string.

<comment>Return:</comment>
  <info>string</info>  Returns a string on success, <info>false</info> otherwise.


id: ssdeep_fuzzy_hash_filename
type: function
doc:
<comment>Description:</comment>
  Create a fuzzy hash from a file
  
  <strong>ssdeep_fuzzy_hash_filename()</strong> calculates the hash  of the file specified by <strong>$file_name</strong> using
  context-triggered piecewise  hashing, and returns that hash.

<comment>Param:</comment>
  <info>string</info>  <strong>$file_name</strong>  The filename of the file to hash.

<comment>Return:</comment>
  <info>string</info>  Returns a string on success, <info>false</info> otherwise.


id: ssh2_auth_agent
type: function
doc:
<comment>Description:</comment>
  Authenticate over SSH using the ssh agent
  
  Authenticate over SSH using the ssh agent
  
  The <strong>ssh2_auth_agent()</strong> function will only be available  when the ssh2 extension is compiled with
  libssh &gt;= 1.2.3.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>   An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$username</strong>  Remote user name.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: ssh2_auth_hostbased_file
type: function
doc:
<comment>Description:</comment>
  Authenticate using a public hostkey
  
  Authenticate using a public hostkey read from a file.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>         An SSH connection link identifier, obtained from a call to
                             <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$username</strong>        
  <info>string</info>    <strong>$hostname</strong>        
  <info>string</info>    <strong>$pubkeyfile</strong>      
  <info>string</info>    <strong>$privkeyfile</strong>     
  <info>string</info>    <strong>$passphrase</strong>      If <strong>$privkeyfile</strong> is encrypted (which it should be), the passphrase must
                             be provided.
  <info>string</info>    <strong>$local_username</strong>  If <strong>$local_username</strong> is omitted, then the value for <strong>$username</strong> will be
                             used for it.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: ssh2_auth_none
type: function
doc:
<comment>Description:</comment>
  Authenticate as "none"
  
  Attempt "none" authentication which usually will (and should) fail. As part of the failure, this
  function will return an array of accepted authentication methods.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>   An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$username</strong>  Remote user name.

<comment>Return:</comment>
  <info>mixed</info>  Returns <info>true</info> if the server does accept "none" as an authentication method, or an array of
         accepted authentication methods on failure.


id: ssh2_auth_password
type: function
doc:
<comment>Description:</comment>
  Authenticate over SSH using a plain password
  
  Authenticate over SSH using a plain password. Since version 0.12 this function also supports
  keyboard_interactive method.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>   An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$username</strong>  Remote user name.
  <info>string</info>    <strong>$password</strong>  Password for <strong>$username</strong>

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: ssh2_auth_pubkey_file
type: function
doc:
<comment>Description:</comment>
  Authenticate using a public key
  
  Authenticate using a public key read from a file.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>      An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$username</strong>     
  <info>string</info>    <strong>$pubkeyfile</strong>   The public key file needs to be in OpenSSH's format. It should look
                          something like:
                          
                          ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110
  <info>string</info>    <strong>$privkeyfile</strong>  
  <info>string</info>    <strong>$passphrase</strong>   If <strong>$privkeyfile</strong> is encrypted (which it should be), the <strong>$passphrase</strong> must be
                          provided.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.


id: ssh2_connect
type: function
doc:
<comment>Description:</comment>
  Connect to an SSH server
  
  Establish a connection to a remote SSH server.
  
  Once connected, the client should verify the server's hostkey using <strong>ssh2_fingerprint()</strong>, then
  authenticate using either password or public key.

<comment>Param:</comment>
  <info>string</info>  <strong>$host</strong>       
  <info>int</info>     <strong>$port</strong>       
  <info>array</info>   <strong>$methods</strong>    <strong>$methods</strong> may be an associative array with up to four parameters as described
                      below.
                      
                      <strong>$methods</strong> may be an associative array with any or all of the following
                      parameters.IndexMeaningSupported Values*kex List of key exchange methods to
                      advertise, comma separated in order of preference. <return>diffie-hellman-group1-sha1</return>,
                      <return>diffie-hellman-group14-sha1</return>, and <return>diffie-hellman-group-exchange-sha1</return>hostkey
                      List of hostkey methods to advertise, comma separated in order of preference.
                      <return>ssh-rsa</return> and <return>ssh-dss</return> client_to_server Associative array containing crypt,
                      compression, and message authentication code (MAC) method preferences for
                      messages sent from client to server. server_to_client Associative array
                      containing crypt, compression, and message authentication code (MAC) method
                      preferences for messages sent from server to client.
                      
                      * - Supported Values are dependent on methods supported by underlying library.
                      See libssh2 documentation for additional information.
                      
                      <strong>$client_to_server</strong> and <strong>$server_to_client</strong> may be an associative array with any
                      or all of the following parameters. IndexMeaningSupported Values*cryptList of
                      crypto methods to advertise, comma separated in order of
                      preference.<return>rijndael-cbc@lysator.liu.se</return>, <return>aes256-cbc</return>, <return>aes192-cbc</return>, <return>aes128-cbc</return>,
                      <return>3des-cbc</return>, <return>blowfish-cbc</return>, <return>cast128-cbc</return>, <return>arcfour</return>, and <return>none**</return>compList of
                      compression methods to advertise, comma separated in order of preference.<return>zlib</return>
                      and <return>none</return> macList of MAC methods to advertise, comma separated in order of
                      preference.<return>hmac-sha1</return>, <return>hmac-sha1-96</return>, <return>hmac-ripemd160</return>,
                      <return>hmac-ripemd160@openssh.com</return>, and <return>none**</return>
                      
                      Crypt and MAC method "<return>none</return>" For security reasons, <return>none</return> is disabled by the
                      underlying libssh2 library unless explicitly enabled during build time by
                      using the appropriate ./configure options.  See documentation for the
                      underlying library for more information.
                      
                      For security reasons, <return>none</return> is disabled by the underlying libssh2 library
                      unless explicitly enabled during build time by using the appropriate
                      ./configure options.  See documentation for the underlying library for more
                      information.
  <info>array</info>   <strong>$callbacks</strong>  <strong>$callbacks</strong> may be an associative array with any or all of the following
                      parameters.  Callbacks parameters IndexMeaningPrototypeignore Name of function
                      to call when an <info>SSH2_MSG_IGNORE</info> packet is received void
                      ignore_cb($message)debug Name of function to call when an <info>SSH2_MSG_DEBUG</info>
                      packet is received void debug_cb($message, $language, $always_display)macerror
                      Name of function to call when a packet is received but the message
                      authentication code failed.  If the callback returns <info>true</info>, the mismatch will
                      be ignored, otherwise the connection will be terminated. bool
                      macerror_cb($packet)disconnect Name of function to call when an
                      <info>SSH2_MSG_DISCONNECT</info> packet is received void disconnect_cb($reason, $message,
                      $language)

<comment>Return:</comment>
  <info>resource|false</info>  Returns a resource on success, or <info>false</info> on error.

<comment>See Also:</comment>
   * <strong>ssh2_fingerprint()</strong>
   * <strong>ssh2_auth_none()</strong>
   * <strong>ssh2_auth_password()</strong>
   * <strong>ssh2_auth_pubkey_file()</strong>
   * <strong>ssh2_disconnect()</strong>


id: ssh2_disconnect
type: function
doc:
<comment>Description:</comment>
  Close a connection to a remote SSH server
  
  Close a connection to a remote SSH server.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>  An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_connect()</strong>


id: ssh2_exec
type: function
doc:
<comment>Description:</comment>
  Execute a command on a remote server
  
  Execute a command at the remote end and allocate a channel for it.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>            An SSH connection link identifier, obtained from a call to
                                <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$command</strong>            
  <info>string</info>    <strong>$pty</strong>                
  <info>array</info>     <strong>$env</strong>                <strong>$env</strong> may be passed as an associative array of name/value pairs to
                                set in the target environment.
  <info>int</info>       <strong>$width</strong>              Width of the virtual terminal.
  <info>int</info>       <strong>$height</strong>             Height of the virtual terminal.
  <info>int</info>       <strong>$width_height_type</strong>  <strong>$width_height_type</strong> should be one of <info>SSH2_TERM_UNIT_CHARS</info> or
                                <info>SSH2_TERM_UNIT_PIXELS</info>.

<comment>Return:</comment>
  <info>resource|false</info>  Returns a stream on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_connect()</strong>
   * <strong>ssh2_shell()</strong>
   * <strong>ssh2_tunnel()</strong>


id: ssh2_fetch_stream
type: function
doc:
<comment>Description:</comment>
  Fetch an extended data stream
  
  Fetches an alternate substream associated with an SSH2 channel stream. The SSH2 protocol currently
  defines only one substream, STDERR, which has a substream ID of <info>SSH2_STREAM_STDERR</info> (defined as 1).

<comment>Param:</comment>
  <info>resource</info>  <strong>$channel</strong>   
  <info>int</info>       <strong>$streamid</strong>  An SSH2 channel stream.

<comment>Return:</comment>
  <info>resource</info>  Returns the requested stream resource.

<comment>See Also:</comment>
   * <strong>ssh2_shell()</strong>
   * <strong>ssh2_exec()</strong>
   * <strong>ssh2_connect()</strong>


id: ssh2_fingerprint
type: function
doc:
<comment>Description:</comment>
  Retrieve fingerprint of remote server
  
  Returns a server hostkey hash from an active session.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>  An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>int</info>       <strong>$flags</strong>    <strong>$flags</strong> may be either of <info>SSH2_FINGERPRINT_MD5</info> or <info>SSH2_FINGERPRINT_SHA1</info>
                      logically ORed with <info>SSH2_FINGERPRINT_HEX</info> or <info>SSH2_FINGERPRINT_RAW</info>.

<comment>Return:</comment>
  <info>string</info>  Returns the hostkey hash as a string.


id: ssh2_forward_accept
type: function
doc:
<comment>Description:</comment>
  Accept a connection created by a listener
  
  Accepts a connection created by a listener.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info></info>  <strong>$desc</strong>  An SSH2 Listener resource, obtained from a call to <strong>ssh2_forward_listen()</strong>.

<comment>Return:</comment>
  <info>resource|false</info>  Returns a stream resource,  or <info>false</info> on failure.


id: ssh2_forward_listen
type: function
doc:
<comment>Description:</comment>
  Bind a port on the remote server and listen for connections
  
  Binds a port on the remote server and listen for connections.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>          An SSH Session resource, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>int</info>       <strong>$port</strong>             The port of the remote server.
  <info>string</info>    <strong>$host</strong>             
  <info>int</info>       <strong>$max_connections</strong>  

<comment>Return:</comment>
  <info>resource|false</info>  Returns an SSH2 Listener,  or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_forward_accept()</strong>


id: ssh2_methods_negotiated
type: function
doc:
<comment>Description:</comment>
  Return list of negotiated methods
  
  Returns list of negotiated methods.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>  An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.

<comment>Return:</comment>
  <info>array</info>  

<comment>See Also:</comment>
   * <strong>ssh2_connect()</strong>


id: ssh2_poll
type: function
doc:
<comment>Description:</comment>
  Poll the channels/listeners/streams for events
  
  Polls the channels/listeners/streams for events, and returns the number of descriptors which
  returned non-zero revents.
  
  This function is
  currently not documented; only its argument list is available.

<comment>Param:</comment>
  <info>array</info>  <strong>$desc</strong>     An indexed array of subarrays with the keys <return>'resource'</return> and <return>'events'</return>. The value of
                   the resource is a (channel) stream or an SSH2 Listener resource. The value of the
                   event are SSH2_POLL* flags bitwise ORed together. Each subarray will be populated
                   with an <return>'revents'</return> element on return, whose values are SSH2_POLL* flags bitwise
                   ORed together of the events that occurred.
  <info>int</info>    <strong>$timeout</strong>  The timeout in seconds.

<comment>Return:</comment>
  <info>int</info>  Returns the number of descriptors which returned non-zero revents.


id: ssh2_publickey_add
type: function
doc:
<comment>Description:</comment>
  Add an authorized publickey
    
  
  The public key subsystem
  is used for managing public keys on a server to which the client is
  already authenticated.  To authenticate to a remote system
  using public key authentication, use the
  <strong>ssh2_auth_pubkey_file()</strong> function instead.

<comment>Param:</comment>
  <info>resource</info>  <strong>$pkey</strong>        Publickey Subsystem resource created by <strong>ssh2_publickey_init()</strong>.
  <info>string</info>    <strong>$algoname</strong>    Publickey algorithm (e.g.): ssh-dss, ssh-rsa
  <info>string</info>    <strong>$blob</strong>        Publickey blob as raw binary data
  <info>bool</info>      <strong>$overwrite</strong>   If the specified key already exists, should it be overwritten?
  <info>array</info>     <strong>$attributes</strong>  Associative array of attributes to assign to this public key. Refer to
                         ietf-secsh-publickey-subsystem for a list of supported attributes. To mark
                         an attribute as mandatory, precede its name with an asterisk. If the server
                         is unable to support an attribute marked mandatory, it will abort the add
                         process.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_publickey_init()</strong>
   * <strong>ssh2_publickey_remove()</strong>
   * <strong>ssh2_publickey_list()</strong>


id: ssh2_publickey_init
type: function
doc:
<comment>Description:</comment>
  Initialize Publickey subsystem
    
  
  Request the Publickey subsystem from an already connected SSH2 server.
  
  The publickey subsystem allows an already connected and authenticated client to manage the list of
  authorized public keys stored on the target server in an implementation agnostic manner. If the
  remote server does not support the publickey subsystem, the <strong>ssh2_publickey_init()</strong> function will
  return <info>false</info>.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>  

<comment>Return:</comment>
  <info>resource|false</info>  Returns an <return>SSH2 Publickey Subsystem</return> resource for use with all other
                  ssh2_publickey_*() methods or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_publickey_add()</strong>
   * <strong>ssh2_publickey_remove()</strong>
   * <strong>ssh2_publickey_list()</strong>


id: ssh2_publickey_list
type: function
doc:
<comment>Description:</comment>
  List currently authorized publickeys
    
  
  List currently authorized publickeys.

<comment>Param:</comment>
  <info>resource</info>  <strong>$pkey</strong>  Publickey Subsystem resource

<comment>Return:</comment>
  <info>array</info>  Returns a numerically indexed array of keys, each of which is an associative array
         containing: name, blob, and attrs elements.
         
         Publickey elementsArray KeyMeaningnameName of algorithm used by this publickey, for
         example: <return>ssh-dss</return> or <return>ssh-rsa</return>.blobPublickey blob as raw binary data.attrsAttributes assigned
         to this publickey. The most common attribute, and the only one supported by publickey
         version 1 servers, is <return>comment</return>, which may be any freeform string.

<comment>See Also:</comment>
   * <strong>ssh2_publickey_init()</strong>
   * <strong>ssh2_publickey_add()</strong>
   * <strong>ssh2_publickey_remove()</strong>


id: ssh2_publickey_remove
type: function
doc:
<comment>Description:</comment>
  Remove an authorized publickey
    
  
  Removes an authorized publickey.

<comment>Param:</comment>
  <info>resource</info>  <strong>$pkey</strong>      Publickey Subsystem Resource
  <info>string</info>    <strong>$algoname</strong>  Publickey algorithm (e.g.): ssh-dss, ssh-rsa
  <info>string</info>    <strong>$blob</strong>      Publickey blob as raw binary data

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_publickey_init()</strong>
   * <strong>ssh2_publickey_add()</strong>
   * <strong>ssh2_publickey_list()</strong>


id: ssh2_scp_recv
type: function
doc:
<comment>Description:</comment>
  Request a file via SCP
  
  Copy a file from the remote server to the local filesystem using the SCP protocol.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>      An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$remote_file</strong>  Path to the remote file.
  <info>string</info>    <strong>$local_file</strong>   Path to the local file.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_scp_send()</strong>
   * <strong>copy()</strong>


id: ssh2_scp_send
type: function
doc:
<comment>Description:</comment>
  Send a file via SCP
  
  Copy a file from the local filesystem to the remote server using the SCP protocol.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>      An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.
  <info>string</info>    <strong>$local_file</strong>   Path to the local file.
  <info>string</info>    <strong>$remote_file</strong>  Path to the remote file.
  <info>int</info>       <strong>$create_mode</strong>  The file will be created with the mode specified by <strong>$create_mode</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_scp_recv()</strong>
   * <strong>copy()</strong>


id: ssh2_send_eof
type: function
doc:
<comment>Description:</comment>
  Send EOF to stream
  
  Sends an EOF to the stream; this is typically used to close standard input, while keeping output
  and error alive. For example, one can send a remote process some data over standard input, close
  it to start processing, and still be able to read out the results without creating additional
  files.

<comment>Param:</comment>
  <info>resource</info>  <strong>$channel</strong>  An SSH stream; can be acquired through functions like <strong>ssh2_fetch_stream()</strong> or
                      <strong>ssh2_connect()</strong>.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_fetch_stream()</strong>


id: ssh2_sftp
type: function
doc:
<comment>Description:</comment>
  Initialize SFTP subsystem
  
  Request the SFTP subsystem from an already connected SSH2 server.

<comment>Param:</comment>
  <info>resource</info>  <strong>$session</strong>  An SSH connection link identifier, obtained from a call to <strong>ssh2_connect()</strong>.

<comment>Return:</comment>
  <info>resource|false</info>  This method returns an <return>SSH2 SFTP</return> resource for use with all other ssh2_sftp_*()
                  methods and the ssh2.sftp:// fopen wrapper, or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>ssh2_scp_recv()</strong>
   * <strong>ssh2_scp_send()</strong>


id: ssh2_sftp_chmod
type: function
doc:
<comment>Description:</comment>
  Changes file mode
  
  Attempts to change the mode of the specified file to that given in <strong>$mode</strong>.

<comment>Param:</comment>
  <info>resource</info>  <strong>$sftp</strong>      An SSH2 SFTP resource opened by <strong>ssh2_sftp()</strong>.
  <info>string</info>    <strong>$filename</strong>  Path to the file.
  <info>int</info>       <strong>$mode</strong>      Permissions on the file. See the <strong>chmod()</strong> for more details on this parameter.

<comment>Return:</comment>
  <info>bool</info>  Returns <info>true</info> on success or <info>false</info> on failure.

<comment>See Also:</comment>
   * <strong>chmod()</strong>
   * <strong>ssh2_sftp()</strong>
   * <strong>ssh2_connect()</strong>


id: ssh2_sftp_lstat
type: function
doc:
<comment>Description:</comment>
  Stat a symbolic link
  
  Stats a symbolic link on the remote filesystem without following the link.
  
  This function is similar to using the <strong>lstat()</strong> function with the ssh2.sftp:// wrapper and returns
  the same values.

<comment>Param:</comment>
  <info>resource</info>  <strong>$sftp</strong>  An SSH2 SFTP resource opened by <strong>ssh2_sftp()</strong>.
  <info>string</info>    <strong>$path</strong>  Path to the remote symbolic link.

<comment>Return:</comment>
  <info>array</info>  See the documentation for <strong>stat()</strong> for details on the values which may be returned.

<comment>See Also:</comment>
   * <strong>ssh2_sftp_stat()</strong>
   * <strong>lstat()</strong>
   * <strong>stat()</strong>


