1--TEST-- 2Overwrite libxml_set_streams_context 3--EXTENSIONS-- 4simplexml 5--FILE-- 6<?php 7 8// Based on bug54440.phpt 9 10class TestWrapper { 11 function stream_open($path, $mode, $options, &$opened_path) 12 { 13 print_r(stream_context_get_options($this->context)); 14 return false; 15 } 16 17 function url_stat($path, $flags) 18 { 19 return array(); 20 } 21} 22 23stream_wrapper_register("test", "TestWrapper"); 24 25$ctx1 = stream_context_create(array('test'=>array('test'=>'test 1'))); 26$ctx2 = stream_context_create(array('test'=>array('test'=>'test 2'))); 27 28libxml_set_streams_context($ctx2); 29@simplexml_load_file('test://sdfsdf'); 30 31libxml_set_streams_context($ctx1); 32@simplexml_load_file('test://sdfsdf'); 33?> 34--EXPECT-- 35Array 36( 37 [test] => Array 38 ( 39 [test] => test 2 40 ) 41 42) 43Array 44( 45 [test] => Array 46 ( 47 [test] => test 1 48 ) 49 50) 51