diff --git a/guide/src/types/functions.md b/guide/src/types/functions.md index ea2f42d..c8d7b03 100644 --- a/guide/src/types/functions.md +++ b/guide/src/types/functions.md @@ -16,14 +16,14 @@ use ext_php_rs::zend::Function; #[php_function] pub fn test_function() -> () { - let substr = Function::from_function("var_dump"); - let _ = substr.try_call(vec!["abc"]); + let var_dump = Function::from_function("var_dump"); + let _ = var_dump.try_call(vec![&"abc"]); } #[php_function] pub fn test_method() -> () { let f = Function::from_method("ClassName", "staticMethod"); - let _ = f.try_call(vec!["abc"]); + let _ = f.try_call(vec![&"abc"]); } # fn main() {} diff --git a/guide/src/types/object.md b/guide/src/types/object.md index abde18d..57f9371 100644 --- a/guide/src/types/object.md +++ b/guide/src/types/object.md @@ -24,9 +24,8 @@ use ext_php_rs::{prelude::*, types::ZendObject}; // Take an object reference and also return it. #[php_function] -pub fn take_obj(obj: &mut ZendObject) -> &mut ZendObject { - let res = obj.try_call_method("hello", vec!["arg1", "arg2"]); - dbg!(res) +pub fn take_obj(obj: &mut ZendObject) -> () { + let _ = obj.try_call_method("hello", vec![&"arg1", &"arg2"]); } # #[php_module] # pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {