frankenphp.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _FRANKENPPHP_H
  2. #define _FRANKENPPHP_H
  3. #include <Zend/zend_types.h>
  4. #include <stdbool.h>
  5. #include <stdint.h>
  6. #ifndef FRANKENPHP_VERSION
  7. #define FRANKENPHP_VERSION dev
  8. #endif
  9. #define STRINGIFY(x) #x
  10. #define TOSTRING(x) STRINGIFY(x)
  11. typedef struct frankenphp_version {
  12. unsigned char major_version;
  13. unsigned char minor_version;
  14. unsigned char release_version;
  15. const char *extra_version;
  16. const char *version;
  17. unsigned long version_id;
  18. } frankenphp_version;
  19. frankenphp_version frankenphp_get_version();
  20. typedef struct frankenphp_config {
  21. frankenphp_version version;
  22. bool zts;
  23. bool zend_signals;
  24. bool zend_max_execution_timers;
  25. } frankenphp_config;
  26. frankenphp_config frankenphp_get_config();
  27. int frankenphp_init(int num_threads);
  28. int frankenphp_update_server_context(
  29. bool create, uintptr_t current_request, uintptr_t main_request,
  30. const char *request_method, char *query_string, zend_long content_length,
  31. char *path_translated, char *request_uri, const char *content_type,
  32. char *auth_user, char *auth_password, int proto_num);
  33. int frankenphp_request_startup();
  34. int frankenphp_execute_script(char *file_name);
  35. void frankenphp_register_bulk_variables(char *known_variables[27],
  36. char **dynamic_variables, size_t size,
  37. zval *track_vars_array);
  38. int frankenphp_execute_script_cli(char *script, int argc, char **argv);
  39. #endif