[php-src] Issue #8296: Numeric casts must emit a warning it they do not make sense
| From: | iluuu1994 | Date: | Mon, 04 Apr 2022 12:27:21 +0000 |
| Subject: | [php-src] Issue #8296: Numeric casts must emit a warning it they do not make sense | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240656@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8296
Comment Author: iluuu1994
FWIW we at least have some warnings already when casting to strings.
https://3v4l.org/UsMnb
```php
var_dump((string) []);
```
> Warning: Array to string conversion in /in/UsMnb on line 3
> string(5) "Array"
I do think casting a non-numeric string to ints is often indicative of an error. Either way, as
Christoph mentioned, this would require an RFC.