I have my own function for making developing easy
Like :
function pr($data,$exit){
echo "<pre>";
print_r($data);
if($exit)
die;
}
$collection=$this->pincodeCollection->create();
pr($collection->getData(),1);
Magento2 has helper concept but for helper function use we have to injection helper in the constructor of the class file So I want to avoid this step
In Magento2 any better way where we define our own function. and use everywhere of php code
Your help is appreciated