php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60478
Patch stream_context_set_option_error_002.phpt revision 2011-12-09 09:50 UTC by jm at jmfontaine dot net
Patch stream_context_set_option_error_001.phpt revision 2011-12-09 09:50 UTC by jm at jmfontaine dot net
Patch stream_context_set_option_basic.phpt revision 2011-12-09 09:50 UTC by jm at jmfontaine dot net
Patch spl_autoload_call_basic.phpt revision 2011-12-09 09:49 UTC by jm at jmfontaine dot net

Patch stream_context_set_option_error_001.phpt for Testing related Bug #60478

Patch version 2011-12-09 09:50 UTC

Return to Bug #60478 | Download this patch
Patch Revisions:

Developer: jm@jmfontaine.net

--TEST--
stream_context_set_option() function - error : invalid argument
--CREDITS--
Jean-Marc Fontaine <jean-marc.fontaine@alterway.fr>
# Alter Way Contribution Day 2011
--FILE--
<?php
$context = stream_context_create();

// Single option
var_dump(stream_context_set_option($context, 'http'));

// Array of options
var_dump(stream_context_set_option($context, array(), 'foo', 'bar'));
?>
--EXPECTF--
Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
bool(false)

Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d
bool(false)
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 00:01:27 2019 UTC