Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98015 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7328 invoked from network); 29 Jan 2017 10:17:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2017 10:17:04 -0000 X-Host-Fingerprint: 87.75.96.78 static-87-75-96-78.vodafonexdsl.co.uk Received: from [87.75.96.78] ([87.75.96.78:17033] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/F3-06271-F11CD885 for ; Sun, 29 Jan 2017 05:17:04 -0500 Message-ID: <81.F3.06271.F11CD885@pb1.pair.com> To: internals@lists.php.net References: <9113D065-B94A-4CA2-9420-56963C703ECA@gmail.com> In-Reply-To: Date: Sun, 29 Jan 2017 10:16:59 -0000 Lines: 2 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 X-Posted-By: 87.75.96.78 Subject: Re: [PHP-DEV] Not autoloading functions From: TonyMarston@hotmail.com ("Tony Marston") "Niklas Keller" wrote in message news:CANUQDCi945M2TDdztY_tUuhdqN1Xj9WjGsL_EqbYqr5F7_Xing@mail.gmail.com... > >> >> I'm sorry, it's unacceptable for who? Only for not defined function it >> would be called. If I call the same function a thousand times, the >> autoload >> will be attempted just the first time, and if it doesn't work then the >> script would die, exactly like classes. Any project I know that uses >> functions define them one per file, and each file is required one by one. >> > >Our observations are pretty different. I don't know any projects that use >one function per file. I usually see a functions.php per namespace. > >Regards, Niklas I agree. My framework contains over 100 functions, and the idea of putting each one into a separate file is something that I would never do. The overhead of loading 100 small files is much large that loading 1 large file. Besides, when I am stepping through code with the debugger in my IDE it shows each file of a separate tab, and being forced to jump around from one tab to another would drive me crazy. -- Tony Marston