SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist priti's Avatar
    Join Date
    Aug 2006
    Location
    India
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    static function in php

    Hi All,

    Question: What is the primary difference between a method declared as static and a normal method?

    * Static methods can only be called using the :: syntax and never from an instance
    * Static methods do not provide a reference to $this
    * Static methods cannot be called from within class instances
    * Static methods don't have access to the self keyword
    * There is no functional difference between a static and non-static method

    Please let me know which one is the correct answer for question?.I am kind confuse so just want to verify my answer .

  2. #2
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    let be your friend

    Read This For More info


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
  •