Return to stream_context_get_params_001.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / streams |
1.1 misho 1: --TEST-- 2: stream_context_get_params() 3: --FILE-- 4: <?php 5: 6: $ctx = stream_context_create(); 7: var_dump($ctx); 8: var_dump(stream_context_get_params($ctx)); 9: 10: var_dump(stream_context_set_option($ctx, "foo","bar","baz")); 11: var_dump(stream_context_get_params($ctx)); 12: 13: var_dump(stream_context_set_params($ctx, array("notification" => "stream_notification_callback"))); 14: var_dump(stream_context_get_params($ctx)); 15: 16: var_dump(stream_context_set_params($ctx, array("notification" => array("stream","notification_callback")))); 17: var_dump(stream_context_get_params($ctx)); 18: 19: var_dump(stream_context_get_params($ctx)); 20: var_dump(stream_context_get_options($ctx)); 21: var_dump(stream_context_get_params($ctx)); 22: var_dump(stream_context_get_options($ctx)); 23: 24: ?> 25: --EXPECTF-- 26: resource(%d) of type (stream-context) 27: array(1) { 28: [%u|b%"options"]=> 29: array(0) { 30: } 31: } 32: bool(true) 33: array(1) { 34: [%u|b%"options"]=> 35: array(1) { 36: [%u|b%"foo"]=> 37: array(1) { 38: [%u|b%"bar"]=> 39: %unicode|string%(3) "baz" 40: } 41: } 42: } 43: bool(true) 44: array(2) { 45: [%u|b%"notification"]=> 46: %unicode|string%(28) "stream_notification_callback" 47: [%u|b%"options"]=> 48: array(1) { 49: [%u|b%"foo"]=> 50: array(1) { 51: [%u|b%"bar"]=> 52: %unicode|string%(3) "baz" 53: } 54: } 55: } 56: bool(true) 57: array(2) { 58: [%u|b%"notification"]=> 59: array(2) { 60: [0]=> 61: %unicode|string%(6) "stream" 62: [1]=> 63: %unicode|string%(21) "notification_callback" 64: } 65: [%u|b%"options"]=> 66: array(1) { 67: [%u|b%"foo"]=> 68: array(1) { 69: [%u|b%"bar"]=> 70: %unicode|string%(3) "baz" 71: } 72: } 73: } 74: array(2) { 75: [%u|b%"notification"]=> 76: array(2) { 77: [0]=> 78: %unicode|string%(6) "stream" 79: [1]=> 80: %unicode|string%(21) "notification_callback" 81: } 82: [%u|b%"options"]=> 83: array(1) { 84: [%u|b%"foo"]=> 85: array(1) { 86: [%u|b%"bar"]=> 87: %unicode|string%(3) "baz" 88: } 89: } 90: } 91: array(1) { 92: [%u|b%"foo"]=> 93: array(1) { 94: [%u|b%"bar"]=> 95: %unicode|string%(3) "baz" 96: } 97: } 98: array(2) { 99: [%u|b%"notification"]=> 100: array(2) { 101: [0]=> 102: %unicode|string%(6) "stream" 103: [1]=> 104: %unicode|string%(21) "notification_callback" 105: } 106: [%u|b%"options"]=> 107: array(1) { 108: [%u|b%"foo"]=> 109: array(1) { 110: [%u|b%"bar"]=> 111: %unicode|string%(3) "baz" 112: } 113: } 114: } 115: array(1) { 116: [%u|b%"foo"]=> 117: array(1) { 118: [%u|b%"bar"]=> 119: %unicode|string%(3) "baz" 120: } 121: }