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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -