WARNING: HUGE COMMIT
[lhc/web/wiklou.git] / includes / normal / RandomTest.php
index 539975a..018910c 100644 (file)
@@ -14,7 +14,7 @@
 #
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
 /**
@@ -22,7 +22,7 @@
  * UtfNormal::cleanUp() code paths, and checks to see if there's a
  * difference. Will run forever until it finds one or you kill it.
  *
- * @package UtfNormal
+ * @ingroup UtfNormal
  * @access private
  */
 
@@ -65,10 +65,11 @@ function showDiffs( $a, $b ) {
        $ota = explode( "\n", str_replace( "\r\n", "\n", $a ) );
        $nta = explode( "\n", str_replace( "\r\n", "\n", $b ) );
 
-       $diffs =& new Diff( $ota, $nta );
-       $formatter =& new TableDiffFormatter();
+       $diffs = new Diff( $ota, $nta );
+       $formatter = new TableDiffFormatter();
        $funky = $formatter->format( $diffs );
-       preg_match_all( '/<span class="diffchange">(.*?)<\/span>/', $funky, $matches );
+       $matches = array();
+       preg_match_all( '/<(?:ins|del) class="diffchange">(.*?)<\/(?:ins|del)>/', $funky, $matches );
        foreach( $matches[1] as $bit ) {
                $hex = bin2hex( $bit );
                echo "\t$hex\n";
@@ -103,5 +104,3 @@ while( true ) {
        $clean = '';
        $norm = '';
 }
-
-?>
\ No newline at end of file