aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/rubyvm-on-php-on-wasm
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-30 07:32:58 +0900
committernsfisis <nsfisis@gmail.com>2025-07-30 07:32:58 +0900
commit7f3246e4582a488327f2a9da01111db1a4a32b91 (patch)
treec37f919e41949d1b482aaae4bedbdd2f65b5baef /examples/rubyvm-on-php-on-wasm
parent6f18d4c860f16f094e9b3dececeb47be2a94d585 (diff)
downloadphp-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.tar.gz
php-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.tar.zst
php-waddiwasi-7f3246e4582a488327f2a9da01111db1a4a32b91.zip
chore: enable common ruleset of ecs
Diffstat (limited to 'examples/rubyvm-on-php-on-wasm')
-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));