Annotation of embedaddon/php/ext/standard/tests/url/parse_url_basic_010.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test parse_url() function : check values of URL related constants
3: --FILE--
4: <?php
5: /* Prototype : proto mixed parse_url(string url, [int url_component])
6: * Description: Parse a URL and return its components
7: * Source code: ext/standard/url.c
8: * Alias to functions:
9: */
10:
11: /*
12: * check values of URL related constants
13: */
14: foreach(get_defined_constants() as $constantName => $constantValue) {
15: if (strpos($constantName, 'PHP_URL')===0) {
16: echo "$constantName: $constantValue \n";
17: }
18: }
19:
20: echo "Done";
21: ?>
22: --EXPECTF--
23: PHP_URL_SCHEME: 0
24: PHP_URL_HOST: 1
25: PHP_URL_PORT: 2
26: PHP_URL_USER: 3
27: PHP_URL_PASS: 4
28: PHP_URL_PATH: 5
29: PHP_URL_QUERY: 6
30: PHP_URL_FRAGMENT: 7
31: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>