php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49953 stream_context_create() expects at most 1 parameter
Submitted: 2009-10-22 10:10 UTC Modified: 2009-10-22 15:58 UTC
From: zlobnygrif at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.2.11 OS: FreeBSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zlobnygrif at gmail dot com
New email:
PHP Version: OS:

 

 [2009-10-22 10:10 UTC] zlobnygrif at gmail dot com
Description:
------------
Incorrect description

Reproduce code:
---------------
---
From manual page: function.stream-context-create#Description
From manual page: function.stream-notification-callback.php#Examples
---
$ctx = stream_context_create(null, array("notification" => "stream_notification_callback"));

Expected result:
----------------
Warning: stream_context_create() expects at most 1 parameter, 2 given in ...


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-22 10:17 UTC] zlobnygrif at gmail dot com
Fix:
$ctx = stream_context_create();
stream_context_set_params($ctx, array("notification" => "stream_notification_callback"));
 [2009-10-22 15:58 UTC] rquadling@php.net
The params option to stream_context_create() was added in PHP 5.3.0.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 08:00:01 2026 UTC