ID: 30694
Updated by: [EMAIL PROTECTED]
Reported By: guth at fiifo dot u-psud dot fr
-Status: Open
+Status: Assigned
Bug Type: Zend Engine 2 problem
Operating System: Linux
PHP Version: 5.0.2
-Assigned To:
+Assigned To: andi
New Comment:
Assigning to Andi.
But I'd like to add that using objects as arrays of properties should
be deprecated IMO, as there are plenty of functions respecting scope
(see get_object_vars(), for example) and personally I do not see any
sense in duplicating their functionality.
Previous Comments:
------------------------------------------------------------------------
[2004-11-05 17:40:36] guth at fiifo dot u-psud dot fr
Description:
------------
Hello,
array_key_exists should return true for protected and
private vars if the are called from that scope.
Bad english to explain more, so look at the code.
Vincent Guth
Reproduce code:
---------------
<?php
class A {
protected $b = 'test';
public $c = 'test';
public function __construct() {
var_dump(array_key_exists('b', $this));
var_dump(array_key_exists('c', $this));
}
}
new A;
?>
Expected result:
----------------
bool(true)
bool(true)
Actual result:
--------------
bool(false)
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30694&edit=1