Question: I have this text file and I need to split all words and count them. In the file I have all of the following characters ("." , "," , "!" , "?" , " " , ";" , ":" , "-"). 
How do I use the split() method to make sure non of those characters will be counted?

Answer: 
I've had a quick go, just looping through and checking if there's a next value, then subtracting it, and dividing by 60 to get minutes:

```
$dates = ['2017-08-25 06:27:00', '2017-08-25 07:38:00', '2017-08-25 08:34:00', '2017-08-25 09:57:00'];

$values = [];

foreach ($dates as $index => $date) {
    $date = strtotime($date);
    if (!empty($dates[$index+1])) {
        $nextDate = strtotime($dates[$index+1]);
        $values[] = ($nextDate-$date) / 60;
    }
}

var_dump($values);

```
Convert the strings into timestamps (seconds) using [strtotime](http://php.net/manual/en/function.strtotime.php) or [strptime](http://php.net/manual/en/function.strptime.php), then simply subtract.