Incompatibilites?
| From: | George Hartz | Date: | Tue, 20 Jul 1999 18:04:56 +0000 |
| Subject: | Incompatibilites? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-2316@lists.php.net to get a copy of this message | ||
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++