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.
19 lines
423 B
19 lines
423 B
--TEST--
|
|
WASI provides wall clock and secure random sources
|
|
--FILE--
|
|
<?php
|
|
function main(): void
|
|
{
|
|
$timestamp = time();
|
|
$random = random_int(100, 200);
|
|
var_dump($timestamp > 1700000000);
|
|
var_dump(strtotime(date(DATE_ATOM, $timestamp)) === $timestamp);
|
|
var_dump($random >= 100 && $random <= 200);
|
|
var_dump(strlen(random_bytes(16)) === 16);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|
|
|