Jul 20, 2012 at 2:18 PM
Edited Jul 20, 2012 at 2:22 PM
I'm thirsty for knowledge, and saw something simple in your code that I'm not able to figure out.
In the rangeToArray() method of your
PHPExcel_Worksheet class (and I'm sure elsewhere), the row and column incrementers ($r and
$c respectively) are instantiated with a value of -1, then incremented via
++$r and ++$c.
I'm just curious why. Is there something tricky happening here? :) My first thoughts were that maybe they were validated against at some point so a negative might be needed for failure, but what I'm seeing is just simple use/incrementation.
In all the code I've been exposed to thus far, it has been more common to instantiate to zero, and do a
$x++ type incrementation. What is the reason it's been done the way it has in this PHPExcel code?
NOTE: I'm hoping for a more exotic answer than "personal style" so I can learn something new and exciting .. yet "personal style" is my current guess :)