mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

https://wiki.php.net/rfc/rng_extension https://wiki.php.net/rfc/random_extension_improvement
17 lines
246 B
PHP
17 lines
246 B
PHP
--TEST--
|
|
Test normal operation of random_bytes()
|
|
--FILE--
|
|
<?php
|
|
//-=-=-=-
|
|
|
|
var_dump(strlen(bin2hex(random_bytes(16))));
|
|
|
|
var_dump(is_string(random_bytes(10)));
|
|
|
|
var_dump(is_string(random_bytes(257)));
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(32)
|
|
bool(true)
|
|
bool(true)
|