File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ Errors/Exceptions
43
43
Example
44
44
-------
45
45
46
- The following example executes a :manual:`hello
47
- </reference/command/hello >` command, which returns a cursor with a single
46
+ The following example executes a :manual:`ping
47
+ </reference/command/ping >` command, which returns a cursor with a single
48
48
result document:
49
49
50
50
.. code-block:: php
@@ -53,32 +53,15 @@ result document:
53
53
54
54
$database = (new MongoDB\Client)->test;
55
55
56
- $cursor = $database->command(['hello ' => 1]);
56
+ $cursor = $database->command(['ping ' => 1]);
57
57
58
58
var_dump($c->toArray()[0]);
59
59
60
60
The output would resemble::
61
61
62
62
object(MongoDB\Model\BSONDocument)#11 (1) {
63
63
["storage":"ArrayObject":private]=>
64
- array(8) {
65
- ["isWritablePrimary"]=>
66
- bool(true)
67
- ["maxBsonObjectSize"]=>
68
- int(16777216)
69
- ["maxMessageSizeBytes"]=>
70
- int(48000000)
71
- ["maxWriteBatchSize"]=>
72
- int(1000)
73
- ["localTime"]=>
74
- object(MongoDB\BSON\UTCDateTime)#3 (1) {
75
- ["milliseconds"]=>
76
- string(13) "1477608046464"
77
- }
78
- ["maxWireVersion"]=>
79
- int(4)
80
- ["minWireVersion"]=>
81
- int(0)
64
+ array(1) {
82
65
["ok"]=>
83
66
float(1)
84
67
}
You can’t perform that action at this time.
0 commit comments