title: How to show all detail product in magento 2 with array?
body: <p>I have code show detail product extends Magento\Catalog\Block\Product\View.
  When i wanted show detail product with array, website show error: Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to allocate 390074368 bytes) in C:\xampp\htdocs\demo\app\code\BHT\Demo\view\frontend\templates\demo.phtml on line 5</p>
  
  <p>i have use method getProduct() of Magento\Catalog\Block\Product\View.</p>
  
  <p>Please help.</p>
  
  <pre><code>Block : 
  class GetProduct extends \Magento\Catalog\Block\Product\View{
  
      public function getProductFromCatalog()
      {
          return $this-&gt;getProduct();
      }
  }
  
  .phtml:
    $product = $block-&gt;getProductFromCatalog();
  
      echo "&lt;pre&gt;";
      print_r($product-&gt;getData());
      echo "&lt;/pre&gt;";
      die();
  </code></pre>