Magento 2 – How to Check If Customer Login Or Not?

PHP

use isLoggedIn() method to get value