I am following "Extending and Embedding PHP" by Sara Golemon. While explaining the concepts she has used several small snippets of code as such
I tried writing the code in a .c file. But i am at loss regarding the dependencies required to compile the code.
Please guide.
Code:
void describe_zval(zval *foo)
{
if (Z_TYPE_P(foo) == IS_NULL) {
php_printf("The variable is NULL");
} else {
php_printf("The variable is of type %d",
Z_TYPE_P(foo));
}
}
Please guide.
Comment