better PHP-5.3 compatibility
[m6w6/ext-http] / tests / persistenthandles001.phpt
index 01f5069bea86b75e511a9aaa3f09d3e7838b89f5..18bce8a6b9b87bfc3400eafa75bd10b36502df09 100644 (file)
@@ -4,12 +4,12 @@ persistent handles
 <?php include "skipif.inc"; ?>
 --FILE--
 <?php
-(new http\Client\Factory(array("persistentHandleId" => "foo")))
-    ->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at"))
+$f = new http\Client\Factory(array("persistentHandleId" => "foo"));
+$r = $f->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at"))
     ->setOptions(array("connecttimeout"=> 90, "timeout" =>300))
-    ->send(null); 
-$r = (new http\Client\Factory(array("persistentHandleId" => "bar")))
-    ->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at"))
+    ->send(null);
+$f = new http\Client\Factory(array("persistentHandleId" => "bar"));
+$r = $f->createClient()->setRequest(new http\Client\Request("GET", "http://dev.iworks.at"))
     ->setOptions(array("connecttimeout"=> 90, "timeout" =>300));
     
 var_dump(http\Env::statPersistentHandles());