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_basic.phpt
Ayesh Karunaratne b8e380ab09 Update deprecation message for incompatible float to int conversion
Updates the deprecation message for implicit incompatible float to int conversion from:

```
Implicit conversion from non-compatible float %.*H to int in %s on line %d
```

to

```
Implicit conversion from float %.*H to int loses precision in %s on line %d
```

Related: #6661
2021-06-07 14:36:11 +02:00

25 lines
537 B
PHP

--TEST--
Test mt_srand() - basic function (return values) mt_srand()
--FILE--
<?php
// Should return NULL if given anything that it can convert to long
// This doesn't actually test what it does with the input :-\
var_dump(mt_srand());
var_dump(mt_srand(500));
var_dump(mt_srand(500.1));
var_dump(mt_srand("500"));
var_dump(mt_srand("500E3"));
var_dump(mt_srand(true));
var_dump(mt_srand(false));
?>
--EXPECTF--
NULL
NULL
Deprecated: Implicit conversion from float 500.1 to int loses precision in %s on line %d
NULL
NULL
NULL
NULL
NULL