We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5f284b commit 82c4ffdCopy full SHA for 82c4ffd
phper/src/values.rs
@@ -161,7 +161,15 @@ impl ExecuteData {
161
}
162
163
/// Gets parameter by index.
164
- pub fn get_parameter(&mut self, index: usize) -> &mut ZVal {
+ pub fn get_parameter(&self, index: usize) -> &ZVal {
165
+ unsafe {
166
+ let val = phper_zend_call_var_num(self.as_ptr() as *mut _, index.try_into().unwrap());
167
+ ZVal::from_ptr(val)
168
+ }
169
170
+
171
+ /// Gets mutable parameter by index.
172
+ pub fn get_mut_parameter(&mut self, index: usize) -> &mut ZVal {
173
unsafe {
174
let val = phper_zend_call_var_num(self.as_mut_ptr(), index.try_into().unwrap());
175
ZVal::from_mut_ptr(val)
0 commit comments