public function closeTab()
    {
        $prevTab = $this->getRelativeTabHandle(-1);
        $this->webDriver->close();
        $this->webDriver->switchTo()->window($prevTab);
    }
public function closeTab()
    {
        $prevTab = $this->getRelativeTabHandle(-1);
        $this->webDriver->close();
        $this->webDriver->switchTo()->window($prevTab);
    }
public function closeTab ( ) { $ prevTab = $ this -> getRelativeTabHandle ( - 1 ) ; $ this -> webDriver -> close ( ) ; $ this -> webDriver -> switchTo ( ) -> window ( $ prevTab ) ; }
Closes current browser tab and switches to previous active tab.

```php
<?php
$I->closeTab();
```

Can't be used with PhantomJS
Closes current browser tab and switches to previous active tab .