ID:               30862
 Updated by:       [EMAIL PROTECTED]
 Reported By:      melnikow at hotbox dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: WinXP
 PHP Version:      5.0.2
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.


Previous Comments:
------------------------------------------------------------------------

[2004-11-22 16:49:47] melnikow at hotbox dot ru

Description:
------------
With use of static array with boolean indexes inside the class methods
occurs implicitly converting boolean to integer. 

Reproduce code:
---------------
<?php
class ClassA
{
  public static $arr =
    array(FALSE => "This is FALSE",
          TRUE  => "This is TRUE");
  
  static public function test()
  {
    $arr = array(FALSE => "This is FALSE",
                 TRUE  => "This is TRUE");
    
    echo self::$arr[TRUE];
    echo "<br>".$arr[TRUE];
  }          
}

ClassA::test();
?>

Expected result:
----------------
This is TRUE 
This is TRUE

Actual result:
--------------
Notice: Undefined offset: 1 in ... on line 13 
This is TRUE


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30862&edit=1

Reply via email to