php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /opt/php-7.0.1/ext/libxml/tests/
upload
files >> //opt/php-7.0.1/ext/libxml/tests/bug54440.phpt

--TEST--
Bug #54440: libxml extension ignores default context
--SKIPIF--
<?php if (!extension_loaded('simplexml')) die('skip simplexml required for this test'); ?>
--FILE--
<?php

class TestWrapper {

function stream_open($path, $mode, $options, &$opened_path)
{
	if ($this->context)
		print_r(stream_context_get_options($this->context));
	return false;
}

function url_stat($path, $flags)
{
return array();
}

}

stream_wrapper_register("test", "TestWrapper")
    or die("Failed to register protocol");

$ctx1 = stream_context_create(array('test'=>array('test'=>'test 1')));
$ctx2 = stream_context_create(array('test'=>array('test'=>'test 2')));

stream_context_set_default(stream_context_get_options($ctx1));
@simplexml_load_file('test://sdfsdf');

libxml_set_streams_context($ctx2);
@simplexml_load_file('test://sdfsdf');
--EXPECT--
Array
(
    [test] => Array
        (
            [test] => test 1
        )

)
Array
(
    [test] => Array
        (
            [test] => test 2
        )

)
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`