xref: /PHP-5.5/ext/standard/tests/url/urls.inc (revision 03c703b8)
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'file:///path/to/file',
64'file://path/to/file',
65'file:/path/to/file',
66'http://1.2.3.4:/abc.asp?a=1&b=2',
67'http://foo.com#bar',
68'scheme:',
69'foo+bar://baz@bang/bla',
70'gg:9130731',
71'http://user:@pass@host/path?argument?value#etc',
72'http://10.10.10.10/:80',
73'http://x:?',
74'x:blah.com',
75'x:/blah.com',
76'x://::abc/?',
77'http://::?',
78'http://::#',
79'x://::6.5',
80'http://?:/',
81'http://@?:/',
82'file:///:',
83'file:///a:/',
84'file:///ab:/',
85'file:///a:/',
86'file:///@:/',
87'file:///:80/',
88'[]',
89'http://[x:80]/',
90'',
91'/',
92'/rest/Users?filter={"id":"123"}',
93
94// Severely malformed URLs that do not parse:
95'http:///blah.com',
96'http://:80',
97'http://user@:80',
98'http://user:pass@:80',
99'http://:',
100'http://@/',
101'http://@:/',
102'http://:/',
103'http://?',
104'http://#',
105'http://?:',
106'http://:?',
107'http://blah.com:123456',
108'http://blah.com:abcdef',
109);
110
111
112?>
113