Example #1
0
 static function diffAsHtml($local, $remote, $flags = null)
 {
     $comp = new coopy_TableComparisonState();
     $td = coopy_Coopy::align($local, $remote, $flags, $comp);
     $o = coopy_Coopy::getBlankTable($td, $comp);
     if ($comp->a !== null) {
         $o = $comp->a->create();
     }
     if ($o === null && $comp->b !== null) {
         $o = $comp->b->create();
     }
     if ($o === null) {
         $o = new coopy_SimpleTable(0, 0);
     }
     $os = new coopy_Tables($o);
     $td->hiliteWithNesting($os);
     $render = new coopy_DiffRender();
     return $render->renderTables($os)->html();
 }