Req #46734 [Opn->Wfx]: New flag to turn off / notify implicit type conversions
| From: | requinix@php.net | Date: | Sat, 05 May 2018 19:44:31 +0000 |
| Subject: | Req #46734 [Opn->Wfx]: New flag to turn off / notify implicit type conversions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215090@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=46734&edit=1
ID: 46734
Updated by: requinix@php.net
Reported by: emarco at uol dot com dot br
Summary: New flag to turn off / notify implicit type
conversions
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Any
PHP Version: 5.2.6
Block user comment: N
Private report: N
New Comment:
Old request is old.
Use strict comparisons.
Previous Comments:
------------------------------------------------------------------------
[2012-10-12 20:29:37] klaussantana at gmail dot com
This would resolve your problems:
http://www.php.net/manual/en/language.operators.comparison.php
Use the IDENTICAL (===) and NOT IDENTICAL (!==) comparsion operators...
------------------------------------------------------------------------
[2008-12-03 10:40:24] emarco at uol dot com dot br
Description:
------------
That would be nice to be able to turn off any kind of type conversions in PHP. Since I started
coding in PHP, I noticed many bugs in my code are due to unexpected type conversions in PHP, things
like the string '0' (zero) being considered equal to the boolean false.
If we could turn off this kind of behaviour, or make PHP generate an alert/warning every time it
finds itself comparing data of different types, that would be a powerful debugging tool for all of
us.
Thanks!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=46734&edit=1