Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40188 invoked from network); 9 Jan 2015 03:43:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jan 2015 03:43:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=francois@tekwire.net; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=francois@tekwire.net; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain tekwire.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@tekwire.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:6555] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/00-39109-A4E4FA45 for ; Thu, 08 Jan 2015 22:43:11 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id 079C54B0150; Fri, 9 Jan 2015 04:41:03 +0100 (CET) Reply-To: To: "'Pierre Joye'" Cc: "'Fred Emmott'" , "'Derick Rethans'" , "'PHP internals'" , "'Sara Golemon'" , "'Stanislav Malyshev'" , "'Benjamin Eberlei'" References: <54AAF98B.4020709@gmail.com> <001b01d029bb$fa687fc0$ef397f40$@tekwire.net> <31A3F47C-0C5B-46E0-8B34-2105F467FDB3@fredemmott.co.uk> <007901d02bb4$f9ccca80$ed665f80$@tekwire.net> In-Reply-To: Date: Fri, 9 Jan 2015 04:42:58 +0100 Message-ID: <007a01d02bbe$5ce95300$16bbf900$@tekwire.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKBrOMj1TuM8+kkOgWpn3PeY833kwGP3HvhATjV2lMChcgIAwHV7IBCAiSTtMcB5W5x9wGAwYgSArmKntoCEHaiZwH0Wz2AAXHGm0GarSVMIA== Content-Language: fr X-Antivirus: avast! (VPS 150108-1, 08/01/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] [RFC] Extension Prepend Files From: francois@tekwire.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > -----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 = with > 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. >=20 > I was too vague. >=20 > 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. Cheers Fran=C3=A7ois