[DOC-CVS] [doc-en] master: constants.fetch-modes.xml Fix the call sequence (#5361)
[email protected] (Mikhail Alferov via GitHub) Mon, 20 Apr 2026 23:57:56 +0000
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Mikhail Alferov (mmalferov)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2026-04-21T00:57:54+01:00
Commit: https://github.com/php/doc-en/commit/581589d2c4d3183f1c0e67214a65cbd181a5edac
Raw diff: https://github.com/php/doc-en/commit/581589d2c4d3183f1c0e67214a65cbd181a5edac.diff
constants.fetch-modes.xml Fix the call sequence (#5361)
Thank you. Sorry, I don't know why it hasn't been merged yet.
Changed paths:
M reference/pdo/constants.fetch-modes.xml
Diff:
diff --git a/reference/pdo/constants.fetch-modes.xml b/reference/pdo/constants.fetch-modes.xml
index 97118099d952..9ea4dbc81c44 100644
--- a/reference/pdo/constants.fetch-modes.xml
+++ b/reference/pdo/constants.fetch-modes.xml
@@ -1061,6 +1061,7 @@ while ($stmt->fetch(\PDO::FETCH_BOUND)) {
<programlisting role="php">
<![CDATA[
<?php
+
class TestEntity
{
public $userid;
@@ -1073,10 +1074,12 @@ class TestEntity
}
$obj = new TestEntity();
-$stmt->setFetchMode(\PDO::FETCH_INTO, $obj);
$stmt = $db->query("SELECT userid, name, country, referred_by_userid FROM users");
+
+$stmt->setFetchMode(\PDO::FETCH_INTO, $obj);
$result = $stmt->fetch();
+
var_dump($result);
]]>
</programlisting>