1--TEST-- 2readline_completion_function(): Basic test 3--EXTENSIONS-- 4readline 5--FILE-- 6<?php 7 8function foo() { } 9 10$data = array( 11 'foo', 12 'strtolower', 13 1, 14 1.1231 15); 16 17foreach ($data as $callback) { 18 try { 19 var_dump(readline_completion_function($callback)); 20 } catch (\TypeError $e) { 21 echo $e->getMessage() . \PHP_EOL; 22 } 23} 24 25?> 26--EXPECT-- 27bool(true) 28bool(true) 29readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given 30readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given 31