Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2019-08-12 03:06:21 +0300
committermichael-grunder <michael.grunder@gmail.com>2019-08-12 03:06:21 +0300
commitb9dece2baf6a5c790f12f60415d5ca107136e23b (patch)
treed8faeb71fb019a4574e63f062c6dee9ddabb4596 /README.markdown
parenta98a3fbd2054d6b22c6a69eed2d8b5d76d42096c (diff)
Update PING documentation
Related to #1619
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown21
1 files changed, 15 insertions, 6 deletions
diff --git a/README.markdown b/README.markdown
index ed5bf83b..11579a54 100644
--- a/README.markdown
+++ b/README.markdown
@@ -356,17 +356,26 @@ $redis->getOption(Redis::OPT_SERIALIZER);
### ping
-----
-_**Description**_: Check the current connection status
+_**Description**_: Check the current connection status.
-##### *Parameters*
-
-(none)
+##### *Prototype*
+~~~php
+$redis->ping([string $message]);
+~~~
##### *Return value*
+*Mixed*: This method returns `TRUE` on success, or the passed string if called with an argument.
-*BOOL*: `TRUE` in case of success. Throws a [RedisException](#class-redisexception) object on connectivity error, as described above.
+##### *Example*
+~~~php
+/* When called without an argument, PING returns `TRUE` */
+$redis->ping();
+
+/* If passed an argument, that argument is returned. Here 'hello' will be returned */
+$redis->ping('hello');
+~~~
-Staring from version 5.0.0, the command returns boolean `TRUE` instead of *STRING* `+PONG` as in previous versions.
+*Note*: Prior to PhpRedis 5.0.0 this command simply returned the string `+PONG`.
### echo
-----