code
stringlengths 17
247k
| docstring
stringlengths 30
30.3k
| func_name
stringlengths 1
89
| language
stringclasses 1
value | repo
stringlengths 7
63
| path
stringlengths 7
153
| url
stringlengths 51
209
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
function fromJSON($json) {} | Returns the BSON representation of a JSON value
Converts an extended JSON string to its BSON representation.
@link https://php.net/manual/en/function.mongodb.bson-fromjson.php
@param string $json JSON value to be converted.
@return string The serialized BSON document as a binary string.
@throws UnexpectedValueException if the JSON value cannot be converted to BSON (e.g. due to a syntax error).
@deprecated Use MongoDB\BSON\Document instead | fromJSON | php | JetBrains/phpstorm-stubs | mongodb/BSON/functions.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/BSON/functions.php | Apache-2.0 |
function fromPHP($value) {} | Returns the BSON representation of a PHP value
Serializes a PHP array or object (e.g. document) to its BSON representation. The returned binary string will describe a BSON document.
@link https://php.net/manual/en/function.mongodb.bson-fromphp.php
@param array|object $value PHP value to be serialized.
@return string The serialized BSON document as a binary string
@throws UnexpectedValueException if the PHP value cannot be converted to BSON.
@deprecated Use MongoDB\BSON\Document instead | fromPHP | php | JetBrains/phpstorm-stubs | mongodb/BSON/functions.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/BSON/functions.php | Apache-2.0 |
function toJSON($bson) {} | Returns the JSON representation of a BSON value
Converts a BSON string to its extended JSON representation.
@link https://php.net/manual/en/function.mongodb.bson-tojson.php
@param string $bson BSON value to be converted
@return string The converted JSON value.
@see https://docs.mongodb.org/manual/reference/mongodb-extended-json/
@throws UnexpectedValueException if the input did not contain exactly one BSON document
@deprecated Use MongoDB\BSON\Document instead | toJSON | php | JetBrains/phpstorm-stubs | mongodb/BSON/functions.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/BSON/functions.php | Apache-2.0 |
function toPHP($bson, array $typemap = []) {} | Returns the PHP representation of a BSON value
Unserializes a BSON document (i.e. binary string) to its PHP representation.
The typeMap parameter may be used to control the PHP types used for converting BSON arrays and documents (both root and embedded).
@link https://php.net/manual/en/function.mongodb.bson-tophp.php
@param string $bson BSON value to be unserialized.
@param array $typemap
@return object The unserialized PHP value
@throws UnexpectedValueException if the input did not contain exactly one BSON document.
@throws InvalidArgumentException if a class in the type map cannot be instantiated or does not implement MongoDB\BSON\Unserializable.
@deprecated Use MongoDB\BSON\Document instead | toPHP | php | JetBrains/phpstorm-stubs | mongodb/BSON/functions.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/BSON/functions.php | Apache-2.0 |
function inotify_add_watch($inotify_instance, $pathname, $mask) {} | (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
Add a watch to an initialized inotify instance
@link https://php.net/manual/en/function.inotify-add-watch.php
@param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
@param string $pathname <p>File or directory to watch</p>
@param int $mask <p>Events to watch for. See {@link https://php.net/manual/en/inotify.constants.php Predefined Constants}.</p>
@return int a unique (<i>inotify</i> instance-wide) watch descriptor. | inotify_add_watch | php | JetBrains/phpstorm-stubs | inotify/inotify.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/inotify/inotify.php | Apache-2.0 |
function inotify_queue_len($inotify_instance) {} | (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
This function allows to know if {@see inotify_read} will block or not.
If a number upper than zero is returned, there are pending events
and {@see inotify_read} will not block.
@link https://php.net/manual/en/function.inotify-queue-len.php
@param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
@return int a number greater than zero if events are pending, otherwise zero. | inotify_queue_len | php | JetBrains/phpstorm-stubs | inotify/inotify.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/inotify/inotify.php | Apache-2.0 |
function inotify_read($inotify_instance) {} | (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
Read inotify events from an inotify instance.
@link https://php.net/manual/en/function.inotify-read.php
@param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
@return array|false an array of inotify events or <b>FALSE</b> if no events
were pending and <i>inotify_instance</i> is non-blocking. Each event
is an array with the following keys:
<ul>
<li><b>wd</b> is a watch descriptor returned by inotify_add_watch()</li>
<li><b>mask</b> is a bit mask of events</li>
<li><b>cookie</b> is a unique id to connect related events (e.g. IN_MOVE_FROM and IN_MOVE_TO)</li>
<li><b>name</b> is the name of a file (e.g. if a file was modified in a watched directory)</li>
</ul> | inotify_read | php | JetBrains/phpstorm-stubs | inotify/inotify.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/inotify/inotify.php | Apache-2.0 |
function inotify_rm_watch($inotify_instance, $mask) {} | (PHP >= 5.2.0, PECL inotify >= 0.1.2)<br/>
Removes the watch <i>$watch_descriptor</i> from the inotify instance <i>$inotify_instance</i>.
@link https://secure.php.net/manual/en/function.inotify-rm-watch.php
@param resource $inotify_instance <p>resource returned by {@link https://php.net/manual/en/function.inotify-init.php inotify_init()}</p>
@param int $mask <p>watch to remove from the instance</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | inotify_rm_watch | php | JetBrains/phpstorm-stubs | inotify/inotify.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/inotify/inotify.php | Apache-2.0 |
function xcache_get($name) {} | Get cached data by specified name
@param string $name Key name
@return mixed | xcache_get | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_set($name, $value, $ttl = 0) {} | Store data to cache by specified name
@param string $name Key name
@param mixed $value Value to store
@param int $ttl TTL in seconds
@return bool TRUE on success, FALSE otherwise | xcache_set | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_isset($name) {} | Check if an entry exists in cache by specified name
@param string $name Key name
@return bool TRUE if key exists, FALSE otherwise | xcache_isset | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_unset($name) {} | Unset existing data in cache by specified name
@param string $name Key name
@return bool | xcache_unset | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_unset_by_prefix($prefix) {} | Unset existing data in cache by specified prefix
@param string $prefix Keys' prefix
@return bool | xcache_unset_by_prefix | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_inc($name, $value = 1, $ttl = 0) {} | Increase an int counter in cache by specified name, create it if not exists
@param string $name
@param mixed $value
@param int $ttl
@return int | xcache_inc | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_dec($name, $value = 1, $ttl = 0) {} | Decrease an int counter in cache by specified name, create it if not exists
@param string $name
@param mixed $value
@param int $ttl
@return int | xcache_dec | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_count($type) {} | Return count of cache on specified cache type
@param int $type
@return int | xcache_count | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_info($type, $id) {} | Get cache info by id on specified cache type
@param int $type
@param int $id
@return array | xcache_info | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_list($type, $id) {} | Get cache entries list by id on specified cache type
@param int $type
@param int $id
@return array | xcache_list | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_clear_cache($type, $id = -1) {} | Clear cache by id on specified cache type
@param int $type
@param int $id
@return void | xcache_clear_cache | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_dasm_file($filename) {} | Disassemble file into opcode array by filename
@param string $filename
@return string | xcache_dasm_file | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_dasm_string($code) {} | Disassemble php code into opcode array
@param string $code
@return string | xcache_dasm_string | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_encode($filename) {} | Encode php file into XCache opcode encoded format
@param string $filename
@return string | xcache_encode | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function xcache_decode($filename) {} | Decode(load) opcode from XCache encoded format file
@param string $filename
@return bool | xcache_decode | php | JetBrains/phpstorm-stubs | xcache/xcache.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/xcache/xcache.php | Apache-2.0 |
function bzopen($file, string $mode) {} | Opens a bzip2 compressed file
@link https://php.net/manual/en/function.bzopen.php
@param string $file <p>
The name of the file to open, or an existing stream resource.
</p>
@param string $mode <p>
Similar to the <b>fopen</b> function, only 'r' (read)
and 'w' (write) are supported. Everything else will cause bzopen
to return <b>FALSE</b>.
</p>
@return resource|false If the open fails, <b>bzopen</b> returns <b>FALSE</b>, otherwise
it returns a pointer to the newly opened file. | bzopen | php | JetBrains/phpstorm-stubs | bz2/bz2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/bz2/bz2.php | Apache-2.0 |
public function __construct($values = []) {} | Creates a new instance, using either a traversable object or an array for the initial values.
@param array<TValue> $values | __construct | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function find($value) {} | Returns the index of the value, or FALSE if not found.
@param TValue $value The value to find.
@return int|false The index of the value, or FALSE if not found.
<p><b>Note:</b> Values will be compared by value and by type.</p>
@link https://www.php.net/manual/en/ds-vector.find.php | find | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function first() {} | Returns the first value in the vector.
@return TValue
@throws UnderflowException if empty.
@link https://www.php.net/manual/en/ds-vector.first.php | first | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function get(int $index) {} | Returns the value at a given index.
@param int $index The index to access, starting at 0.
@return TValue
@link https://www.php.net/manual/en/ds-vector.get.php | get | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function last() {} | Returns the last value in the sequence.
@return TValue The last value in the sequence.
@link https://www.php.net/manual/en/ds-vector.last.php | last | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function reduce(callable $callback, $initial = null) {} | Reduces the sequence to a single value using a callback function.
@template TCarry
@param callable(TCarry, TValue): TCarry $callback <br>
<code>callback ( mixed $carry , mixed $value ) : mixed</code><br>
<b>carry</b> The return value of the previous callback, or initial if it's the first iteration.<br>
<b>value</b> The value of the current iteration.
@param TCarry $initial The initial value of the carry value. Can be NULL.
@return TCarry The return value of the final callback.
@link https://www.php.net/manual/en/ds-vector.reduce.php | reduce | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function remove(int $index) {} | Removes and returns a value by index.
@param int $index The index of the value to remove.
@return TValue The value that was removed.
@link https://www.php.net/manual/en/ds-vector.remove.php | remove | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function shift() {} | Removes and returns the first value.
@link https://www.php.net/manual/en/ds-vector.shift.php
@return TValue The first value, which was removed.
@throws UnderflowException if empty. | shift | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function jsonSerialize() {} | Specify data which should be serialized to JSON
@link https://php.net/manual/en/ds-vector.jsonserialize.php
@return mixed data which can be serialized by <b>json_encode</b>,
which is a value of any type other than a resource.
@since 5.4 | jsonSerialize | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function __construct(...$values) {} | Creates a new instance, using either a traversable object or an array for the initial values.
@param TValue ...$values A traversable object or an array to use for the initial values.
@link https://www.php.net/manual/en/ds-deque.construct.php | __construct | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function allocate(int $capacity) {} | Allocates enough memory for a required capacity.
@param int $capacity The number of values for which capacity should be allocated.<br>
<p><b>Note:</b> Capacity will stay the same if this value is less than or equal to the current capacity.</p>
Capacity will always be rounded up to the nearest power of 2.
@link https://www.php.net/manual/en/ds-map.allocate.php | allocate | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function apply(callable $callback) {} | Updates all values by applying a callback function to each value in the map.
@param callable(TKey, TValue): TValue $callback A callable to apply to each value in the map. The callback should return what
the value should be replaced by.
@link https://www.php.net/manual/en/ds-map.apply.php | apply | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function get($key, $default = null) {} | Returns the value for a given key, or an optional default value if the key could not be found.
<p>
<b>Note:</b> Keys of type object are supported. If an object implements Ds\Hashable, equality will be
determined by the object's equals function. If an object does not implement Ds\Hashable, objects must be references to the same instance to be considered equal.
</p>
<p>
<b>Note:</b> You can also use array syntax to access values by key, eg. $map["key"].
</p>
<p>
<b>Caution:</b> Be careful when using array syntax. Scalar keys will be coerced to integers by the engine. For
example, $map["1"] will attempt to access int(1), while $map->get("1") will correctly look up the string key.
</p>
@template TDefault
@param TKey $key The key to look up.
@param TDefault $default The optional default value, returned if the key could not be found.
@return TValue|TDefault The value mapped to the given key, or the default value if provided and the key could not be found in the map.
@throws OutOfBoundsException if the key could not be found and a default value was not provided.
@link https://www.php.net/manual/en/ds-map.get.php | get | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function ksort(?callable $comparator = null) {} | Sorts the map in-place by key, using an optional comparator function.
@param callable(TKey, TKey):int|null $comparator The comparison function must return
an integer less than, equal to, or greater than zero if the first
argument is considered to be respectively less than, equal to, or
greater than the second. Note that before PHP 7.0.0 this integer had
to be in the range from -2147483648 to 2147483647.
<code>callback ( mixed $a, mixed $b ) : int</code>
<p><b>Caution:</b> Returning non-integer values from the comparison function, such
as float, will result in an internal cast to integer of the
callback's return value. So values such as 0.99 and 0.1 will both be
cast to an integer value of 0, which will compare such values as
equal.</p>
@link https://www.php.net/manual/en/ds-map.ksort.php | ksort | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function put($key, $value) {} | Associates a key with a value, overwriting a previous association if
one exists.
@param TKey $key The key to associate the value with.
@param TValue $value The value to be associated with the key.
<b>Note:</b> Keys of type object are supported. If an object implements
Ds\Hashable, equality will be determined by the object's equals
function. If an object does not implement Ds\Hashable, objects must
be references to the same instance to be considered equal.
<b>Note:</b> You can also use array syntax to associate values by key, eg.
$map["key"] = $value.
<b>Caution:</b> Be careful when using array syntax. Scalar keys will be
coerced to integers by the engine. For example, $map["1"] will
attempt to access int(1), while $map->get("1") will correctly look up
the string key.
@link https://www.php.net/manual/en/ds-map.put.php | put | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function putAll($pairs) {} | Associates all key-value pairs of a traversable object or array.
<b>Note:</b> Keys of type object are supported. If an object implements
Ds\Hashable, equality will be determined
by the object's equals function. If an object does not implement
Ds\Hashable, objects must be references to the same instance to be
considered equal.
@param iterable<TKey, TValue> $pairs traversable object or array.
@link https://www.php.net/manual/en/ds-map.putall.php | putAll | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function reduce(callable $callback, $initial) {} | Reduces the map to a single value using a callback function.
@template TCarry
@param callable(TCarry, TKey, TValue): TCarry $callback
<code>callback ( mixed $carry , mixed $key , mixed $value ) : mixed</code>
<b>carry</b> The return value of the previous callback, or initial if
it's the first iteration.
<b>key</b> The key of the current iteration.
<b>value</b> The value of the current iteration.
@param TCarry $initial The initial value of the carry value. Can be
NULL.
@return TCarry
@link https://www.php.net/manual/en/ds-map.reduce.php | reduce | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function remove($key, $default = null) {} | Removes and returns a value by key, or return an optional default
value if the key could not be found.
@template TDefault
@param TKey $key The key to remove.
@param TDefault $default The optional default value, returned if the key
could not be found.
<b>Note:</b> Keys of type object are supported. If an object implements
Ds\Hashable, equality will be determined
by the object's equals function. If an object does not implement
Ds\Hashable, objects must be references to the same instance to be
considered equal.
<b>Note:</b> You can also use array syntax to access values by key, eg.
$map["key"].
<b>Caution:</b> Be careful when using array syntax. Scalar keys will be
coerced to integers by the engine. For example, $map["1"] will
attempt to access int(1), while $map->get("1") will correctly look up
the string key.
@return TValue|TDefault The value that was removed, or the default value if
provided and the key could not be found in the map.
@throws OutOfBoundsException if the key could not be found and a
default value was not provided.
@link https://www.php.net/manual/en/ds-map.remove.php | remove | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function sort(?callable $comparator = null) {} | Sorts the map in-place by value, using an optional comparator
function.
@param callable(TValue, TValue): int|null $comparator The comparison function must return
an integer less than, equal to, or greater than zero if the first
argument is considered to be respectively less than, equal to, or
greater than the second. Note that before PHP 7.0.0 this integer had
to be in the range from -2147483648 to 2147483647.
<code>callback ( mixed $a, mixed $b ) : int</code>
<b>Caution:</b> Returning non-integer values from the comparison function,
such as float, will result in an internal cast to integer of the
callback's return value. So values such as 0.99 and 0.1 will both be
cast to an integer value of 0, which will compare such values as
equal.
@link https://www.php.net/manual/en/ds-map.sort.php | sort | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function __construct($key = null, $value = null) {} | Creates a new instance using a given key and value.
@param TKey $key
@param TValue $value
@link https://php.net/manual/en/ds-pair.construct.php | __construct | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function __construct(iterable $values = []) {} | Creates a new instance, using either a traversable object or an array
for the initial values.
@param iterable<TValue> $values A traversable object of an array to
use the initial values.
@link https://php.net/manual/en/ds-set.construct.php | __construct | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function add(...$values) {} | Adds all given values to the set that haven't already been added.
<p><b>Note:</b> Values of type object are supported. If an object implements
Ds\Hashable, equality will be determined by the object's equals
function. If an object does not implement Ds\Hashable, objects must
be references to the same instance to be considered equal.
<p><b>Caution:</b> All comparisons are strict (type and value).
@param TValue ...$values Values to add to the set.
@link https://php.net/manual/en/ds-set.add.php | add | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function remove(...$values) {} | Removes all given values from the set, ignoring any that are not in
the set.
@link https://www.php.net/manual/en/ds-set.remove.php
@param TValue ...$values The values to remove. | remove | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function peek() {} | Returns the value at the top of the stack, but does not remove it.
@link https://www.php.net/manual/en/ds-queue.peek.php
@return TValue The value at the top of the stack.
@throws UnderflowException | peek | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function copy() {} | Returns a shallow copy of the collection.
@link https://www.php.net/manual/en/ds-collection.copy.php
@return PriorityQueue<TValue> | copy | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
public function push($value, int $priority) {} | Pushes a value with a given priority into the queue.
@param TValue $value
@param int $priority | push | php | JetBrains/phpstorm-stubs | ds/ds.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ds/ds.php | Apache-2.0 |
function read_exif_data($filename, $sections = null, $arrays = false, $thumbnail = false) {} | Alias of <b>exif_read_data</b>
@link https://php.net/manual/en/function.read-exif-data.php
@param $filename
@param $sections [optional]
@param $arrays [optional]
@param $thumbnail [optional]
@removed 8.0 | read_exif_data | php | JetBrains/phpstorm-stubs | exif/exif.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/exif/exif.php | Apache-2.0 |
public function __construct(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $dsn,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $username = null,
#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $password = null,
#[LanguageLevelTypeAware(['8.0' => 'array|null'], default: '')] $options = null
) {} | (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)<br/>
Creates a PDO instance representing a connection to a database
@link https://php.net/manual/en/pdo.construct.php
@param string $dsn
@param string $username [optional]
@param string $password [optional]
@param array $options [optional]
@throws PDOException if the attempt to connect to the requested database fails. | __construct | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function query(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $query,
#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $fetchMode = null,
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$fetchModeArgs
) {} | (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo >= 0.2.0)<br/>
Executes an SQL statement, returning a result set as a PDOStatement object
@link https://php.net/manual/en/pdo.query.php
@param string $query <p>
The SQL statement to prepare and execute.
</p>
<p>
Data inside the query should be properly escaped.
</p>
@param int|null $fetchMode <p>
The fetch mode must be one of the PDO::FETCH_* constants.
</p>
@param mixed ...$fetch_mode_args <p>
Arguments of custom class constructor when the <i>mode</i>
parameter is set to <b>PDO::FETCH_CLASS</b>.
</p>
@return PDOStatement|false <b>PDO::query</b> returns a PDOStatement object, or <b>FALSE</b>
on failure.
@see PDOStatement::setFetchMode For a full description of the second and following parameters. | query | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function sqliteCreateAggregate($function_name, $step_func, $finalize_func, $num_args = -1) {} | (PHP 5 >= 5.1.0, PHP 7, PECL pdo_sqlite >= 1.0.0)<br/>
Registers an aggregating User Defined Function for use in SQL statements
@link https://php.net/manual/en/pdo.sqlitecreateaggregate.php
@param string $function_name <p>
The name of the function used in SQL statements.
</p>
@param callable $step_func <p>
Callback function called for each row of the result set. Your PHP function should accumulate the result and store it in the aggregation context.
</p>
@param callable $finalize_func <p>
Callback function to aggregate the "stepped" data from each row. Once all the rows have been processed, this function will be called and it should then take the data from the aggregation context and return the result. This callback function should return a type understood by SQLite (i.e. scalar type).
</p>
@param int $num_args [optional] <p>
Hint to the SQLite parser if the callback function accepts a predetermined number of arguments.
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | sqliteCreateAggregate | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function sqliteCreateCollation($name, $callback) {} | (PHP 5 >= 5.3.11, PHP 7)<br/>
Registers a User Defined Function for use as a collating function in SQL statements
@link https://php.net/manual/en/pdo.sqlitecreatecollation.php
@param string $name <p>
Name of the SQL collating function to be created or redefined.
</p>
@param callable $callback <p>
The name of a PHP function or user-defined function to apply as a callback, defining the behavior of the collation. It should accept two strings and return as strcmp() does, i.e. it should return -1, 1, or 0 if the first string sorts before, sorts after, or is equal to the second.
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | sqliteCreateCollation | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function sqliteCreateFunction($function_name, $callback, $num_args = -1, $flags = 0) {} | (PHP 5 >= 5.1.0, PHP 7, PECL pdo_sqlite >= 1.0.0)<br/>
Registers a User Defined Function for use in SQL statements
@link https://php.net/manual/en/pdo.sqlitecreatefunction.php
@param string $function_name <p>
The name of the function used in SQL statements.
</p>
@param callable $callback <p>
Callback function to handle the defined SQL function.
</p>
@param int $num_args [optional] <p>
The number of arguments that the SQL function takes. If this parameter is -1,
then the SQL function may take any number of arguments.
</p>
@param int $flags [optional] <p>
A bitwise conjunction of flags. Currently, only <b>PDO::SQLITE_DETERMINISTIC</b> is supported,
which specifies that the function always returns the same result given the same inputs within
a single SQL statement.
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | sqliteCreateFunction | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlCopyFromArray($tableName, array $rows, $separator = "\t", $nullAs = "\\\\N", $fields = null) {} | (PHP 5 >= 5.3.3, PHP 7, PHP 8)<br/>
Copy data from PHP array into table
@link https://www.php.net/manual/en/pdo.pgsqlcopyfromarray.php
@param string $tableName <p>
String containing table name
</p>
@param array $rows <p>
Array of strings with fields separated by <i>separator</i>
</p>
@param string $separator <p>
Separator used in <i>rows</i> array
</p>
@param string $nullAs <p>
How to interpret null values
</p>
@param string|null $fields <p>
List of fields to insert
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | pgsqlCopyFromArray | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlCopyFromFile($tableName, $filename, $separator = "\t", $nullAs = "\\\\N", $fields = null) {} | (PHP 5 >= 5.3.3, PHP 7, PHP 8)<br/>
Copy data from file into table
@link https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php
@param string $tableName <p>
String containing table name
</p>
@param string $filename <p>
Filename containing data to import
</p>
@param string $separator <p>
Separator used in file specified by <i>filename</i>
</p>
@param string $nullAs <p>
How to interpret null values
</p>
@param string|null $fields <p>
List of fields to insert
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | pgsqlCopyFromFile | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlCopyToArray($tableName, $separator = "\t", $nullAs = "\\\\N", $fields = null) {} | (PHP 5 >= 5.3.3, PHP 7, PHP 8)<br/>
Copy data from database table into PHP array
@link https://www.php.net/manual/en/pdo.pgsqlcopytoarray.php
@param string $tableName <p>
String containing table name
</p>
@param string $separator <p>
Separator used in rows
</p>
@param string $nullAs <p>
How to interpret null values
</p>
@param string|null $fields <p>
List of fields to insert
</p>
@return array|false returns an array of rows, or <b>FALSE</b> on failure. | pgsqlCopyToArray | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlCopyToFile($tableName, $filename, $separator = "\t", $nullAs = "\\\\N", $fields = null) {} | (PHP 5 >= 5.3.3, PHP 7, PHP 8)<br/>
Copy data from table into file
@link https://www.php.net/manual/en/pdo.pgsqlcopytofile.php
@param string $tableName <p>
String containing table name
</p>
@param string $filename <p>
Filename to export data
</p>
@param string $separator <p>
Separator used in file specified by <i>filename</i>
</p>
@param string $nullAs <p>
How to interpret null values
</p>
@param string|null $fields <p>
List of fields to insert
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | pgsqlCopyToFile | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlLOBCreate() {} | (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2)<br/>
Creates a new large object
@link https://www.php.net/manual/en/pdo.pgsqllobcreate.php
@return string|false returns the OID of the newly created large object on success,
or <b>FALSE</b> on failure. | pgsqlLOBCreate | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlLOBOpen($oid, $mode = "rb") {} | (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2)<br/>
Opens an existing large object stream
@link https://www.php.net/manual/en/pdo.pgsqllobopen.php
@param string $oid <p>
A large object identifier.
</p>
@param string $mode <p>
If mode is r, open the stream for reading. If mode is w, open the stream for writing.
</p>
@return resource|false returns a stream resource on success or <b>FALSE</b> on failure. | pgsqlLOBOpen | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlLOBUnlink($oid) {} | (PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL pdo_pgsql >= 1.0.2)<br/>
Deletes the large object
@link https://www.php.net/manual/en/pdo.pgsqllobunlink.php
@param string $oid <p>
A large object identifier.
</p>
@return bool <b>TRUE</b> on success or <b>FALSE</b> on failure. | pgsqlLOBUnlink | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlGetNotify($fetchMode = PDO::FETCH_DEFAULT, $timeoutMilliseconds = 0) {} | (PHP 5 >= 5.6.0, PHP 7, PHP 8)<br/>
Get asynchronous notification
@link https://www.php.net/manual/en/pdo.pgsqlgetnotify.php
@param int $fetchMode <p>
The format the result set should be returned as, represented as a <b>PDO::FETCH_*</b> constant.
</p>
@param int $timeoutMilliseconds <p>
The length of time to wait for a response, in milliseconds.
</p>
@return array|false if one or more notifications is pending, returns a single row,
with fields message and pid, otherwise <b>FALSE</b>. | pgsqlGetNotify | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function pgsqlGetPid() {} | (PHP 5 >= 5.6.0, PHP 7, PHP 8)<br/>
Get the server PID
@link https://www.php.net/manual/en/pdo.pgsqlgetpid.php
@return int The server's PID. | pgsqlGetPid | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
public function lobOpen(string $oid, string $mode = "rb") {} | Opens an existing large object stream. Must be called inside a transaction.
@return resource|false | lobOpen | php | JetBrains/phpstorm-stubs | PDO/PDO.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php | Apache-2.0 |
function shmop_open(int $key, string $mode, int $permissions, int $size) {} | Create or open shared memory block
@link https://php.net/manual/en/function.shmop-open.php
@param int $key <p>
System's id for the shared memory block.
Can be passed as a decimal or hex.
</p>
@param string $mode <p>
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</p>
@param int $permissions <p>
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 0644
</p>
@param int $size <p>
The size of the shared memory block you wish to create in bytes
</p>
@return resource|false|Shmop On success <b>shmop_open</b> will return an id that you can
use to access the shared memory segment you've created. <b>FALSE</b> is
returned on failure. | shmop_open | php | JetBrains/phpstorm-stubs | shmop/shmop.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/shmop/shmop.php | Apache-2.0 |
function shmop_read(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop, int $offset, int $size) {}
/**
* Close shared memory block
* @link https://php.net/manual/en/function.shmop-close.php
* @param Shmop|resource $shmop <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return void No value is returned.
*/
#[Deprecated(since: '8.0')]
function shmop_close(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): void {}
/**
* Get size of shared memory block
* @link https://php.net/manual/en/function.shmop-size.php
* @param Shmop|resource $shmop <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return int an int, which represents the number of bytes the shared memory
* block occupies.
*/
function shmop_size(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): int {}
/**
* Write data into shared memory block
* @link https://php.net/manual/en/function.shmop-write.php
* @param Shmop|resource $shmop <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @param string $data <p>
* A string to write into shared memory block
* </p>
* @param int $offset <p>
* Specifies where to start writing data inside the shared memory
* segment.
* </p>
* @return int|false The size of the written <i>data</i>, or <b>FALSE</b> on
* failure.
*/
#[LanguageLevelTypeAware(["8.0" => "int"], default: "int|false")]
function shmop_write(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop, string $data, int $offset) {}
/**
* Delete shared memory block
* @link https://php.net/manual/en/function.shmop-delete.php
* @param Shmop|resource $shmop <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function shmop_delete(#[LanguageLevelTypeAware(["8.0" => "Shmop"], default: "resource")] $shmop): bool {}
/**
* @since 8.0
*/
final class Shmop {} | Read data from shared memory block
@link https://php.net/manual/en/function.shmop-read.php
@param Shmop|resource $shmop <p>
The shared memory block identifier created by
<b>shmop_open</b>
</p>
@param int $offset <p>
Offset from which to start reading
</p>
@param int $size <p>
The number of bytes to read
</p>
@return string|false the data or <b>FALSE</b> on failure. | shmop_read | php | JetBrains/phpstorm-stubs | shmop/shmop.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/shmop/shmop.php | Apache-2.0 |
public static function hasAlgorithm($algorithm) {} | Finds out whether algorithm exists
@param string $algorithm
@return bool | hasAlgorithm | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public static function hasMode($mode) {} | Finds out whether the cipher mode is defined in the used OpenSSL library
@param int $mode
@return bool | hasMode | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public static function __callStatic($name, $arguments) {} | Cipher magic method for calling static methods
@param string $name
@param array $arguments | __callStatic | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function getAlgorithmName() {} | Returns cipher algorithm string
@return string | getAlgorithmName | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function decrypt($data, $key, $iv = null) {} | Decrypts ciphertext to decrypted text
@param string $data
@param string $key
@param string $iv
@return string | decrypt | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function setAAD($aad) {} | Sets additional application data for authenticated encryption
@param string $aad
@return bool | setAAD | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function digest() {} | Return hash digest in raw foramt
@return string | digest | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function hexdigest() {} | Return hash digest in hex format
@return string | hexdigest | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function __construct($algorithm, $key) {} | Create a MAC (used by MAC subclasses - HMAC and CMAC)
@param string $algorithm
@param string $key | __construct | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function encode($data) {} | Encodes string $data to base64 encoding
@param string $data
@return string | encode | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function decode($data) {} | Decodes base64 string $data to raw encoding
@param string $data
@return string | decode | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function encodeUpdate($data) {} | Encodes block of characters from $data and saves the reminder of the last block
to the encoding context
@param string $data | encodeUpdate | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function encodeFinish() {} | Encodes characters that left in the encoding context | encodeFinish | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function decodeUpdate($data) {} | Decodes block of characters from $data and saves the reminder of the last block
to the encoding context
@param string $data | decodeUpdate | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public function decodeFinish() {} | Decodes characters that left in the encoding context | decodeFinish | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public static function seed($buf, $entropy) {} | Mixes bytes in $buf into PRNG state
@param string $buf
@param float $entropy [optional] The default value is (float) strlen($buf)
@return null | seed | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public static function loadFile($filename, $max_bytes = -1) {} | Reads a number of bytes from file $filename and adds them to the PRNG. If
max_bytes is non-negative, up to to max_bytes are read; if $max_bytes is
negative, the complete file is read
@param string $filename
@param int $max_bytes
@return int | loadFile | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
public static function writeFile($filename) {} | Writes a number of random bytes (currently 1024) to file $filename which can be
used to initializethe PRNG by calling Crypto\Rand::loadFile() in a later session
@param string $filename
@return int | writeFile | php | JetBrains/phpstorm-stubs | crypto/crypto.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/crypto/crypto.php | Apache-2.0 |
function ssh2_connect($host, $port = 22, ?array $methods = null, ?array $callbacks = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Connect to an SSH server
@link https://php.net/manual/en/function.ssh2-connect.php
@param string $host <p>
</p>
@param int $port [optional] <p>
</p>
@param null|array $methods [optional] <p>
methods may be an associative array with up to four parameters
as described below.
</p>
<p>
<table>
methods may be an associative array
with any or all of the following parameters.
<tr valign="top">
<td>Index</td>
<td>Meaning</td>
<td>Supported Values*</td>
</tr>
<tr valign="top">
<td>kex</td>
<td>
List of key exchange methods to advertise, comma separated
in order of preference.
</td>
<td>
diffie-hellman-group1-sha1,
diffie-hellman-group14-sha1, and
diffie-hellman-group-exchange-sha1
</td>
</tr>
<tr valign="top">
<td>hostkey</td>
<td>
List of hostkey methods to advertise, come separated
in order of preference.
</td>
<td>
ssh-rsa and
ssh-dss
</td>
</tr>
<tr valign="top">
<td>client_to_server</td>
<td>
Associative array containing crypt, compression, and
message authentication code (MAC) method preferences
for messages sent from client to server.
</td>
</tr>
<tr valign="top">
<td>server_to_client</td>
<td>
Associative array containing crypt, compression, and
message authentication code (MAC) method preferences
for messages sent from server to client.
</td>
</tr>
</table>
</p>
<p>
* - Supported Values are dependent on methods supported by underlying library.
See libssh2 documentation for additional
information.
</p>
<p>
<table>
client_to_server and
server_to_client may be an associative array
with any or all of the following parameters.
<tr valign="top">
<td>Index</td>
<td>Meaning</td>
<td>Supported Values*</td>
</tr>
<tr valign="top">
<td>crypt</td>
<td>List of crypto methods to advertise, comma separated
in order of preference.</td>
<td>
[email protected],
aes256-cbc,
aes192-cbc,
aes128-cbc,
3des-cbc,
blowfish-cbc,
cast128-cbc,
arcfour, and
none**
</td>
</tr>
<tr valign="top">
<td>comp</td>
<td>List of compression methods to advertise, comma separated
in order of preference.</td>
<td>
zlib and
none
</td>
</tr>
<tr valign="top">
<td>mac</td>
<td>List of MAC methods to advertise, come separated
in order of preference.</td>
<td>
hmac-sha1,
hmac-sha1-96,
hmac-ripemd160,
[email protected], and
none**
</td>
</tr>
</table>
</p>
<p>
Crypt and MAC method "none"
<p>
For security reasons, none 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.
</p>
</p>
@param null|array $callbacks [optional] <p>
callbacks may be an associative array with any
or all of the following parameters.
<table>
Callbacks parameters
<tr valign="top">
<td>Index</td>
<td>Meaning</td>
<td>Prototype</td>
</tr>
<tr valign="top">
<td>ignore</td>
<td>
Name of function to call when an
SSH2_MSG_IGNORE packet is received
</td>
<td>void ignore_cb($message)</td>
</tr>
<tr valign="top">
<td>debug</td>
<td>
Name of function to call when an
SSH2_MSG_DEBUG packet is received
</td>
<td>void debug_cb($message, $language, $always_display)</td>
</tr>
<tr valign="top">
<td>macerror</td>
<td>
Name of function to call when a packet is received but the
message authentication code failed. If the callback returns
true, the mismatch will be ignored, otherwise the connection
will be terminated.
</td>
<td>bool macerror_cb($packet)</td>
</tr>
<tr valign="top">
<td>disconnect</td>
<td>
Name of function to call when an
SSH2_MSG_DISCONNECT packet is received
</td>
<td>void disconnect_cb($reason, $message, $language)</td>
</tr>
</table>
</p>
@return resource|false a resource on success, or false on error. | ssh2_connect | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_disconnect($session) {} | (PECL ssh2 >= 1.0)<br/>
Close a connection to a remote SSH server
@link https://php.net/manual/en/function.ssh2-disconnect.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@return bool | ssh2_disconnect | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_methods_negotiated($session) {} | (PECL ssh2 >= 0.9.0)<br/>
Return list of negotiated methods
@link https://php.net/manual/en/function.ssh2-methods-negotiated.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@return array | ssh2_methods_negotiated | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_fingerprint($session, $flags = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Retrieve fingerprint of remote server
@link https://php.net/manual/en/function.ssh2-fingerprint.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param int $flags [optional] <p>
flags may be either of
SSH2_FINGERPRINT_MD5 or
SSH2_FINGERPRINT_SHA1 logically ORed with
SSH2_FINGERPRINT_HEX or
SSH2_FINGERPRINT_RAW.
</p>
@return string the hostkey hash as a string. | ssh2_fingerprint | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_auth_none($session, $username) {} | (PECL ssh2 >= 0.9.0)<br/>
Authenticate as "none"
@link https://php.net/manual/en/function.ssh2-auth-none.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $username <p>
Remote user name.
</p>
@return array|bool true if the server does accept "none" as an authentication
method, or an array of accepted authentication methods on failure. | ssh2_auth_none | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_auth_password($session, $username, $password) {} | (PECL ssh2 >= 0.9.0)<br/>
Authenticate over SSH using a plain password
@link https://php.net/manual/en/function.ssh2-auth-password.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $username <p>
Remote user name.
</p>
@param string $password <p>
Password for username
</p>
@return bool true on success or false on failure. | ssh2_auth_password | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Authenticate using a public key
@link https://php.net/manual/en/function.ssh2-auth-pubkey-file.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $username <p>
</p>
@param string $pubkeyfile <p>
</p>
@param string $privkeyfile <p>
</p>
@param string $passphrase [optional] <p>
If privkeyfile is encrypted (which it should
be), the passphrase must be provided.
</p>
@return bool true on success or false on failure. | ssh2_auth_pubkey_file | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase = null, $local_username = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Authenticate using a public hostkey
@link https://php.net/manual/en/function.ssh2-auth-hostbased-file.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $username <p>
</p>
@param string $hostname <p>
</p>
@param string $pubkeyfile <p>
</p>
@param string $privkeyfile <p>
</p>
@param string $passphrase [optional] <p>
If privkeyfile is encrypted (which it should
be), the passphrase must be provided.
</p>
@param string $local_username [optional] <p>
If local_username is omitted, then the value
for username will be used for it.
</p>
@return bool true on success or false on failure. | ssh2_auth_hostbased_file | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_shell($session, $term_type = null, ?array $env = null, $width = null, $height = null, $width_height_type = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Request an interactive shell
@link https://php.net/manual/en/function.ssh2-shell.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $term_type [optional] <p>
term_type should correspond to one of the
entries in the target system's /etc/termcap file.
</p>
@param null|array $env [optional] <p>
env may be passed as an associative array of
name/value pairs to set in the target environment.
</p>
@param null|int $width [optional] <p>
Width of the virtual terminal.
</p>
@param null|int $height [optional] <p>
Height of the virtual terminal.
</p>
@param null|int $width_height_type [optional] <p>
width_height_type should be one of
SSH2_TERM_UNIT_CHARS or
SSH2_TERM_UNIT_PIXELS.
</p>
@return resource | ssh2_shell | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_exec($session, $command, $pty = null, ?array $env = null, $width = null, $height = null, $width_height_type = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Execute a command on a remote server
@link https://php.net/manual/en/function.ssh2-exec.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $command <p>
</p>
@param null|string $pty [optional] <p>
</p>
@param null|array $env [optional] <p>
env may be passed as an associative array of
name/value pairs to set in the target environment.
</p>
@param null|int $width [optional] <p>
Width of the virtual terminal.
</p>
@param null|int $height [optional] <p>
Height of the virtual terminal.
</p>
@param null|int $width_height_type [optional] <p>
width_height_type should be one of
SSH2_TERM_UNIT_CHARS or
SSH2_TERM_UNIT_PIXELS.
</p>
@return resource|false a stream on success or false on failure. | ssh2_exec | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_tunnel($session, $host, $port) {} | (PECL ssh2 >= 0.9.0)<br/>
Open a tunnel through a remote server
@link https://php.net/manual/en/function.ssh2-tunnel.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $host <p>
</p>
@param int $port <p>
</p>
@return resource | ssh2_tunnel | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_scp_recv($session, $remote_file, $local_file) {} | (PECL ssh2 >= 0.9.0)<br/>
Request a file via SCP
@link https://php.net/manual/en/function.ssh2-scp-recv.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $remote_file <p>
Path to the remote file.
</p>
@param string $local_file <p>
Path to the local file.
</p>
@return bool true on success or false on failure. | ssh2_scp_recv | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_scp_send($session, $local_file, $remote_file, $create_mode = null) {} | (PECL ssh2 >= 0.9.0)<br/>
Send a file via SCP
@link https://php.net/manual/en/function.ssh2-scp-send.php
@param resource $session <p>
An SSH connection link identifier, obtained from a call to
ssh2_connect.
</p>
@param string $local_file <p>
Path to the local file.
</p>
@param string $remote_file <p>
Path to the remote file.
</p>
@param int $create_mode [optional] <p>
The file will be created with the mode specified by
create_mode.
</p>
@return bool true on success or false on failure. | ssh2_scp_send | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
function ssh2_fetch_stream($channel, $streamid) {} | (PECL ssh2 >= 0.9.0)<br/>
Fetch an extended data stream
@link https://php.net/manual/en/function.ssh2-fetch-stream.php
@param resource $channel <p>
</p>
@param int $streamid <p>
An SSH2 channel stream.
</p>
@return resource the requested stream resource. | ssh2_fetch_stream | php | JetBrains/phpstorm-stubs | ssh2/ssh2.php | https://github.com/JetBrains/phpstorm-stubs/blob/master/ssh2/ssh2.php | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.