Skip to content

Instantly share code, notes, and snippets.

View J0Cheong's full-sized avatar

justCurious J0Cheong

  • California
View GitHub Profile

PHP Developer Interview: What you should know

###1. What’s the difference between " self " and " this " ?

Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.

Source: When to use self vs this -stackoverflow