note 103653 deleted from arrayobject.construct by danbrown

From: Date: Tue, 26 Apr 2011 14:56:35 +0000
Subject: note 103653 deleted from arrayobject.construct by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179166@lists.php.net to get a copy of this message
Note Submitter: dieter ---- @ashley at nospam dot zincdigital dot com: ArrayObject, array-object: object that behaves as an array. Seems most plausible to me. And when setting the right flag you have both array-access and property-access: <?php $test = new ArrayObject(array('1','c'=>3),ArrayObject::ARRAY_AS_PROPS); $test->a=0; $test['b']=1; var_dump((array)$test); ?> output: array(4) { [0]=> string(1) "1" ["c"]=> int(3) ["a"]=> int(0) ["b"]=> int(1) }

« previous php.notes (#179166) next »