xref: /PHP-7.3/ext/curl/tests/bug72202.phpt (revision b12dfbad)
1--TEST--
2Bug #72202 (curl_close doesn't close cURL handle)
3--SKIPIF--
4<?php
5if (!extension_loaded("curl")) {
6	exit("skip curl extension not loaded");
7}
8if (getenv("SKIP_ONLINE_TESTS")) {
9	die("skip online test");
10}
11?>
12--FILE--
13<?php
14$a = fopen(__FILE__, "r");
15$b = $a;
16var_dump($a, $b);
17fclose($a);
18var_dump($a, $b);
19unset($a, $b);
20
21$a = curl_init();
22$b = $a;
23var_dump($a, $b);
24curl_close($a);
25var_dump($a, $b);
26unset($a, $b);
27?>
28--EXPECTF--
29resource(%d) of type (stream)
30resource(%d) of type (stream)
31resource(%d) of type (Unknown)
32resource(%d) of type (Unknown)
33resource(%d) of type (curl)
34resource(%d) of type (curl)
35resource(%d) of type (Unknown)
36resource(%d) of type (Unknown)
37