rfc:comparison_inconsistency

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:comparison_inconsistency [2014/01/04 00:44] yohgakirfc:comparison_inconsistency [2014/01/08 01:54] yohgaki
Line 177: Line 177:
    
 This could be mitigated by GMP float support. This could be mitigated by GMP float support.
 +
 +
 +=== Object Array conversion of numeric property/index ===
 +
 +https://bugs.php.net/bug.php?id=66173
 +
 +  $ php -v
 +  PHP 5.5.7 (cli) (built: Dec 11 2013 07:51:06) 
 +  Copyright (c) 1997-2013 The PHP Group
 +  Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
 +  
 +  $ php -r '$obj = new StdClass; $obj->{12} = 234; ${1} = 567; var_dump($obj, ${1}); $ary = (array)$obj; var_dump($ary, $ary[12]);'
 +  object(stdClass)#1 (1) {
 +    ["12"]=>
 +    int(234)
 +  }
 +  int(567)
 +
 +
 +  Notice: Undefined offset: 12 in Command line code on line 1
 +  array(1) {
 +    ["12"]=>
 +    int(234)
 +  }
 +  NULL <= SHOULD BE int(234)
 +
 +
 +
  
 ==== Function/Method ==== ==== Function/Method ====