Re: What's the difference between PHP_FUNCTION and PHP_NAMED_FUNCTION?

From: Date: Wed, 07 May 2014 08:00:50 +0000
Subject: Re: What's the difference between PHP_FUNCTION and PHP_NAMED_FUNCTION?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-74003@lists.php.net to get a copy of this message
On Wed, May 7, 2014 at 9:50 AM, Aaron Lewis <the.warl0ck.1989@gmail.com> wrote:
> Hi,
>
> What's the difference between PHP_FUNCTION and PHP_NAMED_FUNCTION?

As you can see on lxr :
http://lxr.php.net/xref/PHP_5_5/Zend/zend_API.h#67
, PHP_FUNCTION is
gonna use ZEND_FN on your function to turn its name into "zif_XXX" ,
avoiding collision in function names, especially regarding libc's
functions.
PHP_NAMED_FUNCTION() let you choose the full name and be responsible
yourself of avoiding collisions in names with linked objects.

Julien.P


Thread (2 messages)

« previous php.internals (#74003) next »