Re: Is warning guaranteed if it returns false?
| From: | Rene Veerman | Date: | Wed, 20 Dec 2023 06:48:45 +0000 |
| Subject: | Re: Is warning guaranteed if it returns false? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328336@lists.php.net to get a copy of this message | ||
i recommend you always check the specific return codes for any given
built-in functions, and let the main error handler merely write
errorLogEntries into a database.
Met vriendelijke groet,
Rene AJM Veerman
Eigenaar + Algemeen, Technisch & Financieel directeur van
https://nicer.app en gerelateerde websites.
Owner + CEO, CTO & CFO for https://nicer.app and related
websites.
see also https://facebook.com/rene.veerman.90
On Wed, Dec 13, 2023 at 4:21 PM petrov.boris.v.mail.ru via php-general <
php-general@lists.php.net> wrote:
> Is there a formal rule in PHP that any built-in function returning false
> to signify a failure must also issue a warning?
>
> Or, in other words, is relying on warnings being converted to exceptions
> by error handler is equivalent to checking return value, thus makes
> checking return value unnecessary?
>