http://www.php.net/manual/en/function.stream-notification-callback.php
In that, I did not expect the following to result in an error:
<?php
stream_context_create(array('notification' => 'callback'));
... but he does:
Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in /path/to/file.php on line 2
This also causes an error:
<?php
$ctx = stream_context_create();
stream_context_set_option($ctx, array('notification' => 'callback'));
Oddly enough, the code in the example stream_notification_callbackdoes not cause an error. But since it uses stream_context_set_paramsinstead stream_context_set_option, I'm not sure if he actually does something lol for this:
stream_context_set_params vs. stream_context_set_option
user216741
source
share