ID: 39166 Updated by: [EMAIL PROTECTED] Reported By: peters at yandex dot ru -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows and Linux PHP Version: 5.1.6 New Comment:
ARRAY_key_exists() first converts it to ARRAY and then continues working, which is expected. Previous Comments: ------------------------------------------------------------------------ [2006-10-16 12:57:40] peters at yandex dot ru Description: ------------ array_key_exists() may take object as second parameter and in such case I think it should use __isset() magic function of the object (if any), but it seems not to do so. The isset() and array_key_exists() may return different results for the same object, which is not good :) Reproduce code: --------------- class TestObject { function __isset($nm) { return true; } } $A = new TestObject(); var_dump(array_key_exists('test', $A)); var_dump(isset($A->test)); Expected result: ---------------- true true Actual result: -------------- false true ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39166&edit=1