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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -