From 8101ba079b8b358a015f4de9acbfc85d89c335da Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 25 Oct 2023 17:34:54 +0900 Subject: 作成 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/php-wasm.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 files/php-wasm.c (limited to 'files/php-wasm.c') diff --git a/files/php-wasm.c b/files/php-wasm.c new file mode 100644 index 0000000..c124af0 --- /dev/null +++ b/files/php-wasm.c @@ -0,0 +1,8 @@ +#include +#include + +int EMSCRIPTEN_KEEPALIVE php_wasm_run(const char* code) { + zend_result result = + zend_eval_string_ex(code, NULL, "php.wasm code", 1); + return result == SUCCESS ? 0 : 1; +} -- cgit v1.2.3-70-g09d2