source: src/router/php7/ext/curl/tests/curl_share_errno_strerror_001.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 5 weeks ago

update php

File size: 619 bytes
Line 
1--TEST--
2curl_share_errno and curl_share_strerror basic test
3--SKIPIF--
4<?php
5if (!extension_loaded("curl")) {
6            exit("skip curl extension not loaded");
7}
8$curl_version = curl_version();
9if ($curl_version['version_number'] < 0x070c00) {
10        exit("skip: test works only with curl >= 7.12.0");
11}
12?>
13--FILE--
14<?php
15
16$sh = curl_share_init();
17$errno = curl_share_errno($sh);
18echo $errno . PHP_EOL;
19echo curl_share_strerror($errno) . PHP_EOL;
20
21@curl_share_setopt($sh, -1, -1);
22$errno = curl_share_errno($sh);
23echo $errno . PHP_EOL;
24echo curl_share_strerror($errno) . PHP_EOL;
25?>
26--EXPECTF--
270
28No error
291
30Unknown share option
Note: See TracBrowser for help on using the repository browser.