whynot 0.1.1

Rust ↔ PHP bridge: call PHP functions from Rust, capture return values, output, and exceptions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{PhpCallResult, PhpError, PhpRuntime, PhpValue};

pub struct EmbeddedRuntime;

impl EmbeddedRuntime {
    pub fn init() -> Result<Self, PhpError> { Err(PhpError { message: "embedded runtime not implemented yet".to_string() }) }
}

impl PhpRuntime for EmbeddedRuntime {
    fn call(&mut self, _function: &str, _args: &[PhpValue]) -> Result<PhpCallResult, PhpError> { Err(PhpError { message: "embedded runtime not implemented yet".to_string() }) }
    fn eval(&mut self, _code: &str) -> Result<PhpCallResult, PhpError> { Err(PhpError { message: "embedded runtime not implemented yet".to_string() }) }
    fn include(&mut self, _path: &str) -> Result<PhpCallResult, PhpError> { Err(PhpError { message: "embedded runtime not implemented yet".to_string() }) }
}