File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
phper-doc/doc/_06_module/_02_register_functions Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ The output of `php --re` for this function would look like:
115
115
Function [ <internal:integration> function my_function ] {
116
116
117
117
- Parameters [3] {
118
- Parameter #0 [ <required> ?class_name $a_class ]
118
+ Parameter #0 [ <required> ?\MyNamespace\MyInterface $a_class ]
119
119
Parameter #1 [ <optional> string $name = 'my_default' ]
120
120
Parameter #2 [ <optional> bool $optional_bool = <default> ]
121
121
}
Original file line number Diff line number Diff line change @@ -670,6 +670,28 @@ impl ZFunc {
670
670
}
671
671
}
672
672
673
+ /// Gets the start line number of the declaration of the currently
674
+ /// executing function.
675
+ pub fn get_line_start ( & self ) -> Option < u32 > {
676
+ unsafe {
677
+ match u32:: from ( self . inner . type_ ) {
678
+ ZEND_USER_FUNCTION | ZEND_EVAL_CODE => Some ( self . inner . op_array . line_start ) ,
679
+ _ => None ,
680
+ }
681
+ }
682
+ }
683
+
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
+
673
695
/// Get the function or method fully-qualified name.
674
696
pub fn get_function_or_method_name ( & self ) -> ZString {
675
697
unsafe {
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ impl ExecuteData {
133
133
/// Gets the current opline line number if available. This represents the
134
134
/// line number in the source code where the current operation is being
135
135
/// executed.
136
- pub fn get_lineno ( & self ) -> Option < u32 > {
136
+ pub fn get_opline_lineno ( & self ) -> Option < u32 > {
137
137
unsafe {
138
138
match u32:: from ( ( * self . inner . func ) . type_ ) {
139
139
ZEND_USER_FUNCTION | ZEND_EVAL_CODE => {
You can’t perform that action at this time.
0 commit comments