]> granicus.if.org Git - php/commitdiff
better use array_diff_assoc
authorMarcus Boerger <helly@php.net>
Tue, 29 Oct 2002 14:13:11 +0000 (14:13 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 29 Oct 2002 14:13:11 +0000 (14:13 +0000)
the old way resulted in erroneus .diff

run-tests.php

index 6b6bed6422d62d34922b343d043c9a4161476d2f..d08d180b39b34de621576811e032a9f350595af8 100755 (executable)
@@ -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;