Skip to content
- __construct only gets called when you instantiate an instance of a class and does not get fired when you call a static class function
- I would have thought that calling the static function would first fire __construct to setup anything applicable to that class and then call the static function.
- I don’t see many sensible reasons to use static class functions, unless you just don’t know where else to stuff the function. See – When to use Static Modifier and Static vs. Instaniated
- Static Methods used to be more popular before Namespaces were available in PHP. You’d create your own namespace by wrapping a bunch of static methods inside of a class
- empty() is an alias for !isset($var) || $var == false