Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24936 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26140 invoked by uid 1010); 24 Jul 2006 16:48:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 26125 invoked from network); 24 Jul 2006 16:48:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2006 16:48:36 -0000 X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.26 relay6.ptmail.sapo.pt Linux 2.4/2.6 Received: from ([212.55.154.26:41317] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 87/FF-04178-1E9F4C44 for ; Mon, 24 Jul 2006 12:48:35 -0400 Received: (qmail 15414 invoked from network); 24 Jul 2006 16:48:30 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.151) by relay6 with SMTP; 24 Jul 2006 16:48:30 -0000 Received: (qmail 29764 invoked from network); 24 Jul 2006 16:48:30 -0000 X-AntiVirus: PTMail-AV 0.3-0.88.3 X-Virus-Status: Clean (0.01045 seconds) Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[82.155.72.207]) (envelope-sender ) by mta1 (qmail-ldap-1.03) with SMTP for ; 24 Jul 2006 16:48:30 -0000 Message-ID: <008101c6af40$fea56de0$0100a8c0@pc07653> To: "PHPdev" Cc: Date: Mon, 24 Jul 2006 17:48:29 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: making PHP_FUNCTION static? From: nlopess@php.net ("Nuno Lopes") Hello, I was wondering if we could make ZEND_FUNCTION() declaration static. This represents a compatibility break with previous PHP versions, but only extensions that already declare the function as static would be affected. Declaring a function as static (or anything else) decreases load times and the size of the dso, allows better optimizations by the compiler, etc.. So its all advantages :) (well, then all functions must be defined or #include'd in the same file as the function table). There are some (few) extensions that already mark their functions as static, so should we use a wide static keywording, by changing the macro, or add the keyword locally? Nuno P.S.: Anyone that wants to learn more about why, how and when to use static and const keywords, just read the Ulrich Drepper dso paper.