Skip to content

Commit 2994f77

Browse files
committed
Add test with named parameters
1 parent 92d7cbe commit 2994f77

File tree

1 file changed

+13
-0
lines changed
  • ext/standard/tests/general_functions

1 file changed

+13
-0
lines changed

ext/standard/tests/general_functions/rand.phpt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@ var_dump(rand(0,3));
1313

1414
var_dump(srand());
1515
var_dump(srand(-1));
16+
try {
17+
srand(mode: MT_RAND_MT19937);
18+
} catch (Error $e) {
19+
echo $e->getMessage() . "\n";
20+
}
1621

1722
var_dump(mt_srand());
1823
var_dump(mt_srand(-1));
1924

25+
try {
26+
mt_srand(mode: MT_RAND_MT19937);
27+
} catch (Error $e) {
28+
echo $e->getMessage() . "\n";
29+
}
30+
2031
var_dump(getrandmax());
2132

2233
var_dump(mt_getrandmax());
@@ -32,8 +43,10 @@ int(%i)
3243
int(%d)
3344
NULL
3445
NULL
46+
Unknown named parameter $seed
3547
NULL
3648
NULL
49+
Unknown named parameter $seed
3750
int(%d)
3851
int(%d)
3952
Done

0 commit comments

Comments
 (0)