Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85938 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33433 invoked from network); 24 Apr 2015 08:00:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2015 08:00:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.44 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.44 mail-wg0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:34393] helo=mail-wg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CB/A1-19336-C28F9355 for ; Fri, 24 Apr 2015 04:00:45 -0400 Received: by wgso17 with SMTP id o17so42202572wgs.1 for ; Fri, 24 Apr 2015 01:00:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iLX89Ey9qPp+WykDBm4EikzhV1rDp2r5abms/g1l+yg=; b=GRwz71grrC2zjvuN5h3YAaGE+xnejLGL0VWNI5QMZhjq/YggbmE52S3WtBydlJ+p/w 168keJSd1jR+XP73aWYFMv3ilL5nUBB6SbFnjuMb5nFRL5C4X21BV5aomUQjfZyOwrmi 2WYMpmi11wVbESiiTlp/8dugg7kvcqJGm+Hh+barWOxohIPI309bgK+uNh48XhgNDsva 5+x6RCjNwMsMtqjL9lapPnrZfuAE6R7cMYX0WdtbbZxRu211Y4zykhUEErg+BZ/aaxkz jJAQ2zkRLNfCDPasDJIg3AtO8zcp4+7tEPhsRmdQYvYmdXmxKAwyC0kj8Gxv+F6IR+2s 884g== X-Gm-Message-State: ALoCoQmF6hEq0LeRb4umbBFuC3GNwlow8bAylkl0UIJO97iP1mqnDKXAwA9EDLk8WJ0S9mN9pnjX MIME-Version: 1.0 X-Received: by 10.194.179.194 with SMTP id di2mr13162001wjc.4.1429862442113; Fri, 24 Apr 2015 01:00:42 -0700 (PDT) Received: by 10.194.164.233 with HTTP; Fri, 24 Apr 2015 01:00:41 -0700 (PDT) X-Originating-IP: [77.11.26.54] In-Reply-To: References: <5537826A.9010209@gmx.de> <5538881C.8010502@oracle.com> <5538C2A7.4050600@lsces.co.uk> <5538CF4B.5090401@beccati.com> <5538D9B0.5020507@lsces.co.uk> Date: Fri, 24 Apr 2015 10:00:41 +0200 Message-ID: To: Arvids Godjuks Cc: PHP internals Content-Type: multipart/alternative; boundary=089e01419d1cf0af27051473ca53 Subject: Re: [PHP-DEV] Re: PDO Oracle driver From: kontakt@beberlei.de (Benjamin Eberlei) --089e01419d1cf0af27051473ca53 Content-Type: text/plain; charset=UTF-8 On Fri, Apr 24, 2015 at 8:16 AM, Arvids Godjuks wrote: > 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei : > >> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks > > >> 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). > You may question my sanity, but I am totally serious. > > 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. > None of these will happen, because PDO doesnt add much value on top of what the libraries already provide. For example MySQLi, pgsql, oci8 allready handle charsets, we only need to delegate correctly. See this very hacky prototype for PDO::prepare/query/bindValue/execute using a to be exposed API for emulated prepares in PHP code (extracted from existing PDO code). https://gist.github.com/beberlei/3dfa960901533e859c02 This is a very thin layer of PHP and given PHP7 is already twice as fast as PHP5 i don't think anyone would suffer. --089e01419d1cf0af27051473ca53--