9
9
"uri_parser_class " => "not-exists " ,
10
10
],
11
11
]);
12
- var_dump (file_get_contents ("https ://example.com " , context: $ context ));
12
+ var_dump (file_get_contents ("http ://example.com " , context: $ context ));
13
13
} catch (Error $ e ) {
14
14
echo $ e ->getMessage () . "\n" ;
15
15
}
@@ -19,31 +19,31 @@ $context = stream_context_create([
19
19
"uri_parser_class " => null ,
20
20
],
21
21
]);
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
23
23
24
24
$ context = stream_context_create ([
25
25
"http " => [
26
26
"uri_parser_class " => \Uri \Rfc3986 \Uri::class,
27
27
],
28
28
]);
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
30
30
31
31
$ context = stream_context_create ([
32
32
"http " => [
33
33
"uri_parser_class " => \Uri \WhatWg \Url::class,
34
34
],
35
35
]);
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
37
37
38
38
?>
39
39
--EXPECTF--
40
40
file_get_contents(): Provided stream context has invalid value for the "uri_parser_class" option
41
41
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
43
43
bool(false)
44
44
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
46
46
bool(false)
47
47
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
49
49
bool(false)
0 commit comments