/4.0/Testing/Tests/ext/web/parse_url.php
PHP | 22 lines | 19 code | 3 blank | 0 comment | 0 complexity | 8c600ede1f4b41c2cb9fe681f5d0ede9 MD5 | raw file
Possible License(s): CPL-1.0, GPL-2.0, CC-BY-SA-3.0, MPL-2.0-no-copyleft-exception, Apache-2.0
- [expect php]
- [file]
- <?php
-
- function test()
- {
- $urls = array(
- 'http://subdomain.host.com/path?',
- 'http://subdomain.host.com/path?#arg1=1&q=arg2.com',
- 'http://www.somehost.com//',
- 'http://www.somehost.com////',
- 'http:\\a.b.c\d\e\f?x');
-
- foreach($urls as $url)
- {
- $url_parts = parse_url($url);
- print_r($url_parts);
- }
- }
- test();
-
- ?>