Q:

Magento 2: How to check the current page is home in phtml? 

Magento version: 2.0.0
How to check the current page is home page in the template file?  
There has a global function to do it? 

A:

Set block content with custom function :
protected $_request;

public function __construct(
    ...
    \Magento\Framework\App\Request\Http $request,
    ...
) {
    ...
    $this->_request = $request;
    ...
}

public function isHomepage()
{

    if ($this->_request->getFullActionName() == 'cms_index_index') {
        return true;
    }
    return false;
}

Template code :
<? php  $isHome = $block->isHomepage(); ? >

A:

Try:
$currentUrl = $this->getUrl('', ['_current' => true]);
$urlRewrite = $this->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]);
$isHome = $currentUrl == $urlRewrite;

In addition you can use the \Magento\Theme\Block\Html\Header\Logo::isHomePage() method if you has this block in all pages.