While parameterized queries are the preferred method, sole() adds an extra layer of protection when using raw queries, especially when only one record should match.
PHP
What’s New in PHP 8.6
A concise overview of what’s coming in PHP 8.6, including partial function application, clamp(), the new Duration class, and several smaller language and standard library improvements. Read more