```php
strlen($location) > strlen($suitablePath)
```
->
```php
$location > $suitablePath
```

Why not break the loop?