Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96222 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61126 invoked from network); 4 Oct 2016 14:33:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2016 14:33:26 -0000 Authentication-Results: pb1.pair.com header.from=php-mailing-list@lool.fr; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php-mailing-list@lool.fr; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lool.fr from 212.27.42.2 cause and error) X-PHP-List-Original-Sender: php-mailing-list@lool.fr X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:2291] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/E3-06241-4BDB3F75 for ; Tue, 04 Oct 2016 10:33:24 -0400 Received: from pcdepk (unknown [82.236.192.32]) by smtp2-g21.free.fr (Postfix) with ESMTP id 77E842003BD; Tue, 4 Oct 2016 16:33:21 +0200 (CEST) To: =?utf-8?Q?'Lauri_Kentt=C3=A4'?= Cc: References: <004101d21e33$124edf90$36ec9eb0$@lool.fr> <3bc3c57695cdf6207724db47e6dbbbab@koti.fimnet.fi> In-Reply-To: <3bc3c57695cdf6207724db47e6dbbbab@koti.fimnet.fi> Date: Tue, 4 Oct 2016 16:33:15 +0200 Message-ID: <000401d21e4c$3e71d140$bb5573c0$@lool.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHSHkqkmgx6Tpfs2sS8NDu8jRyIVqCYWfVw Content-Language: fr Subject: RE: [PHP-DEV] Feature Request: inline pseudo-instruction From: php-mailing-list@lool.fr ("Pascal KISSIAN") >-----Message d'origine----- >De : Lauri Kentt=C3=A4 [mailto:lauri.kentta@gmail.com]=20 >Envoy=C3=A9 : mardi 4 octobre 2016 16:21 >=C3=80 : Pascal KISSIAN >Cc : internals@lists.php.net >Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction > >On 2016-10-04 14:33, Pascal KISSIAN wrote: >> I have an application where a small file is included at multiple=20 >> places. >>=20 >> The include is done about an average of 100.000 times . > >I'm just wondering if you have ever heard of functions? You really = should write a function, include it only once, and then simply call the = function instead of repeatedly >including the file. Calling a function = is a lot faster than including a file. > >-- >Lauri Kentt=C3=A4 Function is not appropriate when the "inlined code" has to share 20-30 = local variables ... Having a function with 30 args, or having to build and access an array = is not very efficient nor natural... Local variables include 6 nested "for loop" indices and local = variables/arrays needed for the computing.