Can someone explain how the image helper works in Magento and if the following two lines are identical? They appear to be identical strings when I run var_dump($temp)
, but memory usage says otherwise on certain products (outside of the scope of this question, but it happens on certain products and casting the string
alleviates the problem).
$temp = $this->helper('catalog/image')->init($product, 'small_image')->resize(135);
$temp = (string)$this->helper('catalog/image')->init($product, 'small_image')->resize(135);