This code is from osTicket, https://github.com/osTicket/osTicket/blob/1.9.x/main.inc.php,
/**** static functions ****/
function start() {
// Prep basic translation support
Inteationalization::bootstrap();
if(!($ost = new osTicket()))
retu null;
//Set default time zone... user/staff settting will override it (on login).
$_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset();
$_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving();
// Bootstrap installed plugins
$ost->plugins->bootstrap();
// Mirror content updates to the search backend
$ost->searcher = new SearchInterface();
retu $ost;
}
In another file, this is done:
osTicket::start()
It works. How come the static keyword isn't required?
