`return (integer) $tail - (integer) $head;` But i dont think typecast is needed as psysh says 

``` bash
>>> (integer) false;
=> 0
>>> false - false;
=> 0
>>> false - 1;
=> -1
>>> 1 - false;
=> 1
>>>
```