-
-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
use ext_php_rs::types::ZendHashTable;
use ext_php_rs::prelude::*;
#[php_class]
pub struct Example {}
#[php_impl]
impl Example {
fn __construct() -> Self {
Self {}
}
pub fn foo(&self, foo: Option<&ZendHashTable>) {}
}
#[php_module]
pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
module.class::<Example>()
}
<?php
$example = new Example;
$example->foo([1,2,3]);
echo $bar;
Note that it works without Option<...>.
This works too:
$foo = [1,2,3];
$example->foo($foo);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working