|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-18 23:23 UTC] lbarnaud@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 20:00:01 2025 UTC |
Description: ------------ Function isset does not work identically for object created by ArrayObject(). For example code I have this output : object(ArrayObject)[1] public 'aa' => string 'some content' (length=12) ko : isset does not work after ArrayObject() object(stdClass)[2] public 'aa' => string 'some content' (length=12) ok : isset work after (object) Reproduce code: --------------- $content = array('aa' => 'some content'); // ********************************* // $prm = new ArrayObject($content); var_dump($prm); if (isset($prm->aa) === true) echo 'ok : isset work after ArrayObject()'; else echo 'ko : isset does not work after ArrayObject()'; // ********************************* // $prm = (object) $content; var_dump($prm); if (isset($prm->aa) === true) echo 'ok : isset work after (object)'; else echo 'ko : isset does not work after (object)'; Expected result: ---------------- Same behavior for both use.