Long time no ZF2 post, but here is something interesting peace of code that can solve cache problems present in most of the projects. I am assuming that, the reader knows how to create custom cache Factory in ZF2. Step 1. Edit your existing cache factory. See Line 35. namespace Application\Factory; use Application\Factory\CacheProxy; // Or […]
$areSame = (serialize($ob1) === serialize($ob2)); This easy way of comparing two objects in php.It will take in account object variables. Example : class ob1{ public $number = 1; } class ob2{ public $number = 1; } $areSame = serialize(new ob1()) === serialize(new ob2()) //$areSame = true; class ob1{ public $number = 1; } class ob2{ […]