-
- zval_dtor(z_composed_url);
- array_init(z_composed_url);
- if (composed_url->scheme) {
- add_assoc_string(z_composed_url, "scheme", composed_url->scheme, 1);
- }
- if (composed_url->user) {
- add_assoc_string(z_composed_url, "user", composed_url->user, 1);
- }
- if (composed_url->pass) {
- add_assoc_string(z_composed_url, "pass", composed_url->pass, 1);
- }
- if (composed_url->host) {
- add_assoc_string(z_composed_url, "host", composed_url->host, 1);
- }
- if (composed_url->port) {
- add_assoc_long(z_composed_url, "port", composed_url->port);
- }
- if (composed_url->path) {
- add_assoc_string(z_composed_url, "path", composed_url->path, 1);
- }
- if (composed_url->query) {
- add_assoc_string(z_composed_url, "query", composed_url->query, 1);
- }
- if (composed_url->fragment) {
- add_assoc_string(z_composed_url, "fragment", composed_url->fragment, 1);
- }