> On Dec 8, 2020, at 11:27 AM, Christian Schneider <cschn...@cschneid.com> > wrote: > > Am 08.12.2020 um 17:16 schrieb Mike Schinkel <m...@newclarity.net > <mailto:m...@newclarity.net>>: >> 1. Please consider making is_file() return false for an embedded \0 and no >> longer throw an exception or generate a warning. > > The PR implementing this has already been merged for inclusion in PHP 8.0.1: > https://github.com/php/php-src/pull/6478 > <https://github.com/php/php-src/pull/6478> Thanks.
> >> 2. Beyond is_file(), please consider allowing PHP to support both types of >> error handling strategies without forcing complexity just to use the 2nd >> strategy. > > > This is a contentious topic Exactly. > and will have to be handled on a case by case basis I guess. Which is really all I was asking for; that it be considered on a case-by-case basis instead of just assuming that exceptions are always preferable. > E.g. for security-related stuff a fail-early-strategy throwing an exception > might be preferable, for basic lower-level functions like is_file() returning > false was chosen to be preferable. > There is no silver bullet for all cases and having a global switch would only > make things worse. -Mike