Testing if property exists

Because property_exists will tell you if its even a defined property of the class/object where as isset doesnt make that distinction. for example:

class A {
  protected $hello;
}

class B {

}

using property_exists($this, 'hello') in class A will return true, while using it in class B will return false. isset will return false in both instances.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)