I have this code in php to get the difference between two dates. I'm getting the difference but it's always positive. I need the difference to be negative when the final date has passed. I've tried format(), invert, but nothing seems to work.

```
function dias_transcurridos($fecha_i, $fecha_f)
{
$dias = (strtotime($fecha_i) - strtotime($fecha_f)) / 86400;
$dias = abs($dias);
$dias = floor($dias);
return $dias;
}
$hoy = date('Y-m-d');

```

Then I call the code in my loop:

```
$elPlazo =  dias_transcurridos($row["DateEnd"], $hoy);
echo "<td>" . $elPlazo . " Días</td>\n";

```

How can I get $elPlazo (the difference) as a negative number when the end date has passed today?