hasAllProperties.php
Table of Contents
Functions
- hasAllProperties() : bool
- Check if all of the given properties exist in the object.
Functions
hasAllProperties()
Check if all of the given properties exist in the object.
hasAllProperties(object $object, array<string|int, mixed> $properties[, bool $notNull = false ]) : bool
If $notNull is set to true, each 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 all properties exist (and are not null if $notNull = true)