File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -629,6 +629,11 @@ impl ZFunc {
629629 }
630630 }
631631
632+ /// Detects if the function is static.
633+ pub fn is_static ( & self ) -> bool {
634+ unsafe { ( self . inner . op_array . fn_flags & ZEND_ACC_STATIC ) != 0 }
635+ }
636+
632637 /// Get the type of the function (sys::ZEND_USER_FUNCTION,
633638 /// sys::ZEND_INTERNAL_FUNCTION, or sys::ZEND_EVAL_CODE).
634639 pub fn get_type ( & self ) -> u32 {
Original file line number Diff line number Diff line change @@ -191,6 +191,14 @@ impl ExecuteData {
191191 }
192192 }
193193
194+ /// Gets associated called scope if it exists
195+ pub fn get_called_scope ( & mut self ) -> Option < & ZStr > {
196+ unsafe {
197+ let val = ZVal :: from_ptr ( phper_get_called_scope ( & mut self . inner ) ) ;
198+ val. as_z_str ( )
199+ }
200+ }
201+
194202 pub ( crate ) unsafe fn get_parameters_array ( & mut self ) -> Vec < ManuallyDrop < ZVal > > {
195203 unsafe {
196204 let num_args = self . num_args ( ) ;
You can’t perform that action at this time.
0 commit comments