|
Posted by Michael Fesser on 01/07/08 11:57
..oO(Peter Pei)
>First of all it works, read my reply to my own original post.
Depends on how you define "works". If you just mean that you can add
numeric indexes to the $_SESSION array, then you're right, this works.
But it doesn't really do what you expect from it, the behaviour is more
or less undefined and throws a notice.
>There is a
>clear example. Whether it shows warning message or whether it stops working
>in a more strict mode, that is a totally different topic.
I don't consider code that throws notices working. I consider it buggy.
The error in your code was there right from the beginning, it was just
not shown because of an improper error_reporting setting.
>Second half of your answer is interesting. So it might be a restriction from
>old days.
That was just a wild guess.
>That's why a language should be well designed to begin with.
Sure, but PHP was never meant to become what it is today. It's a
language grown up from a collection of small Perl scripts, with all the
benefits and drawbacks this approach brings along. There are exactly two
ways to deal with this:
1) Learn how to live with it.
2) Use another language.
>It is
>really hard to patch up later.
Correct. But that's how it is and we have to accept that. Over the years
the PHP dev team has done a lot to clean things up, remove deprecated or
broken features and make the language more consistent. PHP 5 has brought
a lot of improvements, and so will PHP 6. But such things take time and
don't come overnight.
Micha
[Back to original message]
|