Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10220 invoked from network); 29 Jun 2011 14:53:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2011 14:53:49 -0000 Authentication-Results: pb1.pair.com header.from=Pascal.Courtois@nouvo.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=Pascal.Courtois@nouvo.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nouvo.com from 213.186.62.62 cause and error) X-PHP-List-Original-Sender: Pascal.Courtois@nouvo.com X-Host-Fingerprint: 213.186.62.62 ks31594.kimsufi.com Received: from [213.186.62.62] ([213.186.62.62:44919] helo=parthenis.mjtv-online.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/91-32143-C7C3B0E4 for ; Wed, 29 Jun 2011 10:53:49 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by parthenis.mjtv-online.com (Postfix) with ESMTP id 3603AFC0BB for ; Wed, 29 Jun 2011 16:53:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mjtv-online.com Received: from parthenis.mjtv-online.com ([127.0.0.1]) by localhost (ks31594.kimsufi.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jKfnYGqtzTK8 for ; Wed, 29 Jun 2011 16:53:45 +0200 (CEST) Received: from [192.168.0.205] (lns-bzn-47f-62-147-131-15.adsl.proxad.net [62.147.131.15]) by parthenis.mjtv-online.com (Postfix) with ESMTPA for ; Wed, 29 Jun 2011 16:53:45 +0200 (CEST) Message-ID: <4E0B3C7B.10102@nouvo.com> Date: Wed, 29 Jun 2011 16:53:47 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Internals Mailing List X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: unexpected modification of a variable From: Pascal.Courtois@nouvo.com (Pascal COURTOIS) Hi, Is there any way that a variable can be changed within a function without passing it by reference ? I have a code like that: function myfunction($var) { print_r($var); => prints $var which is an object anotherfunction($var); // call by value print_r($var); => $var has changed } I thought that since there's no reference in any way to the variable it cannot be changed in the function. Am I wrong ?