Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<readline_callback_read_charreadline_completion_function>
^Readline FunctionsLast updated: Mon, 26 Oct 2026

readline_clear_history

(PHP 4, PHP 5, PHP 7, PHP 8)

readline_clear_history — Clears the history

Description

function readline_clear_history(): true

This function clears the entire command line history.

Parameters

This function has no parameters.

Return Values

Always returns true.

Changelog

Version Description
8.5.0 The return type is true now; previously, it was bool.

<readline_callback_read_charreadline_completion_function>
^Readline FunctionsLast updated: Mon, 26 Oct 2026