Am 01.12.20 um 18:47 schrieb G. P. B.: >>> Or is_file could check for it, handle it gracefully, and be a safe >>> function to call without worrying about this undocumented edge case. >> > Apologize my email client sent by mistake: > But this has always generated a warning see: > https://3v4l.org/7E2mv > > So this is not new behaviour.
A warning is OK but now an exception is now thrown so it's very different from versions before PHP 8. Furthermore, Christoph's code uses str_contains() which is only available in PHP 8 so it's not a good workaround if PHP 7 and 8 must be both supported. Personally, I would agree with Paul because the additional code that's necessary for the workaround complicates the user code base. Best, Norbert -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php