Skip to content

Instantly share code, notes, and snippets.

@cythrawll
Created May 21, 2013 04:04
Show Gist options
  • Save cythrawll/5617412 to your computer and use it in GitHub Desktop.
Save cythrawll/5617412 to your computer and use it in GitHub Desktop.
#include "php_sample.h"
#define CODEANGEL_NS "CodeAngel"
PHP_FUNCTION(sample_hello_world)
{
php_printf("Hello World!\n");
}
static const zend_function_entry php_sample_functions[] = {
ZEND_NS_NAMED_FE(CODEANGEL_NS, helloWorld, ZEND_FN(sample_hello_world), NULL)
PHP_FE_END
};
zend_module_entry sample_module_entry = {
STANDARD_MODULE_HEADER,
PHP_SAMPLE_EXTNAME,
php_sample_functions, /* functions */
NULL, /* MINIT */
NULL, /* MSHUTDOWN */
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
NULL, /* MINFO */
PHP_SAMPLE_EXTVER,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_SAMPLE
ZEND_GET_MODULE(sample)
#endif
@sgolemon
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment