szogyenyid, To all the #webdev folks using #php in their stack. Did you know that using count($myArr) in your for loops' check uses almost twice as much energy than saving this value to a variable and using that one?
On my laptop, a for-loop used 0.79 Watts with a pre-calculated count(), and 1.51 Watts when calling the function in the loop's check.
You can measure it yourself with the tool I've written this weekend: https://github.com/szogyenyid/joulenne