|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-07-11 17:20 UTC] cslush at gmail dot com
Description: ------------ I am getting unexpected behavior from the __get and __set methods. I am assigning an array via __set and then, by accessing it with __get, I am unable to correctly pull the last key of the array. end($this->array); $last_key = key($this->array); Reproduce code: --------------- http://rafb.net/paste/results/z7GNVF49.html Expected result: ---------------- 123456789Last Actual result: -------------- Last123456789 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 06:00:01 2025 UTC |
This is what latest CVS says on your code: Fatal error: Cannot use array returned from C::__get('array') in write context and this is expected.