1--TEST--
2ldap_(g|s)et_option() with non existing option
3--EXTENSIONS--
4ldap
5--FILE--
6<?php
7
8$ldap = ldap_connect('ldap://127.0.0.1:3333');
9try {
10    var_dump(ldap_set_option($ldap, 999999, "bogus"));
11} catch (Throwable $e) {
12    echo $e::class, ": ", $e->getMessage(), PHP_EOL;
13}
14try {
15    var_dump(ldap_get_option($ldap, 999999, $value));
16} catch (Throwable $e) {
17    echo $e::class, ": ", $e->getMessage(), PHP_EOL;
18}
19?>
20--EXPECT--
21ValueError: ldap_set_option(): Argument #2 ($option) must be a valid LDAP option
22ValueError: ldap_get_option(): Argument #2 ($option) must be a valid LDAP option
23