1--TEST-- 2Test error operation of random_bytes() 3--FILE-- 4<?php 5//-=-=-=- 6 7try { 8 $bytes = random_bytes(); 9} catch (TypeError $e) { 10 echo $e->getMessage().PHP_EOL; 11} 12 13try { 14 $bytes = random_bytes(0); 15} catch (Error $e) { 16 echo $e->getMessage().PHP_EOL; 17} 18 19?> 20--EXPECT-- 21random_bytes() expects exactly 1 parameter, 0 given 22Length must be greater than 0 23