mirror of
https://github.com/danog/ext-php-rs.git
synced 2025-01-22 13:01:24 +01:00
Add helper to get global constants (#222)
ExecutorGlobals::constants() will return a hash map of the available constants.
This commit is contained in:
parent
a9dffe08f5
commit
5d1ffcec05
@ -50,6 +50,11 @@ impl ExecutorGlobals {
|
||||
unsafe { self.class_table.as_ref() }
|
||||
}
|
||||
|
||||
/// Attempts to retrieve the global constants table.
|
||||
pub fn constants(&self) -> Option<&ZendHashTable> {
|
||||
unsafe { self.zend_constants.as_ref() }
|
||||
}
|
||||
|
||||
/// Attempts to extract the last PHP exception captured by the interpreter.
|
||||
/// Returned inside a [`ZBox`].
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user