Hi,

On 02/12/2016 15:20, Thomas Nunninger wrote:
>> Could you please explain what's the use case? As far as I'm concerned
>> such information would only be useful during PDO driver development,
>> phpt files and bug reporting / fixing.
> 
> Sometimes I'd like to log what SQL is really used that I can
> analyze/modify a query without the need to replace all bound parameters
> manually before applying it to the command line of my database.
> 
> Additionally, it's a matter of good style in my opinion. E.g. if you
> return an array you can extend the structure later. If some test checks
> a string output you have to change this. If it checks the values of some
> array keys, the test is stable as long as you just add new keys.

Your planned usage only applies if you use emulated prepared statements,
so it's not really something one should depend on.

That said, alas the only debug facility in PDO prints directly to
output. Version 1 of this RFC added something completely different and
v2 fixes it re-using what PDO already has.

If you ask me, what PDO offers sucks, but that's what we've got and
improving it is out of scope for this RFC. Anyone could create a new RFC
to add array output to debugDumpParams, that would be most welcome.


Cheers
-- 
Matteo Beccati

Development & Consulting - http://www.beccati.com/

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to