Menu
Samaritan's Purse

PROPERTY_EXISTS

Checks if the object or class has a property

SYNTAX

property_exists ( mixed $class , string $property ) : bool

PARAMETERS

class

The class name or an object of the class to test for

property

The name of the property

RETURN

Returns TRUE if the property exists, FALSE if it doesn't exist or NULL in case of an error.

EXAMPLES

OBJECT

bool(true)
bool(true)
bool(true)
bool(true)

CLASS NAME

bool(true)
bool(true)
bool(true)
bool(true)

NAMESPACE

bool(true)
bool(true)
bool(true)
bool(true)

PHP