@@ -17,23 +17,23 @@ echo "Invalid data type", PHP_EOL;
1717try {
1818 $ engine = new Xoshiro256StarStar (1.0 );
1919} catch (Throwable $ e ) {
20- echo $ e ->getMessage (), PHP_EOL ;
20+ echo $ e::class, ' : ' , $ e ->getMessage (), \ PHP_EOL ;
2121}
2222echo PHP_EOL , PHP_EOL ;
2323
2424echo "Invalid string seed length " , PHP_EOL ;
2525try {
2626 $ engine = new Xoshiro256StarStar ('foobar ' );
2727} catch (Throwable $ e ) {
28- echo $ e ->getMessage (), PHP_EOL ;
28+ echo $ e::class, ' : ' , $ e ->getMessage (), \ PHP_EOL ;
2929}
3030echo PHP_EOL , PHP_EOL ;
3131
3232echo "Null seed " , PHP_EOL ;
3333try {
3434 $ engine = new Xoshiro256StarStar (str_repeat ("\x00" , 32 ));
3535} catch (Throwable $ e ) {
36- echo $ e ->getMessage (), PHP_EOL ;
36+ echo $ e::class, ' : ' , $ e ->getMessage (), \ PHP_EOL ;
3737}
3838echo PHP_EOL , PHP_EOL ;
3939
@@ -57,15 +57,15 @@ Random string seed
5757
5858
5959Invalid data type
60- Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be of type string|int|null, float given
60+ TypeError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be of type string|int|null, float given
6161
6262
6363Invalid string seed length
64- Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be a 32 byte (256 bit) string
64+ ValueError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be a 32 byte (256 bit) string
6565
6666
6767Null seed
68- Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must not consist entirely of NUL bytes
68+ ValueError: Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must not consist entirely of NUL bytes
6969
7070
7171Valid string seed
0 commit comments