why not the following ? 
```php
if (function_exists('readline') && !function_exists('readline_list_history'))
```