1--TEST--
2readline_info(): Basic test
3--SKIPIF--
4<?php if (!extension_loaded("readline")) die("skip");
5if (READLINE_LIB == "libedit") die("skip readline only");
6?>
7--FILE--
8<?php
9
10var_dump(readline_info());
11var_dump(readline_info(1));
12var_dump(readline_info(1,1));
13var_dump(readline_info('line_buffer'));
14var_dump(readline_info('readline_name'));
15var_dump(readline_info('readline_name', 1));
16var_dump(readline_info('readline_name'));
17var_dump(readline_info('attempted_completion_over',1));
18var_dump(readline_info('attempted_completion_over'));
19
20?>
21--EXPECTF--
22array(11) {
23  ["line_buffer"]=>
24  string(0) ""
25  ["point"]=>
26  int(0)
27  ["end"]=>
28  int(0)
29  ["mark"]=>
30  int(0)
31  ["done"]=>
32  int(0)
33  ["pending_input"]=>
34  int(0)
35  ["prompt"]=>
36  string(0) ""
37  ["terminal_name"]=>
38  string(0) ""
39  ["library_version"]=>
40  string(%d) "%s"
41  ["readline_name"]=>
42  string(5) "other"
43  ["attempted_completion_over"]=>
44  int(0)
45}
46NULL
47NULL
48string(0) ""
49string(5) "other"
50string(5) "other"
51string(1) "1"
52int(0)
53int(1)
54