1--TEST-- 2readline_info(): using line_buffer before rl_line_buffer is initialised. 3--EXTENSIONS-- 4readline 5--SKIPIF-- 6<?php if (READLINE_LIB == "libedit") die("skip readline only"); 7if (getenv('SKIP_REPEAT')) die("skip readline has global state"); 8?> 9--FILE-- 10<?php 11 12$name = tempnam('/tmp', 'readline.tmp'); 13 14var_dump(readline_info('line_buffer')); 15readline_info('line_buffer', 'abcdef'); 16var_dump(readline_info('line_buffer')); 17readline_add_history('123'); 18readline_write_history($name); 19readline_info('line_buffer', 'abcdefghijkl'); 20var_dump(readline_info('line_buffer')); 21 22var_dump(file_get_contents($name)); 23 24unlink($name); 25?> 26--EXPECTF-- 27string(0) "" 28string(6) "abcdef" 29string(12) "abcdefghijkl" 30string(4) "123 31" 32