I’m a programmer and I’ve written a few compilers, but maybe my expectations are too high? Here is some PHP code that doesn’t work. But if you report it as a bug as I did they say, “that’s how it’s supposed to work”. I think they think if you document a bug it’s not a bug any more. This is what gives open source a bad name… lack of responsibility.
Here’s the code. Pretty simple stuff
$myarray = array("one","two","three","four");
foreach ($myarray as &$x) {
$x = "$x -";
print "$x\n";
}
print "\n";
foreach ($myarray as $x) {
print "$x\n";
}
You would expect it to print this:
one - two - three - four -
one - two - three - four -
Actual result:
one - two - three - four - one - two - three - three -
As you can see – not what a reasonable person would expect. Not only am I shocked that PHP fails this simple example, but when I went to report it the response is “that’s not a bug – it’s supposed to do that”. It supports my claim that the VI editor causes brain damage.














