|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-11-09 17:16 UTC] tony2001@php.net
[2004-11-17 02:58 UTC] andi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
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)