LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
From: Alan Kennington <akenning@dog.topology.org>
To : LinuxSA <linuxsa@linuxsa.org.au>
Date: Fri, 23 Jun 2000 03:02:29 +0930
PHP3 bug (apparently)
PHP illuminati:
I've just wasted a couple more hours of my life trying to
find the bug in my PHP3 software, only to find that there
seems to be a bug in the PHP3 pre-processor instead.
If you try to access elements of a global array from inside
a function, it seems that the elements are always undefined
as far as that function is concerned.
I tried a zillion permutations as work-arounds, and finally
concluded that I had to use a switch-statement instead of
an array. The software concerned is a accounting and tax database
written in PHP3/PostgreSQL.
I mention this because if I hadn't know what the numbers should be,
I would not ahve noticed the bugs.
PHP3 is a "forgiving" language, which means that it lets you write
buggy software without giving you any annoying warnings.
(Personally I prefer less forgiving languages which point out
my errors.)
If you are using PHP3 with array accesses from functions, you might
to check if these are actually correct.
If they are, then I have made an error.
Otherwise, you need to write a work-around too.
Cheers,
Alan Kennington.
-------------------------------------------------
PS. Please don't tell me that I need to upgrade/update to the
latest version of PHP4. I spend half my time downloading
and building new versions of things, and I want to get some
real work done right now.
By the way, I got the same response when I found that
linux 2.3.99-pre9 kept hanging (the worst kind of system
failure, in my opinion, apart from a fire or explosion).
So I dutifully downloaded linux 2.4.0-test1-ac21,
which was a mere 24 hours old at the time.
But the bug was still there. Not only that, someone had
also introduced an unbalanced paranthesis into the kernel,
making it uncompilable. This is why I say that linux is the
solution for the medium term only. In the longer term, there
will be an OS whose parameters we are unworthy to compute.
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
Return to the LinuxSA Mailing List Information Page