assume i have a class like so:
class ClassA{
var $var = 'a1';
static $static_var = 'a2';
function get(){
return $this->var;
}
static function get_static(){
return self::$static_var;
}
}
What happens in memory when I call this:
$class = new ClassA();
echo $class->get();
And also what happens when I call this:
echo ClassA::get_static();
When I create an instance of ClassA, what happens to the static members of the class? Does it take up more memory? Does it ignore the static members?
I want to keep a bunch of static functions within ClassA but I also want to create instances of ClassA. Should I separate static members from dynamic members?