Загадки с stream_filter_append

PHPCod3r

Знаток
Регистрация
7 Июн 2010
Сообщения
257
Реакции
25
Вообщем изучал я тут коменты на пхп.нет и наткулся на такой вот


PHP:
<?php
/* Open a test file for writing */
$fp = fopen("test.txt", "w+");
/* Apply the ROT13 filter to the
 * write filter chain, but not the
 * read filter chain */
stream_filter_append($fp, "string.rot13",
STREAM_FILTER_WRITE);
/* Write a simple string to the file
 * it will be ROT13 transformed at the end of the
stream operation
 * way out */
fwrite($fp, "This is a test\n"); // string data is
first written, then ROT13 tranformed and lastly
written to file
/* Back up to the beginning of the file */
rewind($fp);
$contents=fread($fp,512);
fclose($fp);
echo $contents;
?>

Вообщем автор коментария утверждает следующие
string data is
first written, then ROT13 tranformed and lastly
written to file

Как это можно проверить????
я сколько не пытался, все один хрен выходит, данные честно обрабатываются фильтром, и провести тест
что бы подтвердить слова автора не получается....
 
Назад
Сверху