Edit report at https://bugs.php.net/bug.php?id=46734&edit=1

 ID:                 46734
 Comment by:         klaussantana at gmail dot com
 Reported by:        emarco at uol dot com dot br
 Summary:            New flag to turn off / notify implicit type
                     conversions
 Status:             Open
 Type:               Feature/Change Request
 Package:            Feature/Change Request
 Operating System:   Any
 PHP Version:        5.2.6
 Block user comment: N
 Private report:     N

 New Comment:

This would resolve your problems:

http://www.php.net/manual/en/language.operators.comparison.php

Use the IDENTICAL (===) and NOT IDENTICAL (!==) comparsion operators...


Previous Comments:
------------------------------------------------------------------------
[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

Reply via email to