> > There's value in improving tests for emulated prepares, but as I stated > somewhere else, I would rather see them deprecated and removed rather > than encouraged. >
I left a note about this in the "Future Scope" section[1]. If we deprecate emulated prepares, it would make sense to deprecate PDOStatement::activeQueryString() at the same time, since their utility is intertwined. But as long as pdo_dblib is supported, the possibility of deprecating emulated prepares shouldn't get in the way of being able to support it. I thought about having PDOStatement::activeQueryString() trigger an error and/or return false if emulated prepares aren't enabled. This would make the usage clearer, but I thought it would be best to limit the side effects of a debug tool. Besides, I gather that FreeTDS also supports them since quite a long > time, so I don't see why pdo_dblib should exclusively use and promote > usage of emulated prepares. > FreeTDS supports them, but not through the DB-Library API. The other APIs[2] implemented by FreeTDS support prepared statements. --- [1] https://wiki.php.net/rfc/debugging_pdo_prepared_ statement_emulation#future_scope [2] http://www.freetds.org/which_api.html