Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83989 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27289 invoked from network); 27 Feb 2015 09:48:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 09:48:27 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.223.172 as permitted sender) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.223.172 mail-ie0-f172.google.com Received: from [209.85.223.172] ([209.85.223.172:41986] helo=mail-ie0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/FA-32582-A6D30F45 for ; Fri, 27 Feb 2015 04:48:27 -0500 Received: by iecrp18 with SMTP id rp18so28463425iec.9 for ; Fri, 27 Feb 2015 01:48:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:content-type; bh=pAEQKef7jbdr1S+SNk75vwO2Oo7fAPiNArp6jeJA6ak=; b=KK7HV6w0KR5a6giyRnfRv0qiMSPdCYxsqCx9JAzakHwxK0E+VQqmVi2QRckKW7kaT6 E8W6MplTElGyhDSqsnmG9Jwj/3RAMtxVq2Y4+I/Hg40GXP4wY4hpfmZmVyNk+nJKIQVm Jz61UOOJHZRtdfCS7RIEMtXwoG0AMqmiilRD2impZVL/JdTY8GYCkB8kA7vKvCfCzAbx YYELCqEd/yl8mLMZAC5MHmWz4DceSyb8SYrn4R56HQYwQ/b+TFHVhQa/Pld8SfAv5UL5 rC+/FvAmWJo5zlbdgsREFW+WiHK7zhS3sZ8qpH4hjm3FbFev5el9aU8nYpPoWwnx8LBh /CgA== X-Gm-Message-State: ALoCoQmOSmu8+EKy0UHak5uGAR2B4ynExRbGl6V60O2dJOcReJ8ofvEOVVfuOapso13UKBPyiZOT+rNXzbvGByrwKnyrM/wpZqITx9fcxyZC4L21KOgHYQdDyIPKWs4/SYnm0Hq5oB2di6MgODjgBLL/OXxYrdSxzw== X-Received: by 10.50.78.131 with SMTP id b3mr1752436igx.0.1425030503996; Fri, 27 Feb 2015 01:48:23 -0800 (PST) References: In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQI+foPC9+gKUbaeko12y549Xfdpdpwn5lcg Date: Fri, 27 Feb 2015 11:48:22 +0200 Message-ID: To: "Matthew Weier O'Phinney" , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] Follow-up to STH user experience, this time with actual testing From: zeev@zend.com (Zeev Suraski) > - PHPUnit passes a boolean false to `debug_backtrace()`... which is > documented > as expecting an integer! (There are actually several constant values it > accepts, all of which are integer values.) In this case, PHPUnit is > relying > on the fact that the engine casts booleans to the integers 0 and 1. > (Zeev has > written to the list already indicating that this coercion path will be > supported in the patch.) Matthew, I just wanted to point out that actually, supporting boolean->int coercion is not planned. Converting boolean to integer is actually a very likely scenario where you'd have an outcome that you didn't expect. It's debatable whether sending false to a bitmask is OK or not, but given it's a bitmask, an explicit 0 is a lot more correct. > - PHPUnit is passing the results of $reflector->getDocComment() blindly to > substr() and preg_match*(). getDocComment() is documented as returning > EITHER > a string OR boolean false. Again, PHPUnit is relying on PHP to cast > boolean > false to an empty string. (Zeev has also indicated this coercion path > may be > re-introduced.) We're looking to re-introduce string->boolean (which will likely be common in database scenarios), but not the other way around - where it's very likely hiding a bug. Virtually all of the boolean->string coercions that were flagged as deprecated by the patch were at the very least suspects of being real world bugs. Thanks! Zeev