1--TEST-- 2readline_callback_handler_install(): Basic test 3--EXTENSIONS-- 4readline 5--SKIPIF-- 6<?php if (!function_exists('readline_callback_handler_install')) die("skip"); 7if (READLINE_LIB != "libedit") die("skip libedit only"); 8?> 9--INI-- 10zend.signal_check=0 11--FILE-- 12<?php 13 14function foo() { 15 readline_callback_handler_remove(); 16} 17 18var_dump(readline_callback_handler_install('testing: ', 'foo')); 19try { 20 var_dump(readline_callback_handler_install('testing: ', 'foobar!')); 21} catch (TypeError $e) { 22 echo $e->getMessage(), "\n"; 23} 24 25?> 26--EXPECT-- 27bool(true) 28readline_callback_handler_install(): Argument #2 ($callback) must be a valid callback, function "foobar!" not found or invalid function name 29