xp_erase_history

xp_erase_history()

Erases the entire signal history.

Return type:void

Example #1 Basic Usage

<?php

// Create some history
xp_signal(XP_SIG('foo'), function(){});
for ($i=0;$i<10;$i++) {
    xp_emit(XP_SIG('foo'));
}

// Dump the history count
var_dump(count(xp_signal_history()));

// Erase the history
xp_erase_history();

var_dump(count(xp_signal_history()));

The above code will output.

10 ... 0