Sanity check. I am still pretty new/dumb when it comes to OOP PHP.
PhpStorm (PS) warns that "$nowGmt" is "probably undefined". Is PS being over fussy or am I missing something obvious (looks good to me).
public function nowUTC($type)
{
if ($type=="mysql") $nowGmt=gmdate("Y-m-d H:i:s");
elseif ($type=="text") $nowGmt=gmdate("M jS Y g:i a");
elseif ($type=="unix") $nowGmt=time();
return $nowGmt;
}
Thanks for any pointers.
PS I should say for those of you not familiar with PS it is generally fantastic but occasionally a bit odd in some of its warnings. (Well the warnings probably reflect good practice and I am probably at fault.) It is the first IDE that I think is ****. Just did not want to put you off trying PS.