|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-30 20:56 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ I suppose that the result is unexpected. Reproduce code: --------------- <?php class foo { public $test1 = 1; private $test2 = 2; protected $test3 = 3; public function __construct() { while (list($key, $value) = each($this)) { print $key . ' => '. $value ."\n"; } } } new foo; Expected result: ---------------- test1 => 1 test2 => 2 test3 => 3 Actual result: -------------- test1 => 1 footest2 => 2 *test3 => 3