Could we change this to:

```php
if (ltrim($current, $white_spaces) == '') {
```