-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
bugSomething isn't workingSomething isn't workingregressionSomething has stopped workingSomething has stopped working
Description
Related to #502
Fatal error: Uncaught Error: Example::someMethod(): Argument #1 ($self_) could not be passed by reference
use ext_php_rs::{prelude::*, types::ZendClassObject};
use ext_php_rs::types::Zval;
#[php_class]
pub struct Example {}
#[php_impl]
impl Example {
pub fn __construct() -> Example {
Example {}
}
pub fn some_method(
self_: &mut ZendClassObject<Example>,
str: String,
) -> &mut ZendClassObject<Example> {
self_
}
}
#[php_module]
pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
module.class::<Example>()
}
<?php
$example = new Example;
var_dump($example->someMethod('test'));
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingregressionSomething has stopped workingSomething has stopped working