FAQ
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.

Search Discussions

  • Marcus Boerger at Jul 24, 2006 at 5:13 pm
    Hello Nuno,

    i think this is a good idea and i suggest that we drop the static from
    those extensions. The question is whether we need new macros for non static
    cases and hope we don't.

    best regards
    marcus

    Monday, July 24, 2006, 9:48:29 AM, you wrote:
    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.



    Best regards,
    Marcus

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedJul 24, '06 at 4:48p
activeJul 24, '06 at 5:13p
posts2
users2
websitephp.net

2 users in discussion

Marcus Boerger: 1 post Nuno Lopes: 1 post

People

Translate

site design / logo © 2022 Grokbase