Fw: [PHP4BETA] Incompatibilites?

From: Date: Tue, 20 Jul 1999 21:47:47 +0000
Subject: Fw: [PHP4BETA] Incompatibilites?
Groups: php.version4 
Request: Send a blank email to php-version4+get-2365@lists.php.net to get a copy of this message
Zeev & co. : Correct me if I am wrong on this one.... ----- Original Message ----- From: Joey Smith <joey@samaritan.com> To: <georgeh@blowtorch.com> Sent: Tuesday, July 20, 1999 3:33 PM Subject: Re: [PHP4BETA] Incompatibilites? > I remeber in the early stages one of the discussions was that > you could no longer reference array slices with: > $array[var1]; > but need to do: > $array["var1"]; > of course, if this is in a double quoted string, you'll have to backslash > escape: > "An array element: $array[\"var1\"].\n"; > > Check that... > ----- Original Message ----- > From: George Hartz <georgeh@blowtorch.com> > To: <php4beta@lists.php.net> > Sent: Tuesday, July 20, 1999 12:04 PM > Subject: [PHP4BETA] Incompatibilites? > > > > Is there any list more up-to-date than on the php site of the > > incompatibilites between PHP3 and PHP4? > > > > After installing PHP4, virtually none of my scripts work, and I'm not > > real clear why. The two biggest problems I've found are: > > > > 1) I'm not able to use a variable as a default to a parameter in the > > constructor to an object. I think this is what was described on the > > website. Pain in the neck, it was a nice feature to have that I used all > > over the place, but I can add a pile of IF's to my classes to handle > > that situation. Therefore, just an annoying problem, not a serious > > problem. > > > > 2) I'm not clear what the problem here actually is. Given a snippet of > > code like the following (assuming this function is a member of a parent > > class): > > > > function blah ($var = "") { > > if ($var == "") { $var = $GLOBALS[MY_ENV_VARIABLE]; // who knows why > > this doesn't work... :/ > > return new My_Object ( $this, $var ); > > } > > > > This gives a parse error on the "return" line, even though it worked > > fine in PHP3. I'm not sure what about it might be the problem, if its > > returning the object, passing $this as a variable, or maybe a problem in > > the constructor of the My_Object class that for some reason is being > > reported here instead of in the other class. > > > > I don't want to submit a bug report until I know if there was some > > change that causes problem #2 that just isn't documented, or what the > > problem is. Also, is using a value set using the define command as a > > default for a parameter in a contructor okay? Or does it have to be a > > true-blue static string or number? > > > > - George > > > > -- > > email:dotorg@bangsplat.org;url:www.bangsplat.org;uin:153182;aim:tgd98 > > GCS/GP/GS/GFA d- s+: a- C++++$ UL++++$ P+++$ L+++$ E- W++>$ N+@ !o > > K+++ w--- !O M-@ V PS+ PE Y+ PGP t-(+) 5- X++ R-(--) tv+ b+++ DI++ D++ > > G+ e* h r y++ > > > > -- > > PHP 4 Beta > > > > >

« previous php.version4 (#2365) next »