hasAnyProperty.php
Table of Contents
Functions
- hasAnyProperty() : bool
- Check if at least one of the given properties exists in the object.
Functions
hasAnyProperty()
Check if at least one of the given properties exists in the object.
hasAnyProperty(object $object, array<string|int, mixed> $properties[, bool $notNull = false ]) : bool
If $notNull is set to true, the property must also be non-null.
Parameters
- $object : object
-
The object to inspect
- $properties : array<string|int, mixed>
-
List of property names to check
- $notNull : bool = false
-
Whether to check for non-null values (default: false)
Tags
Return values
bool —True if at least one property exists (and is not null if $notNull = true)