Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48621 invoked by uid 1010); 24 Jul 2006 17:18:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48601 invoked from network); 24 Jul 2006 17:18:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2006 17:18:31 -0000 X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 212.227.48.61 mayflowerholding.com Linux 2.5 (sometimes 2.4) (4) Received: from ([212.227.48.61:50944] helo=s15175637.rootmaster.info) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id C4/E1-04178-3E005C44 for ; Mon, 24 Jul 2006 13:18:29 -0400 Received: (qmail 16401 invoked by uid 2520); 24 Jul 2006 19:18:24 +0200 Received: from 82.135.0.226 by s15175637 (envelope-from , uid 2020) with qmail-scanner-1.25st (uvscan: v4.4.00/v4812. spamassassin: 3.0.3. perlscan: 1.25st. Clear:RC:0(82.135.0.226):SA:0(-0.7/7.0):. Processed in 1.169367 secs); 24 Jul 2006 17:18:24 -0000 X-Spam-Status: No, hits=-0.7 required=7.0 Received: from ppp-82-135-0-226.dynamic.mnet-online.de (HELO ?192.168.1.102?) (82.135.0.226) by mayflowerholding.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 24 Jul 2006 19:18:23 +0200 To: internals@lists.php.net Date: Mon, 24 Jul 2006 19:16:26 +0200 User-Agent: KMail/1.9.1 Cc: Rishad Omar References: <44C4ECC6.8080401@kaluma.com> In-Reply-To: <44C4ECC6.8080401@kaluma.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200607241916.27024.johannes@php.net> Subject: Re: [PHP-DEV] Pass by reference (5.1.1 vs 5.1.2) From: johannes@php.net (Johannes Schlueter) Hi, On Monday 24 July 2006 17:52, Rishad Omar wrote: > getArray($p = array()); Here you are relying on undefined behavior. It is not defined wether $p = array() or the function call getarray($p) should be executed first so the order might always change. You should always use the two lines $p = array(); getArray($p); to be safe. johannes