PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PHP API> <Reference: Some Configuration Macros
Last updated: Sat, 17 Jul 2004

view this page in

장 44. API Macros

A set of macros was introduced into Zend's API that simplify access to zval containers (see 표 44-1).

표 44-1. API Macros for Accessing zval Containers

MacroRefers to
Z_LVAL(zval)(zval).value.lval
Z_DVAL(zval)(zval).value.dval
Z_STRVAL(zval)(zval).value.str.val
Z_STRLEN(zval)(zval).value.str.len
Z_ARRVAL(zval)(zval).value.ht
Z_LVAL_P(zval)(*zval).value.lval
Z_DVAL_P(zval)(*zval).value.dval
Z_STRVAL_P(zval_p)(*zval).value.str.val
Z_STRLEN_P(zval_p)(*zval).value.str.len
Z_ARRVAL_P(zval_p)(*zval).value.ht
Z_LVAL_PP(zval_pp)(**zval).value.lval
Z_DVAL_PP(zval_pp)(**zval).value.dval
Z_STRVAL_PP(zval_pp)(**zval).value.str.val
Z_STRLEN_PP(zval_pp)(**zval).value.str.len
Z_ARRVAL_PP(zval_pp)(**zval).value.ht


PHP API> <Reference: Some Configuration Macros
Last updated: Sat, 17 Jul 2004
 
add a note add a note User Contributed Notes
API Macros
k at ailis dot de
06-Apr-2002 03:41
To complete the macro list:

Access an object:
  Z_OBJ(zval)
  Z_OBJ_P(zval)
  Z_OBJ_PP(zval)

Access object property hash table:
  Z_OBJPROP(zval)
  Z_OBJPROP_P(zval)
  Z_OBJPROP_PP(zval)

Access object class entry:
  Z_OBJCE(zval)
  Z_OBJCE_P(zval)
  Z_OBJCE_PP(zval)

Access a ressource (which is fairly the same as Z_LVAL*):
  Z_RESVAL(zval)
  Z_RESVAL_P(zval)
  Z_RESVAL_PP(zval)
k at ailis dot de
06-Apr-2002 03:33
These macros can be used to access the boolean value of a zval. Yes, you can use Z_LVAL* for booleans, too, but these macros also do a type cast to zend_bool:

Z_BVAL(zval)
Z_BVAL_P(zval)
Z_BVAL_PP(zval)
nutbar at innocent dot com
03-Jan-2002 03:51
There are also:

Z_TYPE(zval)
Z_TYPE_P(*zval)
Z_TYPE_PP(**zval)

PHP API> <Reference: Some Configuration Macros
Last updated: Sat, 17 Jul 2004
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites