Why do local variables in Magento have an underscore prefix?
问题 As a follow up to an earlier question I wonder if anyone knows why Magento templates all declare their variables with an underscore. Templates are .phtml files include -ed from Mage_Core_Block_Template::fetchView() , their local variables are disposed of by the end of the function and never become global. So what's the point of an underscore? 回答1: I think it's to respect ZF's naming convention: http://framework.zend.com/manual/en/coding-standard.naming-conventions.html#coding-standard.naming