1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/standard/tests/random/random_bytes_error.phpt
SammyK dd2692621d Add tests for CSPRNG, fix C99 comments
Also replace one return; with RETURN_FALSE; for consistency.
2015-05-09 22:29:26 +02:00

18 lines
313 B
PHP

--TEST--
Test error operation of random_bytes()
--FILE--
<?php
//-=-=-=-
var_dump(random_bytes());
var_dump(random_bytes(-1));
?>
--EXPECTF--
Warning: random_bytes() expects exactly 1 parameter, 0 given in %s on line %d
NULL
Warning: random_bytes(): Length must be greater than 0 in %s on line %d
bool(false)