|
xdiff_string_patch(PECL xdiff >= 0.2.0) xdiff_string_patch — Patch a string with an unified diff Описание
string xdiff_string_patch
( string $str
, string $patch
[, int $flags
[, string &$error
]] )
Patches a str string with an unified patch in patch parameter and returns the result. patch has to be an unified diff created by xdiff_file_diff()/xdiff_string_diff() function. An optional flags parameter specifies mode of operation. Any rejected parts of the patch will be stored inside error variable if it is provided. Список параметров
Возвращаемые значенияReturns the patched string, or FALSE on error. Примеры
Пример #1 xdiff_string_patch() example The following code applies changes to some article.
<?php |
|