Skip to content

Commit c664ed2

Browse files
DOC-4520 added >>> before output comments
1 parent 4713f69 commit c664ed2

File tree

1 file changed

+10
-10
lines changed
  • content/develop/connect/clients

1 file changed

+10
-10
lines changed

content/develop/connect/clients/php.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ Store and retrieve a simple string to test the connection:
5656

5757
```php
5858
echo $r->set('foo', 'bar'), PHP_EOL;
59-
// OK
59+
// >>> OK
6060

6161
echo $r->get('foo'), PHP_EOL;
62-
// bar
62+
// >>> bar
6363
```
6464

6565
Store and retrieve a [hash]({{< relref "/develop/data-types/hashes" >}})
@@ -100,7 +100,7 @@ $options = ['cluster' => 'redis'];
100100
$rc = new PredisClient($clusterNodes, $options);
101101

102102
echo $rc->cluster('nodes'), PHP_EOL;
103-
/*
103+
/* >>>
104104
d8773e888e92d015b7c52fc66798fd6815afefec 127.0.0.1:30004@40004 slave cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 0 1730713764217 1 connected
105105
58fe1346de4c425d60db24e9b153926fbde0d174 127.0.0.1:30002@40002 master - 0 1730713763361 2 connected 5461-10922
106106
015ecc8148a05377dda22f19921d16efcdd6d678 127.0.0.1:30006@40006 slave c019b75d8b52e83e7e52724eccc716ac553f71d6 0 1730713764218 3 connected
@@ -110,9 +110,9 @@ cde97d1f7dce13e9253ace5cafd3fb0aa67cda63 127.0.0.1:30001@40001 master - 0 173071
110110
*/
111111

112112
echo $rc->set('foo', 'bar'), PHP_EOL;
113-
// OK
113+
// >>> OK
114114
echo $rc->get('foo'), PHP_EOL;
115-
// bar
115+
// >>> bar
116116
```
117117

118118
## Connect to your production Redis with TLS
@@ -159,9 +159,9 @@ $options = [
159159
$tlsConnection = new PredisClient($options);
160160

161161
echo $tlsConnection->set('foo', 'bar'), PHP_EOL;
162-
// OK
162+
// >>> OK
163163
echo $tlsConnection->get('foo'), PHP_EOL;
164-
// bar
164+
// >>> bar
165165
```
166166

167167
## Example: Indexing and querying JSON documents
@@ -269,7 +269,7 @@ and have an `age` value in the range 30 to 40:
269269
```php
270270
$res = $r->ftSearch("idx:users", "Paul @age:[30 40]");
271271
echo json_encode($res), PHP_EOL;
272-
// [1,"user:3",["$","{\"name\":\"Paul Zamir\",\"email\":\"[email protected]\",\"age\":35,\"city\":\"London\"}"]]
272+
// >>> [1,"user:3",["$","{\"name\":\"Paul Zamir\",\"email\":\"[email protected]\",\"age\":35,\"city\":\"London\"}"]]
273273
```
274274

275275
Specify query options to return only the `city` field:
@@ -283,7 +283,7 @@ $arguments->limit(0, 5);
283283
$res = $r->ftSearch("idx:users", "Paul", $arguments);
284284

285285
echo json_encode($res), PHP_EOL;
286-
// [2,"user:1",["thecity","London"],"user:3",["thecity","Tel Aviv"]]
286+
// >>> [2,"user:1",["thecity","London"],"user:3",["thecity","Tel Aviv"]]
287287
```
288288

289289
Use an
@@ -297,7 +297,7 @@ $ftAggregateArguments = (new AggregateArguments())
297297

298298
$res = $r->ftAggregate('idx:users', '*', $ftAggregateArguments);
299299
echo json_encode($res), PHP_EOL;
300-
// [2,["city","London","count","1"],["city","Tel Aviv","count","2"]]
300+
// >>> [2,["city","London","count","1"],["city","Tel Aviv","count","2"]]
301301
```
302302

303303
See the [Redis query engine]({{< relref "/develop/interact/search-and-query" >}}) docs

0 commit comments

Comments
 (0)