99 "uri_parser_class " => "not-exists " ,
1010 ],
1111 ]);
12- var_dump (file_get_contents ("https ://example.com " , context: $ context ));
12+ var_dump (file_get_contents ("http ://example.com " , context: $ context ));
1313} catch (Error $ e ) {
1414 echo $ e ->getMessage () . "\n" ;
1515}
@@ -19,31 +19,31 @@ $context = stream_context_create([
1919 "uri_parser_class " => null ,
2020 ],
2121]);
22- var_dump (file_get_contents ("https :///example.com " , context: $ context )); // invalid for parse_url only, valid for the other handlers
22+ var_dump (file_get_contents ("http :///example.com " , context: $ context )); // invalid for parse_url only, valid for the other handlers
2323
2424$ context = stream_context_create ([
2525 "http " => [
2626 "uri_parser_class " => \Uri \Rfc3986 \Uri::class,
2727 ],
2828]);
29- var_dump (file_get_contents ("https ://éxamplé.com " , context: $ context )); // invalid for RFC 3986 only, valid for the other handlers
29+ var_dump (file_get_contents ("http ://éxamplé.com " , context: $ context )); // invalid for RFC 3986 only, valid for the other handlers
3030
3131$ context = stream_context_create ([
3232 "http " => [
3333 "uri_parser_class " => \Uri \WhatWg \Url::class,
3434 ],
3535]);
36- var_dump (file_get_contents ("https ://exa%23mple.org " , context: $ context )); // invalid for WHATWG only, valid for the other handlers
36+ var_dump (file_get_contents ("http ://exa%23mple.org " , context: $ context )); // invalid for WHATWG only, valid for the other handlers
3737
3838?>
3939--EXPECTF--
4040file_get_contents(): Provided stream context has invalid value for the "uri_parser_class" option
4141
42- Warning: file_get_contents(https :///example.com): Failed to open stream: operation failed in %s on line %d
42+ Warning: file_get_contents(http :///example.com): Failed to open stream: operation failed in %s on line %d
4343bool(false)
4444
45- Warning: file_get_contents(https ://éxamplé.com): Failed to open stream: operation failed in %s on line %d
45+ Warning: file_get_contents(http ://éxamplé.com): Failed to open stream: operation failed in %s on line %d
4646bool(false)
4747
48- Warning: file_get_contents(https ://exa%23mple.org): Failed to open stream: operation failed in %s on line %d
48+ Warning: file_get_contents(http ://exa%23mple.org): Failed to open stream: operation failed in %s on line %d
4949bool(false)
0 commit comments