public function getOpCodes()
	{
		if(!empty($this->opCodes)) {
			return $this->opCodes;
		}

		$i = 0;
		$j = 0;
		$this->opCodes = array();

		$blocks = $this->getMatchingBlocks();
		foreach($blocks as $block) {
			list($ai, $bj, $size) = $block;
			$tag = '';
			if($i < $ai && $j < $bj) {
				$tag = 'replace';
			}
			else if($i < $ai) {
				$tag = 'delete';
			}
			else if($j < $bj) {
				$tag = 'insert';
			}

			if($tag) {
				$this->opCodes[] = array(
					$tag,
					$i,
					$ai,
					$j,
					$bj
				);
			}

			$i = $ai + $size;
			$j = $bj + $size;

			if($size) {
				$this->opCodes[] = array(
					'equal',
					$ai,
					$i,
					$bj,
					$j
				);
			}
		}
		return $this->opCodes;
	}
public function getOpCodes()
	{
		if(!empty($this->opCodes)) {
			return $this->opCodes;
		}

		$i = 0;
		$j = 0;
		$this->opCodes = array();

		$blocks = $this->getMatchingBlocks();
		foreach($blocks as $block) {
			list($ai, $bj, $size) = $block;
			$tag = '';
			if($i < $ai && $j < $bj) {
				$tag = 'replace';
			}
			else if($i < $ai) {
				$tag = 'delete';
			}
			else if($j < $bj) {
				$tag = 'insert';
			}

			if($tag) {
				$this->opCodes[] = array(
					$tag,
					$i,
					$ai,
					$j,
					$bj
				);
			}

			$i = $ai + $size;
			$j = $bj + $size;

			if($size) {
				$this->opCodes[] = array(
					'equal',
					$ai,
					$i,
					$bj,
					$j
				);
			}
		}
		return $this->opCodes;
	}
public function getOpCodes ( ) { if ( ! empty ( $ this -> opCodes ) ) { return $ this -> opCodes ; } $ i = 0 ; $ j = 0 ; $ this -> opCodes = array ( ) ; $ blocks = $ this -> getMatchingBlocks ( ) ; foreach ( $ blocks as $ block ) { list ( $ ai , $ bj , $ size ) = $ block ; $ tag = '' ; if ( $ i < $ ai && $ j < $ bj ) { $ tag = 'replace' ; } else if ( $ i < $ ai ) { $ tag = 'delete' ; } else if ( $ j < $ bj ) { $ tag = 'insert' ; } if ( $ tag ) { $ this -> opCodes [ ] = array ( $ tag , $ i , $ ai , $ j , $ bj ) ; } $ i = $ ai + $ size ; $ j = $ bj + $ size ; if ( $ size ) { $ this -> opCodes [ ] = array ( 'equal' , $ ai , $ i , $ bj , $ j ) ; } } return $ this -> opCodes ; }
Return a list of all of the opcodes for the differences between the
two strings.

The nested array returned contains an array describing the opcode
which includes:
0 - The type of tag (as described below) for the opcode.
1 - The beginning line in the first sequence.
2 - The end line in the first sequence.
3 - The beginning line in the second sequence.
4 - The end line in the second sequence.

The different types of tags include:
replace - The string from $i1 to $i2 in $a should be replaced by
the string in $b from $j1 to $j2.
delete -  The string in $a from $i1 to $j2 should be deleted.
insert -  The string in $b from $j1 to $j2 should be inserted at
$i1 in $a.
equal  -  The two strings with the specified ranges are equal.

@return array Array of the opcodes describing the differences between the strings.
Return a list of all of the opcodes for the differences between the two strings .