php static properties and methods -
define follows
class timer{ private static $timeremaining; private static $timelimit; private static $nexttime; static function block(); static function updatecookies(); }
when going around between webpages, how long static properties , methods live? result, 1 better, using class above or singleton object?
they live as php executes code - while request lives.
and of course, between webpages data erased. can use session , manually assign data static variables or non-static instance variables.
singletons use static variable storage of instance.
Comments
Post a Comment