I am setting up a potentially massive for() loop, and I want to make sure it is as streamlined as possible by removing everything unecessary from the loop. Right now, the loop looks like:
for( $i = strtotime($_POST['start']); $i < strtotime($_POST['end']); $i = $i +1800)
{
//do stuff here
}
Here is my question. Is the strtotime($_POST['end']) function called once, or for every iterration of looped. I know the expression is evaluated every iteration, but does that mean strtotime is as well? Basically, does PHP actually read through the second and third arguements, or is that just an abstraction created by the coders to make it easier for us.
I can easily just define the strtotime results as vars before the loop, but I would like to know how this function actually works.