Re: [PHP4BETA] string and function argument php3->php4

From: Date: Fri, 17 Sep 1999 18:11:02 +0000
Subject: Re: [PHP4BETA] string and function argument php3->php4
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-4591@lists.php.net to get a copy of this message
On Fri, Sep 17, 1999 at 07:58:48PM +0200, Stefano Bagnara wrote: > I fixed this in my code in order to let it work with php4 (under php3 it > worked fine) > > function dummy($pos,$mystr) { > $GLOBALS['a'] = $mystr; > } > > to > > function dummy($mystr) { > $GLOBALS['a'] = "$mystr"; > } > > or $GLOBALS['a'] was not assigned to the value of $mystr ... > this is changed from php3 to php4 and is not mentioned in incompatibilities. We need more information. What exactly did the PHP4 version do that you didn't expect? $ cat x.a <? function dummy($pos, $mystr) { $GLOBALS['a'] = $mystr; } dummy(0, "abc"); echo $a."\n"; $ php4/php -q x.a abc $ php3/php -q x.a abc -- Regards, Sascha Schumann Consultant

« previous php.version4 (#4591) next »