Jump to content

[Answered] PHP


goman60

Recommended Posts

Our versions of cPanel do not support PHP 8.0, so we are unable to support this at this time.

 

It's logically equivalent to this except for the case sensitivity:

function str_contains($haystack,$needle)
{
     return !empty(stristr($haystack,$needle));
}

EDIT: Not case sensitive like str_contains, but is a boolean return function that checks for presence of a string like it. In all prior versions of PHP, the stristr() method is the standard. Anyone who's used PHP for any length of time likely will know and use that method unless they really need it to be case-sensitive (which in my experience is usually not desired).

Edited by wolstech
Substitute is not case sensitive
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...