mirror of
https://github.com/php-win-ext/phpredis.git
synced 2026-03-24 00:52:16 +01:00
Add details to the option doc block
This commit is contained in:
committed by
Michael Grunder
parent
29e5cf0d8c
commit
abb0f6ccc8
@@ -155,6 +155,25 @@ class Redis {
|
||||
* @var int
|
||||
* @cvalue REDIS_OPT_PACK_IGNORE_NUMBERS
|
||||
*
|
||||
* When enabled, this option tells PhpRedis to ignore purely numeric values
|
||||
* when packing and unpacking data. This does not include numeric strings.
|
||||
* If you want numeric strings to be ignored, typecast them to an int or float.
|
||||
*
|
||||
* The primary purpose of this option is to make it more ergonomic when
|
||||
* setting keys that will later be incremented or decremented.
|
||||
*
|
||||
* Note: This option incurs a small performance penalty when reading data
|
||||
* because we have to see if the data is a string representation of an int
|
||||
* or float.
|
||||
*
|
||||
* @example
|
||||
* $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);
|
||||
* $redis->setOption(Redis::OPT_PACK_IGNORE_NUMBERS, true);
|
||||
*
|
||||
* $redis->set('answer', 32);
|
||||
*
|
||||
* var_dump($redis->incrBy('answer', 10)); // int(42)
|
||||
* var_dump($redis->get('answer')); // int(42)
|
||||
*/
|
||||
public const OPT_PACK_IGNORE_NUMBERS = UNKNOWN;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 78283cf59cefb411c09adf7a0f0bd234c65327b3 */
|
||||
* Stub hash: 3c4051fdd9f860523bcd72aba260b1af823d1d9c */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 78283cf59cefb411c09adf7a0f0bd234c65327b3 */
|
||||
* Stub hash: 3c4051fdd9f860523bcd72aba260b1af823d1d9c */
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
|
||||
ZEND_ARG_INFO(0, options)
|
||||
|
||||
Reference in New Issue
Block a user