SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    Romania, Iasi
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Static clases and functions as a 'shortcut' or call method for usual functions?

    Examples of using static classes:
    preg_match() would become preg::match(),
    isset() -> check::is_set() or is::set()

    I hope you understood what i meant.

    The good:
    - Can use the same naming conventions in the php script, like class::long_function_name(), since php uses longname() and long_name(), for instance
    - A more logical separation of function based on effect, importance, or other characteristic
    - If function parameters/names changes in future versions only a small part of code need to be changed.

    The bad:
    - declaring static clases for alot of functions

    I am sure there are more experienced coders in this forum than me and most probably someone else has thought of this before.

    Thank you for your time

  2. #2
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Lithuania, Europe
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think there's any use for it. It's just an additional layer and completely unneccessary IMO.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •