Expand description
A module typically glob-imported containing the typically required macros and imports.
Re-exports§
pub use crate::builders::ModuleBuilder;
pub use crate::closure::Closure;
closure
pub use crate::exception::PhpException;
pub use crate::exception::PhpResult;
pub use crate::types::ZendCallable;
Macros§
- php_
print - Prints to the PHP standard output, without a newline.
- php_
println - Prints to the PHP standard output, with a newline.
Attribute Macros§
- php_
class - Annotates a struct that will be exported to PHP as a class.
- php_
const - Attribute used to annotate constants to be exported to PHP.
- php_
extern - Attribute used to annotate
extern
blocks which are deemed as PHP functions. - php_
function - Attribute used to annotate a function as a PHP function.
- php_
impl - Annotates a structs
impl
block, declaring that all methods and constants declared inside theimpl
block will be declared as PHP methods and constants. - php_
module - Annotates a function that will be used by PHP to retrieve information about the module.
- php_
startup - Annotates a function that will be called by PHP when the module starts up. Generally used to register classes and constants.
Derive Macros§
- Zval
Convert - Derives the traits required to convert a struct or enum to and from a
Zval
. BothFromZval
andIntoZval
are implemented on types which use this macro.