oooh yes, good point: stream_filter_append($fp, "string.base64", "encode"); and stream_filter_append($fp, "string.base64", "decode");
probably with "encode" being the default behavior. That make implementation very simple and in fact the toupper/tolower calls should be similarly combined into a single filter class (string.case ?). What is the "preferred" way of passing multiple parameters? I know each filter could handle it differently, but consistency is also a very nice thing. Coma separated perhaps? Changing the behavior of stream_append to use an array instead of a string? (might be going a bit far, but would give maximum flexibility) > With the current model, the concept is that you can use either the > filter name or filter parameters to distinguish the ultimate behaviour. > > Yes this is a possible headache. > I am thinking that two separate chains of filters (one for reading and > one for writing) might make this situation a little easier; > this way you could have a filtered read stream but leave writing > unfiltered etc. > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php