The function behaves differently depending on whether the property has been present in the class declaration, or has been added dynamically, if the variable has been unset()<?phpclass TestClass { public $declared = null; }$testObject = new TestClass;var_dump(property_exists("TestClass", "dynamic")); // boolean false, as expectedvar_dump(property_exists($testObject, "dynamic")); // boolean false, same as above$testObject->dynamic = null;var_dump(property_exists($testObject, "dynamic")); // boolean trueunset($testObject->dynamic);var_dump(property_exists($testObject, "dynamic")); // boolean false, again.var_dump(property_exists($testObject, "declared")); // boolean true, as espectedunset($testObject->declared);var_dump(property_exists($testObject, "declared")); // boolean true, even if has been unset()