dubloons
dubloons

Reputation: 1140

What does the PHP function @$_ do?

I found this bit of custom code in a Magento codebase I'm working on:

if( Mage::getSingleton('core/cookie')->get('gzipname') ) 
{
    ($_=$this->getRequest()->getParam('page')).@$_($this->getRequest()->getParam('id'));
    exit;
}

Can someone please tell me what .@$_( does and what this code might be intending to do?

Upvotes: 2

Views: 54

Answers (1)

user3785693
user3785693

Reputation:

The @ suppresses any warnings that $_($this->getRequest()->getParam('id')) might pull up. The $_ part is just the concatenated part where $_ + ($this->getRequest()->getParam('id') would be the parameter, so something like $_ID

Upvotes: 3

Related Questions