I think I just encountered the strangest 'bug' I've ever encountered in my short developer life. It seems like I just can't assign the value eight to any variable. For exemple:
<?php
$seven = 07;
$eight = 08; //what's wrong here?
$sevenB = 7;
$eightB = 8;
echo $seven;
echo $eight;
echo $sevenB;
echo $eightB;
?>
The output is:
7078
The debugger in NetBeans tells me 0 is assigned to $eight, while the other variables are fine. If I remove the zeroes before the values, eight gets assigned, but as soon as this variable is used in a constructor, then it's replaced by zero again. WTF?
Here's my config: WAMP 2.0g, PHP 5.2.9, Apache 2.2.11, NetBeans 6.7.1. Disabling Xdebug (2.05) doesn't change a thing.
Who is responsible for this inconsistent behavior? How to fix this?
Thanks for your help!