xref: /PHP-8.3/ext/curl/tests/gh15547.phpt (revision cc67220e)
1--TEST--
2GH-15547 - curl_multi_select overflow on timeout argument
3--EXTENSIONS--
4curl
5--FILE--
6<?php
7
8$mh = curl_multi_init();
9var_dump(curl_multi_select($mh, -2500000));
10var_dump(curl_multi_strerror(curl_multi_errno($mh)));
11curl_multi_close($mh);
12$mh = curl_multi_init();
13var_dump(curl_multi_select($mh, 2500000));
14var_dump(curl_multi_strerror(curl_multi_errno($mh)));
15curl_multi_close($mh);
16$mh = curl_multi_init();
17var_dump(curl_multi_select($mh, 1000000));
18var_dump(curl_multi_strerror(curl_multi_errno($mh)));
19?>
20--EXPECTF--
21Warning: curl_multi_select(): timeout must be between 0 and %d in %s on line %d
22int(-1)
23%s
24
25Warning: curl_multi_select(): timeout must be between 0 and %d in %s on line %d
26int(-1)
27%s
28int(0)
29string(8) "No error"
30