oop - Can PHP static methods legally have a visibilty of protected or private? -
i realize it's possible define static class method private , protected in php. allows instantiated class, or public static method access it's own private/protected static methods.
protected static function jumpover ()
however i'm not sure if legal in sense of oop design. can't find real info stating it's ok this. i'm worried php may "patch" in future versions if not valid , break scripts.
thanks help.
it is. static methods nothing more helper methods have code possibly don't want public.
the other common object-oriented languages can think of have (c++, java, c#). don't think they're ever going remove feature.
besides, guys @ php slow @ breaking existing features, wouldn't worry it.
Comments
Post a Comment