Re: Re: PHP 8 is_file/is_dir input handling

From: Date: Tue, 01 Dec 2020 17:56:42 +0000
Subject: Re: Re: PHP 8 is_file/is_dir input handling
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-112341@lists.php.net to get a copy of this message
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

« previous php.internals (#112341) next »