Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80298 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43306 invoked from network); 9 Jan 2015 04:01:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2015 04:01:49 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.181 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.181 mail-lb0-f181.google.com Received: from [209.85.217.181] ([209.85.217.181:50418] helo=mail-lb0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/90-39109-CA25FA45 for ; Thu, 08 Jan 2015 23:01:49 -0500 Received: by mail-lb0-f181.google.com with SMTP id l4so6281641lbv.12 for ; Thu, 08 Jan 2015 20:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MMmHZvBCvJt5QgcMqBgBki0q2Hm2pjgQ0euCRSb8WbQ=; b=bqqfqmsjgiJ56kFkRhMuJI+UcSxfcl83eivdLnwNRv136x4SJD9N+FWtd48vC/M5yc 0R5hLh8jflNllOwbgpcanxgfYZFl2Ho95EROQeZTN+ThuEciEc/y9BnjhTi5GwAf1Ih2 cHoYYPYqWc6CkUR4vEZPTawswqlzR7qusqtcluDR3PcAPZMPs3C92nygCcpqkAnDZl3L affiNJWhpG9j8eN8lTj+V+rHZwHS7+zKSEOlyn2a5sMERRWsrm8Aivgp/AHFhnqrRiIq atVXc4QiRci/1FSI0WGKK7pdS6DxUITW/Ugifqj2XQFxmJRaGIWZhIXnzbkK940Jno4N L6DA== MIME-Version: 1.0 X-Received: by 10.112.78.39 with SMTP id y7mr19665373lbw.42.1420776105564; Thu, 08 Jan 2015 20:01:45 -0800 (PST) Received: by 10.112.154.133 with HTTP; Thu, 8 Jan 2015 20:01:44 -0800 (PST) Received: by 10.112.154.133 with HTTP; Thu, 8 Jan 2015 20:01:44 -0800 (PST) In-Reply-To: <007a01d02bbe$5ce95300$16bbf900$@tekwire.net> References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <31A3F47C-0C5B-46E0-8B34-2105F467FDB3@fredemmott.co.uk> <007901d02bb4$f9ccca80$ed665f80$@tekwire.net> <007a01d02bbe$5ce95300$16bbf900$@tekwire.net> Date: Thu, 8 Jan 2015 20:01:44 -0800 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= Cc: Stas Malyshev , Sara Golemon , Fred Emmott , Derick Rethans , PHP internals , Benjamin Eberlei Content-Type: multipart/alternative; boundary=001a11c3da2e13de83050c3037be Subject: RE: [PHP-DEV] [RFC] Extension Prepend Files From: pierre.php@gmail.com (Pierre Joye) --001a11c3da2e13de83050c3037be Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Jan 9, 2015 10:43 AM, "Fran=C3=A7ois Laupretre" w= rote: > > > -----Message d'origine----- > > De : Pierre Joye [mailto:pierre.php@gmail.com] > > > > > Is there a technical problem with code located outside of definitions, or is it > > just a convention (PSR already contains this rule) ? I understand the > > problems it poses in HHVM, but I don't see why we should check that wit= h > > the engine as it is structured now. Even if we can detect such questionable > > usage (and we can detect it quite easily just using tokenizer output), IMO, > > we are not responsible of what developers put in their scripts. > > > > I was too vague. > > > > If some code is loaded and part of it will be always executed even if > > not used at all in a request, this will have side effects. Also > > besides the impact of having code being ran on each request, I do not > > think it is good idea to being to have top context running code, at > > all :) > > OK, I understand that it is a very bad idea but I am not sure we should spend time working on tools to avoid this. > > The first reason is that there may be cases where this would be legitimate. I don't imagine any today but we are not aware of every ways PHP can be used. > > The second reason is that it is not a feature for newbies. People writing code to be executed at each request start are supposed to know what they're doing. If they are fool enough to introduce such crap, it is their problem, not ours. It became a user and support (which too often begins at php.net first) > Cheers > > Fran=C3=A7ois > --001a11c3da2e13de83050c3037be--