xref: /php-src/ext/standard/tests/url/urls.inc (revision 81b2f3e5)
1<?php
2$urls = array(
3// Parsable URLs:
4'64.246.30.37',
5'http://64.246.30.37',
6'http://64.246.30.37/',
7'64.246.30.37/',
8'64.246.30.37:80/',
9'php.net',
10'php.net/',
11'http://php.net',
12'http://php.net/',
13'www.php.net',
14'www.php.net/',
15'http://www.php.net',
16'http://www.php.net/',
17'www.php.net:80',
18'http://www.php.net:80',
19'http://www.php.net:80/',
20'http://www.php.net/index.php',
21'www.php.net/?',
22'www.php.net:80/?',
23'http://www.php.net/?',
24'http://www.php.net:80/?',
25'http://www.php.net:80/index.php',
26'http://www.php.net:80/foo/bar/index.php',
27'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
28'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2&parameters=3&too=4&here=5',
29'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/',
30'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php',
31'http://www.php.net:80/this/../a/../deep/directory',
32'http://www.php.net:80/this/../a/../deep/directory/',
33'http://www.php.net:80/this/is/a/very/deep/directory/../file.php',
34'http://www.php.net:80/index.php',
35'http://www.php.net:80/index.php?',
36'http://www.php.net:80/#foo',
37'http://www.php.net:80/?#',
38'http://www.php.net:80/?test=1',
39'http://www.php.net/?test=1&',
40'http://www.php.net:80/?&',
41'http://www.php.net:80/index.php?test=1&',
42'http://www.php.net/index.php?&',
43'http://www.php.net:80/index.php?foo&',
44'http://www.php.net/index.php?&foo',
45'http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI',
46'www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
47'http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
48'http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
49'http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
50'http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
51'http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
52'http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123',
53'nntp://news.php.net',
54'ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz',
55'zlib:http://foo@bar',
56'zlib:filename.txt',
57'zlib:/path/to/my/file/file.txt',
58'foo://foo@bar',
59'mailto:me@mydomain.com',
60'/foo.php?a=b&c=d',
61'foo.php?a=b&c=d',
62'http://user:passwd@www.example.com:8080?bar=1&boom=0',
63'http://user_me-you:my_pas-word@www.example.com:8080?bar=1&boom=0',
64'file:///path/to/file',
65'file://path/to/file',
66'file:/path/to/file',
67'http://1.2.3.4:/abc.asp?a=1&b=2',
68'http://foo.com#bar',
69'scheme:',
70'foo+bar://baz@bang/bla',
71'gg:9130731',
72'http://user:@pass@host/path?argument?value#etc',
73'http://10.10.10.10/:80',
74'http://x:?',
75'x:blah.com',
76'x:/blah.com',
77'x://::abc/?',
78'http://::?',
79'http://::#',
80'x://::6.5',
81'http://?:/',
82'http://@?:/',
83'file:///:',
84'file:///a:/',
85'file:///ab:/',
86'file:///a:/',
87'file:///@:/',
88'file:///:80/',
89'[]',
90'http://[x:80]/',
91'',
92'/',
93'/rest/Users?filter={"id":"123"}',
94'%:x',
95'https://example.com:0/',
96
97// Severely malformed URLs that do not parse:
98'http:///blah.com',
99'http://:80',
100'http://user@:80',
101'http://user:pass@:80',
102'http://:',
103'http://@/',
104'http://@:/',
105'http://:/',
106'http://?',
107'http://#',
108'http://?:',
109'http://:?',
110'http://blah.com:123456',
111'http://blah.com:abcdef',
112);
113
114
115?>
116