diff --git a/difflib.php b/difflib.php
index 3e6a3bb..75da740 100644
--- a/difflib.php
+++ b/difflib.php
@@ -304,8 +304,9 @@ public function __construct($data, $linepos) {
$data = str_replace(array(' ', ' ', ' ') , ' ', $data);
// Tags replaced with equal number of spaces
- $data = preg_replace_callback('/<.*?'.'>/', create_function(
- '$matches', 'return preg_replace("/./"," ", $matches[0]);'), $data);
+ $data = preg_replace_callback('/<.*?'.'>/', function($matches) {
+ return preg_replace("/./"," ", $matches[0]);
+ }, $data);
// 2. Analyse string so that each space-separated thing
// is counted as a 'word' (note these may not be real words,
@@ -409,8 +410,9 @@ function ouwiki_diff_html_to_lines($content) {
// Get rid of all script, style, object tags (that might contain non-text
// outside tags)
$content = preg_replace_callback(
- '^()|(