From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.5
PHP Bug Type:     Class/Object related
Bug description:  Definition of array using constants in array doesn't work

The following piece of code doesn't work:

<?
    define ('A', 20);

    class B
    {
        var $a = array(A => 10);
    }

    $b = new B();
    var_dump($b);
?>

It produces:

object(b)(1) {
  ["a"]=>
  array(1) {
    ["A"]=>
    int(10)
  }
}

which is unexpected (at least for me).
-- 
Edit bug report at: http://bugs.php.net/?id=12596&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to