> 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.
>

Here: https://3v4l.org/LHcmN 
(https://link.getmailspring.com/link/cf1dfc14-e01b-46b3-9719-6dca72108...@getmailspring.com/0?redirect=https%3A%2F%2F3v4l.org%2FLHcmN&recipient=aW50ZXJuYWxzQGxpc3RzLnBocC5uZXQ%3D)
On Dec 1 2020, at 6:56 pm, Aimeos | Norbert Sendetzky <norb...@aimeos.com> 
wrote:
> 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
>

Reply via email to