Test: /ext/standard/tests/url/parse_url_basic_001.phpt - Version 7.0.30    

There is 1 diff reported by users for this test.

Count Diff
2 (100%)
001+ Fatal error: Uncaught Error: Call to undefined function import_module() in %s/parse_url_basic_001.php:11
002+ Stack trace:
003+ #0 {main}
004+ thrown in %s/parse_url_basic_001.php on line 11
001- --> 64.246.30.37: array(1) {
002- ["path"]=>
003- string(12) "64.246.30.37"
004- }
005-
006- --> http://64.246.30.37: array(2) {
007- ["scheme"]=>
008- string(4) "http"
009- ["host"]=>
010- string(12) "64.246.30.37"
011- }
012-
013- --> http://64.246.30.37/: array(3) {
014- ["scheme"]=>
015- string(4) "http"
016- ["host"]=>
017- string(12) "64.246.30.37"
018- ["path"]=>
019- string(1) "/"
020- }
021-
022- --> 64.246.30.37/: array(1) {
023- ["path"]=>
024- string(13) "64.246.30.37/"
025- }
026-
027- --> 64.246.30.37:80/: array(3) {
028- ["host"]=>
029- string(12) "64.246.30.37"
030- ["port"]=>
031- int(80)
032- ["path"]=>
033- string(1) "/"
034- }
035-
036- --> php.net: array(1) {
037- ["path"]=>
038- string(7) "php.net"
039- }
040-
041- --> php.net/: array(1) {
042- ["path"]=>
043- string(8) "php.net/"
044- }
045-
046- --> http://php.net: array(2) {
047- ["scheme"]=>
048- string(4) "http"
049- ["host"]=>
050- string(7) "php.net"
051- }
052-
053- --> http://php.net/: array(3) {
054- ["scheme"]=>
055- string(4) "http"
056- ["host"]=>
057- string(7) "php.net"
058- ["path"]=>
059- string(1) "/"
060- }
061-
062- --> www.php.net: array(1) {
063- ["path"]=>
064- string(11) "www.php.net"
065- }
066-
067- --> www.php.net/: array(1) {
068- ["path"]=>
069- string(12) "www.php.net/"
070- }
071-
072- --> http://www.php.net: array(2) {
073- ["scheme"]=>
074- string(4) "http"
075- ["host"]=>
076- string(11) "www.php.net"
077- }
078-
079- --> http://www.php.net/: array(3) {
080- ["scheme"]=>
081- string(4) "http"
082- ["host"]=>
083- string(11) "www.php.net"
084- ["path"]=>
085- string(1) "/"
086- }
087-
088- --> www.php.net:80: array(2) {
089- ["host"]=>
090- string(11) "www.php.net"
091- ["port"]=>
092- int(80)
093- }
094-
095- --> http://www.php.net:80: array(3) {
096- ["scheme"]=>
097- string(4) "http"
098- ["host"]=>
099- string(11) "www.php.net"
100- ["port"]=>
101- int(80)
102- }
103-
104- --> http://www.php.net:80/: array(4) {
105- ["scheme"]=>
106- string(4) "http"
107- ["host"]=>
108- string(11) "www.php.net"
109- ["port"]=>
110- int(80)
111- ["path"]=>
112- string(1) "/"
113- }
114-
115- --> http://www.php.net/index.php: array(3) {
116- ["scheme"]=>
117- string(4) "http"
118- ["host"]=>
119- string(11) "www.php.net"
120- ["path"]=>
121- string(10) "/index.php"
122- }
123-
124- --> www.php.net/?: array(1) {
125- ["path"]=>
126- string(12) "www.php.net/"
127- }
128-
129- --> www.php.net:80/?: array(3) {
130- ["host"]=>
131- string(11) "www.php.net"
132- ["port"]=>
133- int(80)
134- ["path"]=>
135- string(1) "/"
136- }
137-
138- --> http://www.php.net/?: array(3) {
139- ["scheme"]=>
140- string(4) "http"
141- ["host"]=>
142- string(11) "www.php.net"
143- ["path"]=>
144- string(1) "/"
145- }
146-
147- --> http://www.php.net:80/?: array(4) {
148- ["scheme"]=>
149- string(4) "http"
150- ["host"]=>
151- string(11) "www.php.net"
152- ["port"]=>
153- int(80)
154- ["path"]=>
155- string(1) "/"
156- }
157-
158- --> http://www.php.net:80/index.php: array(4) {
159- ["scheme"]=>
160- string(4) "http"
161- ["host"]=>
162- string(11) "www.php.net"
163- ["port"]=>
164- int(80)
165- ["path"]=>
166- string(10) "/index.php"
167- }
168-
169- --> http://www.php.net:80/foo/bar/index.php: array(4) {
170- ["scheme"]=>
171- string(4) "http"
172- ["host"]=>
173- string(11) "www.php.net"
174- ["port"]=>
175- int(80)
176- ["path"]=>
177- string(18) "/foo/bar/index.php"
178- }
179-
180- --> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php: array(4) {
181- ["scheme"]=>
182- string(4) "http"
183- ["host"]=>
184- string(11) "www.php.net"
185- ["port"]=>
186- int(80)
187- ["path"]=>
188- string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
189- }
190-
191- --> 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: array(5) {
192- ["scheme"]=>
193- string(4) "http"
194- ["host"]=>
195- string(11) "www.php.net"
196- ["port"]=>
197- int(80)
198- ["path"]=>
199- string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
200- ["query"]=>
201- string(37) "lots=1&of=2&parameters=3&too=4&here=5"
202- }
203-
204- --> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/: array(4) {
205- ["scheme"]=>
206- string(4) "http"
207- ["host"]=>
208- string(11) "www.php.net"
209- ["port"]=>
210- int(80)
211- ["path"]=>
212- string(45) "/this/is/a/very/deep/directory/structure/and/"
213- }
214-
215- --> http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php: array(4) {
216- ["scheme"]=>
217- string(4) "http"
218- ["host"]=>
219- string(11) "www.php.net"
220- ["port"]=>
221- int(80)
222- ["path"]=>
223- string(53) "/this/is/a/very/deep/directory/structure/and/file.php"
224- }
225-
226- --> http://www.php.net:80/this/../a/../deep/directory: array(4) {
227- ["scheme"]=>
228- string(4) "http"
229- ["host"]=>
230- string(11) "www.php.net"
231- ["port"]=>
232- int(80)
233- ["path"]=>
234- string(28) "/this/../a/../deep/directory"
235- }
236-
237- --> http://www.php.net:80/this/../a/../deep/directory/: array(4) {
238- ["scheme"]=>
239- string(4) "http"
240- ["host"]=>
241- string(11) "www.php.net"
242- ["port"]=>
243- int(80)
244- ["path"]=>
245- string(29) "/this/../a/../deep/directory/"
246- }
247-
248- --> http://www.php.net:80/this/is/a/very/deep/directory/../file.php: array(4) {
249- ["scheme"]=>
250- string(4) "http"
251- ["host"]=>
252- string(11) "www.php.net"
253- ["port"]=>
254- int(80)
255- ["path"]=>
256- string(42) "/this/is/a/very/deep/directory/../file.php"
257- }
258-
259- --> http://www.php.net:80/index.php: array(4) {
260- ["scheme"]=>
261- string(4) "http"
262- ["host"]=>
263- string(11) "www.php.net"
264- ["port"]=>
265- int(80)
266- ["path"]=>
267- string(10) "/index.php"
268- }
269-
270- --> http://www.php.net:80/index.php?: array(4) {
271- ["scheme"]=>
272- string(4) "http"
273- ["host"]=>
274- string(11) "www.php.net"
275- ["port"]=>
276- int(80)
277- ["path"]=>
278- string(10) "/index.php"
279- }
280-
281- --> http://www.php.net:80/#foo: array(5) {
282- ["scheme"]=>
283- string(4) "http"
284- ["host"]=>
285- string(11) "www.php.net"
286- ["port"]=>
287- int(80)
288- ["path"]=>
289- string(1) "/"
290- ["fragment"]=>
291- string(3) "foo"
292- }
293-
294- --> http://www.php.net:80/?#: array(4) {
295- ["scheme"]=>
296- string(4) "http"
297- ["host"]=>
298- string(11) "www.php.net"
299- ["port"]=>
300- int(80)
301- ["path"]=>
302- string(1) "/"
303- }
304-
305- --> http://www.php.net:80/?test=1: array(5) {
306- ["scheme"]=>
307- string(4) "http"
308- ["host"]=>
309- string(11) "www.php.net"
310- ["port"]=>
311- int(80)
312- ["path"]=>
313- string(1) "/"
314- ["query"]=>
315- string(6) "test=1"
316- }
317-
318- --> http://www.php.net/?test=1&: array(4) {
319- ["scheme"]=>
320- string(4) "http"
321- ["host"]=>
322- string(11) "www.php.net"
323- ["path"]=>
324- string(1) "/"
325- ["query"]=>
326- string(7) "test=1&"
327- }
328-
329- --> http://www.php.net:80/?&: array(5) {
330- ["scheme"]=>
331- string(4) "http"
332- ["host"]=>
333- string(11) "www.php.net"
334- ["port"]=>
335- int(80)
336- ["path"]=>
337- string(1) "/"
338- ["query"]=>
339- string(1) "&"
340- }
341-
342- --> http://www.php.net:80/index.php?test=1&: array(5) {
343- ["scheme"]=>
344- string(4) "http"
345- ["host"]=>
346- string(11) "www.php.net"
347- ["port"]=>
348- int(80)
349- ["path"]=>
350- string(10) "/index.php"
351- ["query"]=>
352- string(7) "test=1&"
353- }
354-
355- --> http://www.php.net/index.php?&: array(4) {
356- ["scheme"]=>
357- string(4) "http"
358- ["host"]=>
359- string(11) "www.php.net"
360- ["path"]=>
361- string(10) "/index.php"
362- ["query"]=>
363- string(1) "&"
364- }
365-
366- --> http://www.php.net:80/index.php?foo&: array(5) {
367- ["scheme"]=>
368- string(4) "http"
369- ["host"]=>
370- string(11) "www.php.net"
371- ["port"]=>
372- int(80)
373- ["path"]=>
374- string(10) "/index.php"
375- ["query"]=>
376- string(4) "foo&"
377- }
378-
379- --> http://www.php.net/index.php?&foo: array(4) {
380- ["scheme"]=>
381- string(4) "http"
382- ["host"]=>
383- string(11) "www.php.net"
384- ["path"]=>
385- string(10) "/index.php"
386- ["query"]=>
387- string(4) "&foo"
388- }
389-
390- --> http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI: array(5) {
391- ["scheme"]=>
392- string(4) "http"
393- ["host"]=>
394- string(11) "www.php.net"
395- ["port"]=>
396- int(80)
397- ["path"]=>
398- string(10) "/index.php"
399- ["query"]=>
400- string(31) "test=1&test2=char&test3=mixesCI"
401- }
402-
403- --> www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(5) {
404- ["host"]=>
405- string(11) "www.php.net"
406- ["port"]=>
407- int(80)
408- ["path"]=>
409- string(10) "/index.php"
410- ["query"]=>
411- string(31) "test=1&test2=char&test3=mixesCI"
412- ["fragment"]=>
413- string(16) "some_page_ref123"
414- }
415-
416- --> http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
417- ["scheme"]=>
418- string(4) "http"
419- ["host"]=>
420- string(11) "www.php.net"
421- ["port"]=>
422- int(80)
423- ["user"]=>
424- string(6) "secret"
425- ["path"]=>
426- string(10) "/index.php"
427- ["query"]=>
428- string(31) "test=1&test2=char&test3=mixesCI"
429- ["fragment"]=>
430- string(16) "some_page_ref123"
431- }
432-
433- --> http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
434- ["scheme"]=>
435- string(4) "http"
436- ["host"]=>
437- string(11) "www.php.net"
438- ["user"]=>
439- string(6) "secret"
440- ["pass"]=>
441- string(0) ""
442- ["path"]=>
443- string(10) "/index.php"
444- ["query"]=>
445- string(31) "test=1&test2=char&test3=mixesCI"
446- ["fragment"]=>
447- string(16) "some_page_ref123"
448- }
449-
450- --> http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(8) {
451- ["scheme"]=>
452- string(4) "http"
453- ["host"]=>
454- string(11) "www.php.net"
455- ["port"]=>
456- int(80)
457- ["user"]=>
458- string(0) ""
459- ["pass"]=>
460- string(7) "hideout"
461- ["path"]=>
462- string(10) "/index.php"
463- ["query"]=>
464- string(31) "test=1&test2=char&test3=mixesCI"
465- ["fragment"]=>
466- string(16) "some_page_ref123"
467- }
468-
469- --> http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
470- ["scheme"]=>
471- string(4) "http"
472- ["host"]=>
473- string(11) "www.php.net"
474- ["user"]=>
475- string(6) "secret"
476- ["pass"]=>
477- string(7) "hideout"
478- ["path"]=>
479- string(10) "/index.php"
480- ["query"]=>
481- string(31) "test=1&test2=char&test3=mixesCI"
482- ["fragment"]=>
483- string(16) "some_page_ref123"
484- }
485-
486- --> http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(7) {
487- ["scheme"]=>
488- string(4) "http"
489- ["host"]=>
490- string(11) "www.php.net"
491- ["port"]=>
492- int(80)
493- ["user"]=>
494- string(14) "secret@hideout"
495- ["path"]=>
496- string(10) "/index.php"
497- ["query"]=>
498- string(31) "test=1&test2=char&test3=mixesCI"
499- ["fragment"]=>
500- string(16) "some_page_ref123"
501- }
502-
503- --> http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123: array(8) {
504- ["scheme"]=>
505- string(4) "http"
506- ["host"]=>
507- string(11) "www.php.net"
508- ["port"]=>
509- int(80)
510- ["user"]=>
511- string(6) "secret"
512- ["pass"]=>
513- string(7) "hid:out"
514- ["path"]=>
515- string(10) "/index.php"
516- ["query"]=>
517- string(31) "test=1&test2=char&test3=mixesCI"
518- ["fragment"]=>
519- string(16) "some_page_ref123"
520- }
521-
522- --> nntp://news.php.net: array(2) {
523- ["scheme"]=>
524- string(4) "nntp"
525- ["host"]=>
526- string(12) "news.php.net"
527- }
528-
529- --> ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz: array(3) {
530- ["scheme"]=>
531- string(3) "ftp"
532- ["host"]=>
533- string(11) "ftp.gnu.org"
534- ["path"]=>
535- string(22) "/gnu/glic/glibc.tar.gz"
536- }
537-
538- --> zlib:http://foo@bar: array(2) {
539- ["scheme"]=>
540- string(4) "zlib"
541- ["path"]=>
542- string(14) "http://foo@bar"
543- }
544-
545- --> zlib:filename.txt: array(2) {
546- ["scheme"]=>
547- string(4) "zlib"
548- ["path"]=>
549- string(12) "filename.txt"
550- }
551-
552- --> zlib:/path/to/my/file/file.txt: array(2) {
553- ["scheme"]=>
554- string(4) "zlib"
555- ["path"]=>
556- string(25) "/path/to/my/file/file.txt"
557- }
558-
559- --> foo://foo@bar: array(3) {
560- ["scheme"]=>
561- string(3) "foo"
562- ["host"]=>
563- string(3) "bar"
564- ["user"]=>
565- string(3) "foo"
566- }
567-
568- --> mailto:me@mydomain.com: array(2) {
569- ["scheme"]=>
570- string(6) "mailto"
571- ["path"]=>
572- string(15) "me@mydomain.com"
573- }
574-
575- --> /foo.php?a=b&c=d: array(2) {
576- ["path"]=>
577- string(8) "/foo.php"
578- ["query"]=>
579- string(7) "a=b&c=d"
580- }
581-
582- --> foo.php?a=b&c=d: array(2) {
583- ["path"]=>
584- string(7) "foo.php"
585- ["query"]=>
586- string(7) "a=b&c=d"
587- }
588-
589- --> http://user:passwd@www.example.com:8080?bar=1&boom=0: array(6) {
590- ["scheme"]=>
591- string(4) "http"
592- ["host"]=>
593- string(15) "www.example.com"
594- ["port"]=>
595- int(8080)
596- ["user"]=>
597- string(4) "user"
598- ["pass"]=>
599- string(6) "passwd"
600- ["query"]=>
601- string(12) "bar=1&boom=0"
602- }
603-
604- --> file:///path/to/file: array(2) {
605- ["scheme"]=>
606- string(4) "file"
607- ["path"]=>
608- string(13) "/path/to/file"
609- }
610-
611- --> file://path/to/file: array(3) {
612- ["scheme"]=>
613- string(4) "file"
614- ["host"]=>
615- string(4) "path"
616- ["path"]=>
617- string(8) "/to/file"
618- }
619-
620- --> file:/path/to/file: array(2) {
621- ["scheme"]=>
622- string(4) "file"
623- ["path"]=>
624- string(13) "/path/to/file"
625- }
626-
627- --> http://1.2.3.4:/abc.asp?a=1&b=2: array(4) {
628- ["scheme"]=>
629- string(4) "http"
630- ["host"]=>
631- string(7) "1.2.3.4"
632- ["path"]=>
633- string(8) "/abc.asp"
634- ["query"]=>
635- string(7) "a=1&b=2"
636- }
637-
638- --> http://foo.com#bar: array(3) {
639- ["scheme"]=>
640- string(4) "http"
641- ["host"]=>
642- string(7) "foo.com"
643- ["fragment"]=>
644- string(3) "bar"
645- }
646-
647- --> scheme:: array(1) {
648- ["scheme"]=>
649- string(6) "scheme"
650- }
651-
652- --> foo+bar://baz@bang/bla: array(4) {
653- ["scheme"]=>
654- string(7) "foo+bar"
655- ["host"]=>
656- string(4) "bang"
657- ["user"]=>
658- string(3) "baz"
659- ["path"]=>
660- string(4) "/bla"
661- }
662-
663- --> gg:9130731: array(2) {
664- ["scheme"]=>
665- string(2) "gg"
666- ["path"]=>
667- string(7) "9130731"
668- }
669-
670- --> http://user:@pass@host/path?argument?value#etc: array(7) {
671- ["scheme"]=>
672- string(4) "http"
673- ["host"]=>
674- string(4) "host"
675- ["user"]=>
676- string(4) "user"
677- ["pass"]=>
678- string(5) "@pass"
679- ["path"]=>
680- string(5) "/path"
681- ["query"]=>
682- string(14) "argument?value"
683- ["fragment"]=>
684- string(3) "etc"
685- }
686-
687- --> http://10.10.10.10/:80: array(3) {
688- ["scheme"]=>
689- string(4) "http"
690- ["host"]=>
691- string(11) "10.10.10.10"
692- ["path"]=>
693- string(4) "/:80"
694- }
695-
696- --> http://x:?: array(2) {
697- ["scheme"]=>
698- string(4) "http"
699- ["host"]=>
700- string(1) "x"
701- }
702-
703- --> x:blah.com: array(2) {
704- ["scheme"]=>
705- string(1) "x"
706- ["path"]=>
707- string(8) "blah.com"
708- }
709-
710- --> x:/blah.com: array(2) {
711- ["scheme"]=>
712- string(1) "x"
713- ["path"]=>
714- string(9) "/blah.com"
715- }
716-
717- --> x://::abc/?: bool(false)
718-
719- --> http://::?: array(2) {
720- ["scheme"]=>
721- string(4) "http"
722- ["host"]=>
723- string(1) ":"
724- }
725-
726- --> http://::#: array(2) {
727- ["scheme"]=>
728- string(4) "http"
729- ["host"]=>
730- string(1) ":"
731- }
732-
733- --> x://::6.5: array(3) {
734- ["scheme"]=>
735- string(1) "x"
736- ["host"]=>
737- string(1) ":"
738- ["port"]=>
739- int(6)
740- }
741-
742- --> http://?:/: bool(false)
743-
744- --> http://@?:/: bool(false)
745-
746- --> file:///:: array(2) {
747- ["scheme"]=>
748- string(4) "file"
749- ["path"]=>
750- string(2) "/:"
751- }
752-
753- --> file:///a:/: array(2) {
754- ["scheme"]=>
755- string(4) "file"
756- ["path"]=>
757- string(3) "a:/"
758- }
759-
760- --> file:///ab:/: array(2) {
761- ["scheme"]=>
762- string(4) "file"
763- ["path"]=>
764- string(5) "/ab:/"
765- }
766-
767- --> file:///a:/: array(2) {
768- ["scheme"]=>
769- string(4) "file"
770- ["path"]=>
771- string(3) "a:/"
772- }
773-
774- --> file:///@:/: array(2) {
775- ["scheme"]=>
776- string(4) "file"
777- ["path"]=>
778- string(3) "@:/"
779- }
780-
781- --> file:///:80/: array(2) {
782- ["scheme"]=>
783- string(4) "file"
784- ["path"]=>
785- string(5) "/:80/"
786- }
787-
788- --> []: array(1) {
789- ["path"]=>
790- string(2) "[]"
791- }
792-
793- --> http://[x:80]/: array(3) {
794- ["scheme"]=>
795- string(4) "http"
796- ["host"]=>
797- string(6) "[x:80]"
798- ["path"]=>
799- string(1) "/"
800- }
801-
802- --> : array(1) {
803- ["path"]=>
804- string(0) ""
805- }
806-
807- --> /: array(1) {
808- ["path"]=>
809- string(1) "/"
810- }
811-
812- --> /rest/Users?filter={"id":"123"}: array(2) {
813- ["path"]=>
814- string(11) "/rest/Users"
815- ["query"]=>
816- string(19) "filter={"id":"123"}"
817- }
818-
819- --> http:///blah.com: bool(false)
820-
821- --> http://:80: bool(false)
822-
823- --> http://user@:80: bool(false)
824-
825- --> http://user:pass@:80: bool(false)
826-
827- --> http://:: bool(false)
828-
829- --> http://@/: bool(false)
830-
831- --> http://@:/: bool(false)
832-
833- --> http://:/: bool(false)
834-
835- --> http://?: bool(false)
836-
837- --> http://#: bool(false)
838-
839- --> http://?:: bool(false)
840-
841- --> http://:?: bool(false)
842-
843- --> http://blah.com:123456: bool(false)
844-
845- --> http://blah.com:abcdef: bool(false)
846- Done