Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99099 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24017 invoked from network); 18 May 2017 09:44:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2017 09:44:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.177 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.128.177 mail-wr0-f177.google.com Received: from [209.85.128.177] ([209.85.128.177:36522] helo=mail-wr0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/00-23431-5EC6D195 for ; Thu, 18 May 2017 05:44:06 -0400 Received: by mail-wr0-f177.google.com with SMTP id l50so29477802wrc.3 for ; Thu, 18 May 2017 02:44:05 -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=tVAfd/3LNXsWmIJOVoIWJ6mbfX1QZGhe65XWtqrLN/c=; b=V1wyB3rwQGQVRwmFqiJwn9yZowlg6rR4aQTZRdg/nc840cepogw1oFO5itv0NUwoMT xU3PdR0VDbv1nsuGmg7lEMc087uEZTRomXyt0JG98Jb2kHwbJdv2iqCBXNTPExzcBFYM CJ8EU8QiBnxPw81JRND2WvVRsdBhGPHBGPB7GGR0jT+PrXIiqLrr5XlQTIWqPPTgheol 1kUAERIobSRJAPnVABSahgXgYjG+uZW9+BPsJYtx597K2GWacdiflZcEVQnS76/fiCou vAskfZG/pq/gkBqF8gbGiRwG2Z0Pv6FJI060SZO3mVJbnhQbf2kGsntYD6LXSaqK+q5Z zUrQ== 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=tVAfd/3LNXsWmIJOVoIWJ6mbfX1QZGhe65XWtqrLN/c=; b=bMovv43RVrrNbBWoeYwJZzMkg5WjECXhuL/fElhPZoMLjjpWoTVPYAHu5oSyJP7Jmn HkcpDXb5C9nAeSqu58T1CRIsKVI3dJbmOGgAoaM6yZGhx3Px40UvtjwODN8twcZ+ktFV ZH9JbiRnlhGH0ba9OrNKLZ+Sw701BQ42E6SiXqgqhf4IksvHE+WxIYd9P4Gb18s9+fa5 iezvzl2Z21deBbPX50hndJV+ar6cycV4k/ueq4ZuZsUsEDanoVbLZUCwFmScFm8Y+3km vQ/UMMFSsYQ78NvPwIF6pKODbgUpGaMVp8WjT0BoAolWc0o6ZHqft7Ab3oIRYkaIfFw5 GcTA== X-Gm-Message-State: AODbwcAR+WtHrJVZRXkHlnxtt/KihEACi3pgfJkuht9R2rb682CowXIX iSOvuT9fp33A6Tbdz2c+SsGWD3QaFf3vMLo= X-Received: by 10.223.142.50 with SMTP id n47mr2103883wrb.188.1495100643311; Thu, 18 May 2017 02:44:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.161.147 with HTTP; Thu, 18 May 2017 02:43:42 -0700 (PDT) In-Reply-To: References: <001401d2cfae$f7c64130$e752c390$@marcodor.com> Date: Thu, 18 May 2017 11:43:42 +0200 Message-ID: To: Lester Caine Cc: PHP Internals List Content-Type: multipart/alternative; boundary="f403045f50d6bf8752054fc93ed1" Subject: Re: [PHP-DEV] Re: [RFC] deprecate PDO::PARAM_NULL From: ocramius@gmail.com (Marco Pivetta) --f403045f50d6bf8752054fc93ed1 Content-Type: text/plain; charset="UTF-8" On Thu, May 18, 2017 at 11:38 AM, Lester Caine wrote: > On 18/05/17 09:15, Dorin Marcoci wrote: > > Yes, null is a state, not a type. ->bindValue('Foo', PDO::PARAM_NULL) is > > awesome. > > So it should be deprecated and removed. > > ? One of the reasons for using 'prepare' is to set up a query which can > be run several times and some of those passes may require that one of > the parameters IS null. Easy enough with the array passed to Execute, > but more difficult if you have used the PDO parameter handling. In my > book being able to flag a parameter as 'NULL' for a pass is just as > important as supplying a value, so while yes NULL is a state, it is also > a valid value for a parameter. > You can bind `NULL` pretty much with any PDO type - PDO::PARAM_NULL is not needed to do so. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --f403045f50d6bf8752054fc93ed1--