Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27392 invoked from network); 2 Dec 2016 22:43:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2016 22:43:49 -0000 X-Host-Fingerprint: 83.199.219.163 LFbn-1-13020-163.w83-199.abo.wanadoo.fr Received: from [83.199.219.163] ([83.199.219.163:28305] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/B1-01781-429F1485 for ; Fri, 02 Dec 2016 17:43:49 -0500 To: internals@lists.php.net Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: <758680d9-cfe2-4a93-3831-7aa03b4bc9db@nunninger.info> Date: Fri, 02 Dec 2016 23:43:06 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/1.0 (Win32) X-Posted-By: 83.199.219.163 Subject: Re: [PHP-DEV] Re: [RFC] Debugging PDO Prepared Statement Emulation v2 From: bensor987@neuf.fr ("Benoit Schildknecht") Le Fri, 02 Dec 2016 14:54:04 +0100, Matteo Beccati a = =C3=A9crit: > On 02/12/2016 08:36, Thomas Nunninger wrote: >> Hi, >> >>> So, if I only want to get the emulated prepared statement, I have to= do >>> ob_start()/ob_get_clean(), then use a regexp to fetch it ? I want v1= >>> back T_T >> >> I second that. Why do you print it directly? Wouldn't it be better to= >> return a structured array with the information needed? If needed, you= >> can var_dump() the array yourself. > > 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. > > > Cheers It's pretty simple : debugging and optimizing scripts and statements. I'= ve = lost hours, manually emulating tons of statements, or trying to guess = what's happening when I have something like 1000+ prepared values (mass = = insert). And since I have to do it by hand, mistakes happen, so I lose = even more time debugging my emulations. Having a direct access to the = emulated statements, without having to dirtily parse a dump, will be a = huge plus for me, my team and the performances of my debug component.