blob: c124af0fff063a54ddbd337b6eab60cfb1bf2f6f (
plain)
1
2
3
4
5
6
7
8
|
#include <emscripten.h>
#include <Zend/zend_execute.h>
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;
}
|