/* unfortunately no standard function does a cast to FILE*, so we need
* curl to test this */
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
-$handle=curl_init('http://127.0.0.1:37349/');
+$handle=curl_init('file:///i_dont_exist/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
--FILE--
<?php
function do_stuff($url) {
- $handle=curl_init('http://127.0.0.1:37349/');
+ $handle=curl_init('file:///i_dont_exist/');
curl_setopt($handle, CURLOPT_VERBOSE, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
--EXPECTF--
temp stream (close after):
About to rewind!
-* %ATrying 127.0.0.1...%AConnection refused%A
+* Couldn't open file /i_dont_exist/
* Closing connection%A%d
memory stream (close after):
About to rewind!
-* %ATrying 127.0.0.1...%AConnection refused%A
+* Couldn't open file /i_dont_exist/
* Closing connection%A%d
temp stream (leak):
About to rewind!
-* %ATrying 127.0.0.1...%AConnection refused%A
+* Couldn't open file /i_dont_exist/
* Closing connection%A%d
memory stream (leak):
About to rewind!
-* %ATrying 127.0.0.1...%AConnection refused%A
+* Couldn't open file /i_dont_exist/
* Closing connection%A%d
Done.