public function callback($opcode, $subject, $offset, $length)
    {
        if ($opcode === 'd') {
            return;
        }

        if ($opcode === 'c') {
            return  htmlentities(substr($subject, $offset, $length));
        }

        return '<ins>'.htmlentities(substr($subject, $offset, $length)).'</ins>';
    }
public function callback($opcode, $subject, $offset, $length)
    {
        if ($opcode === 'd') {
            return;
        }

        if ($opcode === 'c') {
            return  htmlentities(substr($subject, $offset, $length));
        }

        return '<ins>'.htmlentities(substr($subject, $offset, $length)).'</ins>';
    }
public function callback ( $ opcode , $ subject , $ offset , $ length ) { if ( $ opcode === 'd' ) { return ; } if ( $ opcode === 'c' ) { return htmlentities ( substr ( $ subject , $ offset , $ length ) ) ; } return '<ins>' . htmlentities ( substr ( $ subject , $ offset , $ length ) ) . '</ins>' ; }
Render an insertion diff.

@param  string  $opcode
@param  string  $subject
@param  int  $offset
@param  int  $length
@return string
Render an insertion diff .