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.
17 lines
348 B
17 lines
348 B
--TEST--
|
|
string_method: json
|
|
--FILE--
|
|
<?php
|
|
|
|
function main()
|
|
{
|
|
require __DIR__ . '/../../../src/Assert.php';
|
|
|
|
$array = ['a' => random_bytes(128)->base64Encode(), 'b' => random_int(1, PHP_INT_MAX), 'c' => php_uname()];
|
|
|
|
$str = $array->jsonEncode();
|
|
Assert::notEmpty($str);
|
|
Assert::eq($str->jsonDecode(), $array);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
|