/ LJCPHPCodeDoc / LJCCommonLib / LJC / ShowFirstDiff


Parameters
$result - The result value.
$compare - The compare to value.

Syntax

PHP
public static function ShowFirstDiff(string $result, string $compare)

Shows the first difference between two strings.

Example

PHP
 // Shows the first difference between two strings.
 private static function ShowFirstDiff()
 {
   $result = "This is the first line.\n";
   $result .= "This is the second line.\n";
 
   $compare = "This is the first line.\n";
   $compare .= "This is the second line.\n";
   if (LJC::HasDiff($result, $compare))
   {
     echo("\r\n\r\nShowFirstDiff()");
     LJC::ShowFirstDiff($result, $compare);
   }
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.