REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.32 KB
Close
/opt/alt/tests/alt-php81-pecl-raphf_2.0.1-1.el8/tests/http002.phpt
Text
Base64
--TEST-- pecl/http-v2 - clean with name and id --SKIPIF-- <?php if (!extension_loaded("http")) { die("skip pecl/http needed"); } if (!class_exists("http\\Client", false)) { die("skip pecl/http-v2 with curl support needed"); } ?> --FILE-- <?php echo "Test\n"; $c = new http\Client("curl", "PHP"); do { $c->enqueue(new http\Client\Request("GET", "http://php.net")); } while (count($c) < 3); unset($c); $h = (array) raphf\stat_persistent_handles(); var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h))))); raphf\clean_persistent_handles("http\\Client\\Curl"); raphf\clean_persistent_handles("http\\Client\\Curl\\Request", "PHP:php.net:80"); $h = (array) raphf\stat_persistent_handles(); var_dump(array_intersect_key($h, array_flip(preg_grep("/^http/", array_keys($h))))); ?> Done --EXPECTF-- Test array(2) { ["http\Client\Curl"]=> array(1) { ["PHP"]=> array(2) { ["used"]=> int(0) ["free"]=> int(1) } } ["http\Client\Curl\Request"]=> array(1) { ["PHP:php.net:80"]=> array(2) { ["used"]=> int(0) ["free"]=> int(3) } } } array(2) { ["http\Client\Curl"]=> array(0) { } ["http\Client\Curl\Request"]=> array(1) { ["PHP:php.net:80"]=> array(2) { ["used"]=> int(0) ["free"]=> int(0) } } } Done
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
http001.phpt
1.51 KB
lrw-r--r--
2024-07-10 12:21:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
http002.phpt
1.32 KB
lrw-r--r--
2024-07-10 12:21:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
http003.phpt
1.38 KB
lrw-r--r--
2024-07-10 12:21:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
http004.phpt
2.07 KB
lrw-r--r--
2024-07-10 12:21:03
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).