count total element is std object in php code example Example: how to get length of object in php $total = count((array)$obj);