Using $this when not in object context code example
Example: : Uncaught Error: Using $this when not in object context array
# $this for a function which is not a method of any class.
#Remove $this
# Instead of:
$test = $this->compareFiles($file1,$file2,true);
# Use:
$test = compareFiles($file1,$file2,true);