[][src]Macro solder::php_return

macro_rules! php_return {
    ($retval:expr, $value:expr) => { ... };
}

Returns a value from you function back to PHP. You need to pass the retval from the function parameter and the value that you want to return.

use solder::zend::{ExecuteData, Zval};
#[no_mangle]
pub extern fn hello_world(_data: &ExecuteData, retval: &mut Zval) {
   php_return!(retval, "Hello World!");
}