1#![doc = include_str!("../README.md")]
2#![deny(clippy::unwrap_used)]
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6#![allow(unsafe_attr_outside_unsafe)]
7#![warn(clippy::pedantic)]
8#![cfg_attr(docs, feature(doc_cfg))]
9#![cfg_attr(windows, feature(abi_vectorcall))]
10
11pub mod alloc;
12pub mod args;
13pub mod binary;
14pub mod binary_slice;
15pub mod builders;
16pub mod convert;
17pub mod error;
18pub mod exception;
19pub mod ffi;
20pub mod flags;
21#[macro_use]
22pub mod macros;
23pub mod boxed;
24pub mod class;
25#[cfg(any(docs, feature = "closure"))]
26#[cfg_attr(docs, doc(cfg(feature = "closure")))]
27pub mod closure;
28pub mod constant;
29pub mod describe;
30#[cfg(feature = "embed")]
31pub mod embed;
32#[cfg(feature = "enum")]
33pub mod enum_;
34#[cfg(feature = "observer")]
35#[cfg_attr(docs, doc(cfg(feature = "observer")))]
36pub mod observer {
37 pub use crate::zend::observer::{FcallInfo, FcallObserver};
39}
40#[doc(hidden)]
41pub mod internal;
42pub mod props;
43pub mod rc;
44#[cfg(test)]
45pub mod test;
46pub mod types;
47mod util;
48pub mod zend;
49
50pub mod prelude {
53
54 pub use crate::builders::ModuleBuilder;
55 #[cfg(any(docs, feature = "closure"))]
56 #[cfg_attr(docs, doc(cfg(feature = "closure")))]
57 pub use crate::closure::Closure;
58 pub use crate::exception::{PhpException, PhpResult};
59 #[cfg(feature = "enum")]
60 pub use crate::php_enum;
61 pub use crate::php_print;
62 pub use crate::php_println;
63 pub use crate::php_write;
64 pub use crate::types::ZendCallable;
65 pub use crate::zend::BailoutGuard;
66 #[cfg(feature = "observer")]
67 pub use crate::zend::{FcallInfo, FcallObserver};
68 pub use crate::{
69 ZvalConvert, php_class, php_const, php_extern, php_function, php_impl, php_interface,
70 php_module, wrap_constant, wrap_function, zend_fastcall,
71 };
72}
73
74pub const VERSION: &str = env!("CARGO_PKG_VERSION");
76
77pub const PHP_DEBUG: bool = cfg!(php_debug);
79
80pub const PHP_ZTS: bool = cfg!(php_zts);
82
83pub const PHP_81: bool = cfg!(php81);
85
86pub const PHP_82: bool = cfg!(php82);
88
89pub const PHP_83: bool = cfg!(php83);
91
92pub const PHP_84: bool = cfg!(php84);
94
95pub const PHP_85: bool = cfg!(php85);
97
98#[cfg(feature = "enum")]
99pub use ext_php_rs_derive::php_enum;
100pub use ext_php_rs_derive::{
101 ZvalConvert, php_class, php_const, php_extern, php_function, php_impl, php_interface,
102 php_module, wrap_constant, wrap_function, zend_fastcall,
103};