mirror of
https://github.com/danog/ext-php-rs.git
synced 2024-11-29 20:29:01 +01:00
Fixes
This commit is contained in:
parent
4b821715b1
commit
714b1555f8
@ -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() {}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user