3 $orig = realpath(dirname(__FILE__
) . '/PH5P.php');
4 $new = realpath(dirname(__FILE__
) . '/../library/HTMLPurifier/Lexer/PH5P.php');
5 $newt = dirname(__FILE__
) . '/PH5P.new.php'; // temporary file
7 // minor text-processing of new file to get into same format as original
8 $new_src = file_get_contents($new);
9 $new_src = '<?php' . PHP_EOL
. substr($new_src, strpos($new_src, 'class HTML5 {'));
11 file_put_contents($newt, $new_src);
12 shell_exec("diff -u \"$orig\" \"$newt\" > PH5P.patch");