rfc:binary_string_comparison

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
rfc:binary_string_comparison [2014/08/17 20:04]
mabe date on internals
rfc:binary_string_comparison [2017/09/22 13:28] (current)
Line 3: Line 3:
   * Date: 2014-08-01, internals on 2014-08-17   * Date: 2014-08-01, internals on 2014-08-17
   * Author: Marc Bennewitz, php@mabe.berlin   * Author: Marc Bennewitz, php@mabe.berlin
-  * Status: ​Draft+  * Status: ​Under Discussion
   * First Published at: http://​wiki.php.net/​rfc/​binary_string_comparison   * First Published at: http://​wiki.php.net/​rfc/​binary_string_comparison
  
Line 33: Line 33:
  
 === string == string === === string == string ===
-(http://​3v4l.org/​4KA8M)+(http://​3v4l.org/​2bIUj)
  
     <?php     <?php
     echo ('​1'​ == '​1'​ ? '​true'​ : '​false'​) . " ('​1'​ == '​1'​)\n";​     echo ('​1'​ == '​1'​ ? '​true'​ : '​false'​) . " ('​1'​ == '​1'​)\n";​
     echo ('​2'​ == '​1'​ ? '​true'​ : '​false'​) . " ('​2'​ == '​1'​)\n";​     echo ('​2'​ == '​1'​ ? '​true'​ : '​false'​) . " ('​2'​ == '​1'​)\n";​
 +    echo ('​0'​ == '​0x0'​ ? '​true'​ : '​false'​) . " ('​0'​ == '​0x0'​)\n";​
 +    echo ('​0'​ == '​00'​ ? '​true'​ : '​false'​) . " ('​0'​ == '​00'​)\n";​
     echo ('​1e1'​ == '​10'​ ? '​true'​ : '​false'​) . " ('​1e1'​ == '​10'​)\n";​     echo ('​1e1'​ == '​10'​ ? '​true'​ : '​false'​) . " ('​1e1'​ == '​10'​)\n";​
     echo ('​1E1'​ == '​10'​ ? '​true'​ : '​false'​) . " ('​1E1'​ == '​10'​)\n";​     echo ('​1E1'​ == '​10'​ ? '​true'​ : '​false'​) . " ('​1E1'​ == '​10'​)\n";​
Line 53: Line 55:
     true ('​1'​ == '​1'​)     true ('​1'​ == '​1'​)
     false ('​2'​ == '​1'​)     false ('​2'​ == '​1'​)
 +    true ('​0'​ == '​0x0'​)
 +    true ('​0'​ == '​00'​)
     true ('​1e1'​ == '​10'​)     true ('​1e1'​ == '​10'​)
     true ('​1E1'​ == '​10'​)     true ('​1E1'​ == '​10'​)
Line 68: Line 72:
     true ('​1'​ == '​1'​)     true ('​1'​ == '​1'​)
     false ('​2'​ == '​1'​)     false ('​2'​ == '​1'​)
 +    false ('​0'​ == '​0x0'​)
 +    false ('​0'​ == '​00'​)
     false ('​1e1'​ == '​10'​)     false ('​1e1'​ == '​10'​)
     false ('​1E1'​ == '​10'​)     false ('​1E1'​ == '​10'​)
rfc/binary_string_comparison.txt · Last modified: 2017/09/22 13:28 (external edit)