1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 21:11:02 +02:00
Files
archived-php-src/ext/standard/tests/math/mt_srand_error.phpt
Gabriel Caruso ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00

21 lines
427 B
PHP

--TEST--
Test mt_srand() - wrong params test mt_srand()
--FILE--
<?php
var_dump(mt_srand(500, 0, true));
var_dump(mt_srand("fivehundred"));
var_dump(mt_srand("500ABC"));
?>
--EXPECTF--
Warning: mt_srand() expects at most 2 parameters, 3 given in %s on line 2
NULL
Warning: mt_srand() expects parameter 1 to be int, string given in %s on line 3
NULL
Notice: A non well formed numeric value encountered in %s on line 4
NULL