1--TEST--
2readline_callback_handler_install(): Basic test
3--SKIPIF--
4<?php if (!extension_loaded("readline") || !function_exists('readline_callback_handler_install')) die("skip");
5if (READLINE_LIB != "libedit") die("skip libedit only");
6?>
7--FILE--
8<?php
9
10function foo() {
11	readline_callback_handler_remove();
12}
13
14var_dump(readline_callback_handler_install('testing: ', 'foo'));
15var_dump(readline_callback_handler_install('testing: ', 'foobar!'));
16var_dump(readline_callback_handler_install('testing: '));
17
18?>
19--EXPECTF--
20bool(true)
21
22Warning: readline_callback_handler_install(): foobar! is not callable in %s on line %d
23bool(false)
24
25Warning: readline_callback_handler_install() expects exactly 2 parameters, 1 given in %s on line %d
26NULL
27