back to dev [ci skip]
[m6w6/ext-http] / tests / message004.phpt
index de2e4e415e10d8fe1990303da9c757273480e378..e1c9aa976be766b78e49b4d957ac8efc63f7df61 100644 (file)
@@ -2,18 +2,23 @@
 message reversal
 --SKIPIF--
 <?php
-include "skip.inc";
+include "skipif.inc";
+?>
 --FILE--
 <?php
 
 use http\Message as HttpMessage;
 
+function newHttpMessage($s) {
+       return new http\Message($s);
+}
+
 $s = "GET /first HTTP/1.1\nHTTP/1.1 200 Ok-first\nGET /second HTTP/1.1\nHTTP/1.1 200 Ok-second\nGET /third HTTP/1.1\nHTTP/1.1 200 Ok-third\n";
-echo (new HttpMessage($s))->toString(true);
+echo newHttpMessage($s)->toString(true);
 echo "===\n";
-echo (new HttpMessage($s))->reverse()->toString(true);
+echo newHttpMessage($s)->reverse()->toString(true);
 
-$m = new HttpMessage($s);
+$m = newHttpMessage($s);
 $r = $m->reverse();
 unset($m);
 var_dump($r->count());