php filter array and get first code example Example: array filter php get first object after array_filter use array_shift to get the first object