src/Events/Event.php
public function removeHandler(callable $handler)
    {
        $key = array_search($handler, $this->eventHandlers, true);

        if ($key !== false) {
            unset($this->eventHandlers[$key]);
        }
    }
public function removeHandler(callable $handler)
    {
        $key = array_search($handler, $this->eventHandlers, true);

        if ($key !== false) {
            unset($this->eventHandlers[$key]);
        }
    }
public function removeHandler ( callable $ handler ) { $ key = array_search ( $ handler , $ this -> eventHandlers , true ) ; if ( $ key !== false ) { unset ( $ this -> eventHandlers [ $ key ] ) ; } }
Removes a specific handler. You must pass a reference to the same handler you originally attached.

@param callable $handler
Removes a specific handler . You must pass a reference to the same handler you originally attached .