omit.php
Table of Contents
Functions
- omit() : object
- Removes the specified public properties from an object.
Functions
omit()
Removes the specified public properties from an object.
omit(object $object, array<int, string> $keys) : object
Returns a new stdClass containing every public property of the source object
except the listed ones. The source object is never modified. This is the inverse
of pick().
Parameters
- $object : object
-
The source object.
- $keys : array<int, string>
-
The list of property names to remove.
Tags
Return values
object —A new stdClass without the omitted properties.