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());