Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102015 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54586 invoked from network); 2 Apr 2018 12:08:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2018 12:08:55 -0000 Authentication-Results: pb1.pair.com header.from=info@pieterhordijk.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=info@pieterhordijk.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pieterhordijk.com from 185.78.96.68 cause and error) X-PHP-List-Original-Sender: info@pieterhordijk.com X-Host-Fingerprint: 185.78.96.68 mailsrv1.hostingfactory.nl Received: from [185.78.96.68] ([185.78.96.68:49166] helo=mailsrv1.hostingfactory.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/C2-35059-65D12CA5 for ; Mon, 02 Apr 2018 08:08:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 4615D10406D0; Mon, 2 Apr 2018 14:08:51 +0200 (CEST) Received: from mailsrv1.hostingfactory.nl ([127.0.0.1]) by localhost (mailsrv1.hostingfactory.nl [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id uCxQ8Dfuh6HX; Mon, 2 Apr 2018 14:08:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 7807710406E0; Mon, 2 Apr 2018 14:08:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at mailsrv1.hostingfactory.nl Received: from mailsrv1.hostingfactory.nl ([127.0.0.1]) by localhost (mailsrv1.hostingfactory.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zjnCaA3bn1JQ; Mon, 2 Apr 2018 14:08:50 +0200 (CEST) Received: from mailsrv1.hostingfactory.nl (mailsrv1.hostingfactory.nl [185.78.96.68]) by mailsrv1.hostingfactory.nl (Postfix) with ESMTP id 63CB010406D0; Mon, 2 Apr 2018 14:08:50 +0200 (CEST) Date: Mon, 2 Apr 2018 14:08:50 +0200 (CEST) To: Gabriel Caruso Cc: internals Message-ID: <1863190868.25862.1522670930305.JavaMail.zimbra@pieterhordijk.com> In-Reply-To: References: <2146941281.24754.1522668107133.JavaMail.zimbra@pieterhordijk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [185.78.96.68] X-Mailer: Zimbra 8.7.0_GA_1659 (ZimbraWebClient - FF59 (Win)/8.7.0_GA_1659) Thread-Topic: Make compact function reports undefined passed variables Thread-Index: zEX0BsVZ3XnLq0HYRw21dDONpU19qw== Subject: Re: [PHP-DEV] [RFC][Discussion] Make compact function reports undefined passed variables From: info@pieterhordijk.com (Pieter Hordijk) > Hi Pieter. >> What I am missing here is the reason why we should break well defined behavior > > of existing functions. > Hi Pieter. >> What I am missing here is the reason why we should break well defined behavior > > of existing functions. > This is something I'd like to discuss about `compact`. I'd like to know why we > skip undefined variables instead of report them. `compact` is use in a large > scale by the MVC community, by passing variables in the controller and using > them in the view. > > How is the BC break for all existing code justified? > I'd like to start report this undefined variables. Would be one more way to > prevent code-smell. IMHO this belongs to the core, not to the userland. > Thanks, > -- > Gabriel Caruso Regardless of the why it is like that the fact of the matter is that it is and imho you would need a really good reason to break existing code. I still don't don't see your reason for it. Nor do I see how it is a code smell atm.