Re: ZEND_* or PHP_* macros
| From: | John Coggeshall | Date: | Sat, 28 Aug 2004 22:57:45 +0000 |
| Subject: | Re: ZEND_* or PHP_* macros | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1236@lists.php.net to get a copy of this message | ||
Honestly? I don't think it matters at all for the most part. As you
already noted, the PHP_ macros now are largely direct aliases to ZEND_
counterparts. However, I don't think this is a completely hard-and-fast
rule either.
In general, I've always looked at it as "PHP extensions" such as tidy,
curl, etc. should use the PHP macros while "Zend Engine Extensions" such
as an optimizer, debugger, etc. should be strictly ZEND_ macros.
Regards,
John
On Sat, 2004-08-28 at 14:50, Catalin Trifu wrote:
> Hi,
>
> I am trying to develop a PHP extension for libwbxml library
> and i've been trying to get some info about best practices when
> coding such stuff.
> I am a little puzzled however by the usage of PHP_ macros or
> ZEND_ macros:
> The PHP manual says it's better to use the zend maros:
> ZEND_FUNCTION, ZEND_FE, etc.
> but on pecl.pear.net in coding standards it is said that
> PHP_* macros are preffered
> As I saw, most PHP_* macros are ZEND_* aliases
> So, which is wich and why two different guides ?
>
> Thanks,
> Catalin
--
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall http://www.coggeshall.org/
The PHP Developer's Handbook http://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-