This might be cleaner and a bit faster
```php
if (substr($ciphertext, 0, 1) != '$')
    return false

list (, $crypt, $ciphertext) = explode('$', $ciphertext, 4);
```