TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
434 B

--TEST--
WASI provides arguments, environment variables and standard input
--ARGS--
alpha "two words"
--ENV--
TYPEPHP_WASM_GREETING=hello-wasi
--STDIN--
input from host
--FILE--
<?php
function main(): void
{
global $argv;
echo implode('|', array_slice($argv, 1)), "\n";
echo getenv('TYPEPHP_WASM_GREETING'), "\n";
echo trim(stream_get_contents(STDIN)), "\n";
}
?>
--EXPECT--
alpha|two words
hello-wasi
input from host