php - Calling a public, static function in an abstract class -
i guess question geared more towards language-geeks. have following class:
<?php abstract class scopefactory { public static function dostuff() { } }
now, i'm able call function, so:
scopefactory::dostuff()
and works happily. i've coded under impression abstract
classes not used directly - , have implemented concrete class in order callable.
my impression of static
not require instance callable.
could explain me why legal, , if should be? i'm curious finer details.
static methods in oop not change internal state, therefore can call static methods abstract class.
Comments
Post a Comment