On 24/04/15 07:16, Arvids Godjuks wrote:
> 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei <kont...@beberlei.de>:
> 
>> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks <arvids.godj...@gmail.com>
>> wrote:
>>
>>> PDO is everywhere. Doctrine? Based on PDO.
>>
>>
>> You can use mysqli, oci8 or sqlsrv for example without problems in
>> Doctrine.
>>
>> Exposing some of the internal api of PDO as php functions (SQL Parser) I
>> would bet it is possible to reimplement PDO in PHP code using mysqli etc..
>> as "drivers".
>>
>> I think we could discuss going that road as well and we could save
>> ourselves maintaining some thousands of lines of C code.
> 
> May I question the sanity of the words written in this email? :D (it's a
> joke).
> 
> The whole point of mysqlnd drivers and other improvements was to cut down
> on data copying, improving performance and doing a lot of other stuff.
> Moving PDO to a PHP implementation will kill it all: preformance will
> suffer, memory usage will skyrocket, dealing with charsets - I don't even
> wana pretend I understand how to deal with that part in a proper fasion.
> Doesn't it require access to internal PHP api's to do a lot of what PDO and
> other native drivers do?
> Well, the Zephyr could pitch in here, MAYBE, depending on how good it
> actually is and what it can do, but still, it feels more like a cruch to me.

Via ADOdb I can use either the PDO or the generic driver. It's actually
how I've been testing pdo_firebird simply by switching the underlying
interface. Much of what PDO is doing is actually no different to the
generic driver as at the end of the day you want an array of data from
one location to another. My own concern has been that all this debate on
'type hints' actually messes up the simple array process where we just
get an array of strings which PHP then uses appropriately. But the
bottom line is perhaps that PDO's 'flattening' of data types can slow
down the process if it introduces conversions which are not really
necessary? In the case of ADOdb, the PDO driver is slower than the
generic driver, which some will say is down to the overheads of ADOdb,
but those overheads in many cases are only the same as any other SQL
abstraction layer. The overall process is what matters, and if you don't
need SQL abstraction, is there any advantage to PDO over the generic
driver if you are only ever using one database? The theory was that
having the same data layer would simplify software design, but it just
introduces another layer of complication.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

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

Reply via email to