PHP streams: difference between options and parameters -


two key concepts in php streams feature context options , parameters. what difference between «option» , «parameter»?

documentation former straightforward. seems option protocol specific setting, e.g. "method" (get, post, put...) if using http or "callback function called when inserting document" in mongodb.

what's parameter then? stream_context_set_params() manual page contains sparse reference supported parameters being "notification" , "options" (options??). context parameters page mentions "notification", if had great plans future when php/4.3.0 released never bloomed.

update:

i did research , found out, code old, introduced commit e1d0a1479 , kept more or less unchanged since time. (2003/04/10)

the author of code wez furlong. ask him, since fear nobody can provide better answer. (find email address on github)


imho parameters (there 1 atm), can used context wrappers options specific type of wrapper.

actually can set two different parameters stream_context_set_params(): notification (as named above) , (this might suprising) options assoc array options set using stream_context_set_options().

it looks stream_context_set_params() function more generic attempt, still don't advantage of concept atm.. need have @ code , commit history.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -