frankenphp.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 go_string {
  12. size_t len;
  13. const char *data;
  14. } go_string;
  15. typedef struct frankenphp_version {
  16. unsigned char major_version;
  17. unsigned char minor_version;
  18. unsigned char release_version;
  19. const char *extra_version;
  20. const char *version;
  21. unsigned long version_id;
  22. } frankenphp_version;
  23. frankenphp_version frankenphp_get_version();
  24. typedef struct frankenphp_config {
  25. frankenphp_version version;
  26. bool zts;
  27. bool zend_signals;
  28. bool zend_max_execution_timers;
  29. } frankenphp_config;
  30. frankenphp_config frankenphp_get_config();
  31. int frankenphp_init(int num_threads);
  32. int frankenphp_update_server_context(
  33. bool create, uintptr_t current_request, uintptr_t main_request,
  34. const char *request_method, char *query_string, zend_long content_length,
  35. char *path_translated, char *request_uri, const char *content_type,
  36. char *auth_user, char *auth_password, int proto_num);
  37. int frankenphp_request_startup();
  38. int frankenphp_execute_script(char *file_name);
  39. void frankenphp_register_bulk_variables(char *known_variables[27],
  40. char **dynamic_variables, size_t size,
  41. zval *track_vars_array);
  42. int frankenphp_execute_script_cli(char *script, int argc, char **argv);
  43. #endif