rfc:strict_operators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
rfc:strict_operators [2020/07/06 18:31]
jasny Added case for comparing objects with custom handlers
rfc:strict_operators [2020/07/06 21:31]
jasny
Line 120: Line 120:
 This can lead to issues when numeric comparison is not expected, for example between two hexidecimal values. The hexidecimal value is instead interpreted as number with scientific notation. This can lead to issues when numeric comparison is not expected, for example between two hexidecimal values. The hexidecimal value is instead interpreted as number with scientific notation.
  
-<code>+<code php>
 $red = '990000'; $red = '990000';
 $purple = '9900e2'; $purple = '9900e2';
Line 153: Line 153:
 $a < $b; // true $a < $b; // true
 </code> </code>
- 
-The logic of relational operators other than ''%%==%%'', ''%%===%%'', ''%%!=%%'' and ''%%!==%%'' has limited practical use. 
  
 ==== Strict vs non-strict comparison of arrays ==== ==== Strict vs non-strict comparison of arrays ====
rfc/strict_operators.txt · Last modified: 2020/07/15 14:27 by jasny