How to get the current visitor's IP Address programmatically

/** @return string */
function rm_visitor_ip() {
	/** @var \Magento\Framework\ObjectManagerInterface $om */
	$om = \Magento\Framework\App\ObjectManager::getInstance();
	/** @var \Magento\Framework\HTTP\PhpEnvironment\RemoteAddress $a */
	$a = $om->get('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress');
	return $a->getRemoteAddress();
}