How to check that an object is empty in PHP? December 20, 2022 by Tarik You can cast to an array and then check if it is empty or not $arr = (array)$obj; if (!$arr) { // do stuff }