Created
September 11, 2018 04:37
-
-
Save jongacnik/8811fb21451813ba36360017d2260d26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function str_contains ($str, $arr = []) { | |
foreach ($arr as $a) { | |
if (stripos($str, $a) !== false) return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment