mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
better use array_diff_assoc
the old way resulted in erroneus .diff
This commit is contained in:
parent
25e7a09229
commit
02d35d26cd
1 changed files with 2 additions and 2 deletions
|
@ -686,8 +686,8 @@ function generate_diff($wanted,$output)
|
|||
{
|
||||
$w = explode("\n", $wanted);
|
||||
$o = explode("\n", $output);
|
||||
$w1 = array_diff($w,$o);
|
||||
$o1 = array_diff($o,$w);
|
||||
$w1 = array_diff_assoc($w,$o);
|
||||
$o1 = array_diff_assoc($o,$w);
|
||||
$w2 = array();
|
||||
$o2 = array();
|
||||
foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue