Skip to content

Instantly share code, notes, and snippets.

@amnuts
amnuts / ofilter.php
Last active June 21, 2024 01:42
Filter an array of objects based on property, or multiple property values
<?php
/**
* Filter an array of objects.
*
* You can pass in one or more properties on which to filter.
*
* If the key of an array is an array, then it will filtered down to that
* level of node.
*