getDifference() public method

public getDifference ( )
Ejemplo n.º 1
0
 public static function compare($html1, $html2)
 {
     $diff = new HtmlDiff($html1, $html2);
     $diff->build();
     return $diff->getDifference();
 }
Ejemplo n.º 2
0
			<div style="font-weight:bold;float:left;margin-right: 25px;">Legend:</div> 

			<div style="color:red;background:#fdd;float:left;margin-right:25px;">&#9642; &nbsp; - &nbsp; Deleted Text Differences</div>

			<div style="color:green;background:#dfd;float:left;">&#9642; &nbsp; - &nbsp; Added Text Differences</div>

		</div>


	<div class="row">
		<div class="col-sm-7" style="padding-right:0px">
			<div class="panel panel-default">
			  <div class="panel-heading">Compared Document</div>
			  <div class="panel-body" style="height:100%;overflow:auto">
			    <?php 
echo $diff->getDifference();
?>
			  </div>
			</div>
		</div>
		<div class="col-sm-5" style="padding-left:0px;">
			<div style="height:50%;padding-bottom: 32px;">
				<div class="panel panel-default">
				  <div class="panel-heading">Original Document - <small>Version <?php 
echo $original;
?>
</small></div>
				  <div class="panel-body" style="height:100%;overflow:auto;margin-bottom:20px">
				    <?php 
echo $diff->getOldHtml();
?>