|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-16 13:08 UTC] tony2001@php.net
[2006-10-16 13:15 UTC] peters at yandex dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
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