phpseclib\Net\SSH2::setTimeout PHP Method

setTimeout() public method

$ssh->exec('ping 127.0.0.1'); on a Linux host will never return and will run indefinitely. setTimeout() makes it so it'll timeout. Setting $timeout to false or 0 will mean there is no timeout.
public setTimeout ( mixed $timeout )
$timeout mixed
    function setTimeout($timeout)
    {
        $this->timeout = $this->curTimeout = $timeout;
    }