File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -670,9 +670,9 @@ impl ZFunc {
670670 }
671671 }
672672
673- /// Gets the line number of the declaration of the currently
673+ /// Gets the start line number of the declaration of the currently
674674 /// executing function.
675- pub fn get_lineno ( & self ) -> Option < u32 > {
675+ pub fn get_line_start ( & self ) -> Option < u32 > {
676676 unsafe {
677677 match u32:: from ( self . inner . type_ ) {
678678 ZEND_USER_FUNCTION | ZEND_EVAL_CODE => Some ( self . inner . op_array . line_start ) ,
@@ -681,6 +681,17 @@ impl ZFunc {
681681 }
682682 }
683683
684+ /// Gets the end line number of the declaration of the currently
685+ /// executing function.
686+ pub fn get_line_end ( & self ) -> Option < u32 > {
687+ unsafe {
688+ match u32:: from ( self . inner . type_ ) {
689+ ZEND_USER_FUNCTION | ZEND_EVAL_CODE => Some ( self . inner . op_array . line_end ) ,
690+ _ => None ,
691+ }
692+ }
693+ }
694+
684695 /// Get the function or method fully-qualified name.
685696 pub fn get_function_or_method_name ( & self ) -> ZString {
686697 unsafe {
You can’t perform that action at this time.
0 commit comments