I had a code where a variable was written with "D" instead of "d", and it took me some time to figure out the code was not the problem, but how the variable was written. For example here : I had to use echo 'aa';
to find the wrong line :
$lastday = clone $firstDay;
$lastday->modify("last day of this month");
$offsetInit = $firstDay->format("w");
$offsetEnd = 6 - $lastday->format("w");
$firstDay->modify("-$offsetInit days" );
echo "aa";
$lastDay->modify("+$offsetEnd days"); //Day instead of day
echo " bb";
$initWeek = clone $firstDay;
$endWeek = clone $firstDay;
$endWeek->modify("+7 days");
Is there a way, a tool on Chrome or anything like this, to figure out were the issue can come from. I am using Netbeans and the variable was not highlighted.
Thanks