2

When i run php -a It brings up a handy shell for testing code quickly along with a history of every line I type. Is there any way to clear this history?

Using php 5.5.9 if this makes any difference

phil
  • 361
  • 2
  • 9
  • it will help... http://stackoverflow.com/questions/13768437/change-save-path-of-php-interactive-shell-history – Elangovan Jul 01 '15 at 11:06

3 Answers3

6

On my linux laptop, there's a ~/.php_history that contains the ... history.

Armage
  • 657
  • 8
  • 18
3

For clear history you can use readline_clear_history()

readline_clear_history ( void );

This function clears the entire command line history.

Return Values

Returns TRUE on success or FALSE on failure.

Saty
  • 22,443
  • 7
  • 33
  • 51
0

For Windows users, you can find the .php_history file in your home directory as well. I found mine at C:\Users\{my_name}\.php_history

Chan Yung Keat
  • 605
  • 6
  • 13