--TEST-- GH-15155: Stream context is lost when custom stream wrapper is being filtered --FILE-- context); var_dump($options['dummy']['foo']); return true; } public function stream_stat() { } public function stream_read() { } public function stream_eof() { } } $context = stream_context_create(['dummy' => ['foo' => 'bar']]); stream_wrapper_register('dummy', DummyWrapper::class); file_get_contents('dummy://foo', false, $context); @file_get_contents('php://filter/resource=dummy://foo', false, $context); ?> --EXPECT-- string(3) "bar" string(3) "bar"