Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33191 invoked from network); 18 May 2017 10:21:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2017 10:21:45 -0000 Authentication-Results: pb1.pair.com header.from=adam.baratz@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam.baratz@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.174 as permitted sender) X-PHP-List-Original-Sender: adam.baratz@gmail.com X-Host-Fingerprint: 209.85.216.174 mail-qt0-f174.google.com Received: from [209.85.216.174] ([209.85.216.174:33205] helo=mail-qt0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/60-23431-E947D195 for ; Thu, 18 May 2017 06:17:02 -0400 Received: by mail-qt0-f174.google.com with SMTP id t26so30125863qtg.0 for ; Thu, 18 May 2017 03:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HEGB5+kWOmOM3pCUkXO3tSQGQHoVQwdhdtsY/hG0AXo=; b=lRgJouEXIiiVwDuMBHvcxHxjHbkEQ9d0OUnYKeK9cnGoN3Tcony1ZWZ3W4KInPv95y iNts2+uf9VhNP5kpzt5b1gvLsKFTSw8G3MPrhKM8Q1abd2pJUs+viccsPhRL56q9+A+9 xDcspDqhlDRZTcPue+0Of5KtBkJDXyex7R0Mh8yzcIKDLqpAPmf1IT6Vn1UTSdFzHyOZ kDZCLimGcYFQJNWszgSWkr1o1pFbZsZMF1qJg6saOL57BH6C/YuIpFXcAEv8N7NjLLul hoSL3labXJ9VoJhVJy9hTryBlhi41jHTJN/HnplqblkEIiOL8OSHQpP0CejucqfBO8rI yVdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HEGB5+kWOmOM3pCUkXO3tSQGQHoVQwdhdtsY/hG0AXo=; b=XMr4S8iKcaBJbuku6J8N0llneR5V8S3GOpKXGcffHgqv2j11IT4LfHl+QJXx6iIukI lSES4yvReB6cuRarFrfPC7Ax1zJThhUWFTVpbfd7Q9rIM3dws0xugCQv4FdcjmPdFRgR b3BS5CuY22nWC/r9luaUos7H62qiZtug22G23AfyhVMWR0dqJaR8Bs2cFV9E3cMDEg+a yOxZepe6k/Fze0AA6TMoyqMj91aafq7CyL3hmFj8QKn0ISq5/prHFcAvEqVkr+cSKWJ9 H+Obubb4BaVOBA8Wwkfc/AEbCQT/k+37vnC4G0x7el5wFrvCmNIc69XRqu+XEEtl9WNa 9ucw== X-Gm-Message-State: AODbwcAVmxvVLJbYlJNBT81uY4cXsMIUPDsSx0eoVDOPa4AwWazbxTj1 5D2xo6hEiN239zaPFNw22uYcUcNAnikMh5A= X-Received: by 10.237.36.154 with SMTP id t26mr3262653qtc.180.1495102619410; Thu, 18 May 2017 03:16:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.27 with HTTP; Thu, 18 May 2017 03:16:58 -0700 (PDT) In-Reply-To: <94cdf88b-9933-a72d-d351-546da495d4ab@beccati.com> References: <94cdf88b-9933-a72d-d351-546da495d4ab@beccati.com> Date: Thu, 18 May 2017 12:16:58 +0200 Message-ID: To: Matteo Beccati Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary="001a1141058e8864ec054fc9b477" Subject: Re: [PHP-DEV] [RFC] deprecate PDO::PARAM_NULL From: adam.baratz@gmail.com (Adam Baratz) --001a1141058e8864ec054fc9b477 Content-Type: text/plain; charset="UTF-8" > > "A handful of people on the internals mail list have asked for it to be > removed" - where and when? > I didn't mean this as a justification or as any kind of vote, just as a prompt for a formal discussion. "Supporting it adds some weight to PDO" what kind of weight? How many > lines / microseconds are we going to save? > It would mostly make some of the driver code easier to follow. There's some slightly strange logic in places, to account for being able to bind NULL by type or value. There are 14 references to PDO_PARAM_NULL across pdo, pdo_mysql, and pdo_pgsql. There are 6 references to the type in unit tests. I would agree that NULL is not a type and the constant shouldn't have > been there in the first place, but I think it could be a bit too late now. > > The proposal itself is rather evil: it would break lots of code (a quick > github search shows 95k+ results) for basically no gain. Or maybe I just > didn't get it. People could future-proof their code with PDO as it exists today. I'd want to deprecate it with the same schedule we've used to remove whole extensions. Is there a schedule that would make you comfortable with the change? Most of the gain would be in cleaning up the PDO type system. The more it resembles the SQL type system, the easier it will be for statements to be portable between drivers. Having a NULL type just feels like an anomaly that should be corrected. In all honesty, I'm ambivalent about this issue. It's certainly not causing any problems. But if enough people feel it should be removed, I'm happy to do the work to remove it. Thanks, Adam --001a1141058e8864ec054fc9b477--