aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/rubyvm-on-php-on-wasm/php-wasm.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rubyvm-on-php-on-wasm/php-wasm.php')
-rw-r--r--examples/rubyvm-on-php-on-wasm/php-wasm.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/rubyvm-on-php-on-wasm/php-wasm.php b/examples/rubyvm-on-php-on-wasm/php-wasm.php
index c89c8c4..3f5b9d0 100644
--- a/examples/rubyvm-on-php-on-wasm/php-wasm.php
+++ b/examples/rubyvm-on-php-on-wasm/php-wasm.php
@@ -16,9 +16,11 @@ $wasmBinaryStream = new FileStream(__DIR__ . '/php-wasm.wasm');
$linker = require_once __DIR__ . '/emscripten_bridge.php';
$runtime = Runtime::instantiateFromStream($wasmBinaryStream, $linker);
-$codePtr = allocateStringOnWasmMemory($runtime, strtr(PHP_HELLO_WORLD, ['%DIR%' => __DIR__]));
+$codePtr = allocateStringOnWasmMemory($runtime, strtr(PHP_HELLO_WORLD, [
+ '%DIR%' => __DIR__,
+]));
-$results = $runtime->invoke("php_wasm_run", [$codePtr]);
+$results = $runtime->invoke('php_wasm_run', [$codePtr]);
\assert(\count($results) === 1);
$exitCode = $results[0];
\assert(\is_int($exitCode));