Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99335 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39565 invoked from network); 3 Jun 2017 08:35:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2017 08:35:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=lists@rhsoft.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lists@rhsoft.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain rhsoft.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: lists@rhsoft.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Received: from [91.118.73.15] ([91.118.73.15:38321] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/4D-12681-0D472395 for ; Sat, 03 Jun 2017 04:35:28 -0400 Received: from srv-rhsoft.rhsoft.net (Authenticated sender: h.reindl@thelounge.net) by mail.thelounge.net (THELOUNGE MTA) with ESMTPSA id 3wfvXs0MzDzXMn for ; Sat, 3 Jun 2017 10:35:24 +0200 (CEST) To: internals@lists.php.net References: Message-ID: <01fe3137-cca2-8fe6-ad36-920dd957c19e@rhsoft.net> Date: Sat, 3 Jun 2017 10:35:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Why hashtable keeps insertion order by default ? From: lists@rhsoft.net ("lists@rhsoft.net") Am 03.06.2017 um 10:31 schrieb Pawel Por: > AFAIK the hashtable in PHP by default keeps the order in which the > elements are inserted. Could you please write me why it keeps the > insertion order by default ? > > Thanks in advance for clarification. beause when you create a array ['a', 'b']; you don't want to get array('b', 'a')