phpstorm.dev

PHP ecosystem insights

PHP knowledge

Versioned PHP knowledge with primary sources and explicit verification dates.

Source checks through 2026-10-27 · 57 sources · This published snapshot is over 48 hours old.

Verified 2026-10-17 discussion Permanent entry

PDO binary parameter support proposal

Under discussion; not accepted. The RFC page (version 0.4, dated 2026-09-29, last modified 2026-10-16 at 19:47 UTC) and the official RFC index both list it as Under Discussion. Until 16 October both had listed it as Draft. The author opened the discussion on 2026-10-16 at 19:34 UTC. They asked for feedback in particular on MySQL and PostgreSQL behavior, and on whether the RFC should use a new data type or a flag. They said they want those points settled before a vote. The voting thread reads "tbd", and no vote has been scheduled. The proposed version is "Next PHP 8.x", so no specific version is named.

Proposal

The motivation is that PDO drivers handle binary data inconsistently: SQL Server via PDO_DBLIB needs special quoting, some ODBC drivers return a binary column bound as a string as hex, and some databases convert character encodings on string fetches. A binary column is not necessarily a LOB, and some drivers expect PDO::PARAM_LOB to be a stream.

The RFC offers two alternatives: a dedicated PDO::PARAM_BINARY data type (the next free value, 6), or a modifier flag (likely 0x10000000) combined with PDO::PARAM_STR or PDO::PARAM_LOB. It says the choice will be settled in discussion or, if that is unclear, by a vote. It notes possible effects on emulated prepares, PDO::ATTR_DEFAULT_STR_PARAM, PDO::ATTR_STRINGIFY_FETCHES and on what drivers report from getColumnMeta(). A proof-of-concept is php-src PR #11674.

The page has a primary vote that needs a 2/3 majority and a second vote on the approach (separate data type or flag). Both polls show zero votes and are marked closed. A reviewer points out that they still carry a 2026-01-01 close date. They are templates, not ballots.

Discussion

On 2026-10-16 at 20:43 UTC Ilia Alshanetsky posted a six-point review based on the current driver code:

This review is the account of one participant and has not been checked against driver source code here.

The author replied at 22:27 UTC the same day. They said they would answer some points then and research the rest over the next week:

The data type or flag choice remains open. As of 2026-10-17 04:01 UTC no newer RFC page revision had been collected.

Limitations: no target version is named, and the proof-of-concept PR was not reviewed. Related: 16 October 2026 digest, support windows.