[doc-en] master: PDO: update constants type from int to bool for PHP 8.4.0 (#5593)
| From: | Jordi Kroon via GitHub | Date: | Mon, 08 Jun 2026 20:39:47 +0000 |
| Subject: | [doc-en] master: PDO: update constants type from int to bool for PHP 8.4.0 (#5593) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23362@lists.php.net to get a copy of this message | ||
Author: Jordi Kroon (jordikroon)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-06-08T22:39:33+02:00
Commit: https://github.com/php/doc-en/commit/5d8e96f9b174f7471daebce760657eb0f190b0ba
Raw diff: https://github.com/php/doc-en/commit/5d8e96f9b174f7471daebce760657eb0f190b0ba.diff
PDO: update constants type from int to bool for PHP 8.4.0 (#5593)
* update PDO constants type from int to bool for PHP 8.4.0
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
Changed paths:
M reference/pdo/constants.xml
M reference/pdo_dblib/pdo-dblib.xml
M reference/pdo_mysql/constants.xml
Diff:
diff --git a/reference/pdo/constants.xml b/reference/pdo/constants.xml
index 951a0a656920..36d98257f991 100644
--- a/reference/pdo/constants.xml
+++ b/reference/pdo/constants.xml
@@ -226,13 +226,17 @@
<varlistentry xml:id="pdo.constants.attr-autocommit">
<term>
<constant>PDO::ATTR_AUTOCOMMIT</constant>
- (<type>int</type>)
+ (<type>bool</type>)
</term>
<listitem>
<simpara>
If this value is &false;, PDO attempts to disable autocommit so that the
connection begins a transaction.
</simpara>
+ <simpara>
+ As of PHP 8.4.0 this constant is typed as <type>bool</type>; previously,
+ it was typed as <type>int</type>.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.attr-prefetch">
@@ -484,11 +488,19 @@
<varlistentry xml:id="pdo.constants.attr-emulate-prepares">
<term>
<constant>PDO::ATTR_EMULATE_PREPARES</constant>
- (<type>int</type>)
+ (<type>bool</type>)
</term>
<listitem>
<simpara>
-
+ Whether to enable or disable emulation of prepared statements. Some drivers
+ either do not support native prepared statements or have only limited
+ support for them. When set to &true;, PDO always emulates prepared
+ statements; when set to &false;, it uses the driver's native prepared
+ statements.
+ </simpara>
+ <simpara>
+ As of PHP 8.4.0 this constant is typed as <type>bool</type>; previously,
+ it was typed as <type>int</type>.
</simpara>
</listitem>
</varlistentry>
diff --git a/reference/pdo_dblib/pdo-dblib.xml b/reference/pdo_dblib/pdo-dblib.xml
index becde341e278..f6a64d832114 100644
--- a/reference/pdo_dblib/pdo-dblib.xml
+++ b/reference/pdo_dblib/pdo-dblib.xml
@@ -52,7 +52,7 @@
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
- <type>int</type>
+ <type>bool</type>
<varname
linkend="pdo-dblib.constants.attr-stringify-uniqueidentifier">Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER</varname>
</fieldsynopsis>
<fieldsynopsis>
@@ -76,7 +76,7 @@
<fieldsynopsis>
<modifier>public</modifier>
<modifier>const</modifier>
- <type>int</type>
+ <type>bool</type>
<varname
linkend="pdo-dblib.constants.attr-datetime-convert">Pdo\Dblib::ATTR_DATETIME_CONVERT</varname>
</fieldsynopsis>
@@ -114,6 +114,8 @@
<term><constant>Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER</constant></term>
<listitem>
<simpara>
+ As of PHP 8.4.0 this constant is typed as <type>bool</type>; previously,
+ it was typed as <type>int</type>.
</simpara>
</listitem>
</varlistentry>
@@ -150,6 +152,10 @@
format, as specified in the FreeTDS <filename>locales.conf</filename>
file. By default, this attribute is &false;.
</simpara>
+ <simpara>
+ As of PHP 8.4.0 this constant is typed as <type>bool</type>; previously,
+ it was typed as <type>int</type>.
+ </simpara>
</listitem>
</varlistentry>
</variablelist>
diff --git a/reference/pdo_mysql/constants.xml b/reference/pdo_mysql/constants.xml
index d66dc0c52efe..935bed3eed19 100644
--- a/reference/pdo_mysql/constants.xml
+++ b/reference/pdo_mysql/constants.xml
@@ -85,12 +85,16 @@
<varlistentry xml:id="pdo.constants.mysql-attr-direct-query">
<term>
<constant>PDO::MYSQL_ATTR_DIRECT_QUERY</constant>
- (<type>int</type>)
+ (<type>bool</type>)
</term>
<listitem>
<simpara>
&Alias; <constant>PDO::ATTR_EMULATE_PREPARES</constant>
</simpara>
+ <simpara>
+ As of PHP 8.4.0 this constant is typed as <type>bool</type>; previously,
+ it was typed as <type>int</type>.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="pdo.constants.mysql-attr-found-rows">