File "_compat.php"

Full Path: /home/attunedd/public_html/wp-content/plugins/wpide/_compat.php
File size: 814 bytes
MIME-type: text/x-php
Charset: utf-8

<?php 
/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/
?>
<?php
if ( ! function_exists( 'str_contains' ) ) {
    /**
     * Polyfill for `str_contains()` function added in PHP 8.0. since WP 5.9.0
     *
     * Performs a case-sensitive check indicating if needle is
     * contained in haystack.
     *
     * @param string $haystack The string to search in.
     * @param string $needle   The substring to search for in the haystack.
     * @return bool True if `$needle` is in `$haystack`, otherwise false.
     *@since 1.0.0
     *
     */
    function str_contains(string $haystack, string $needle ): bool
    {
        return ( '' === $needle || false !== strpos( $haystack, $needle ) );
    }
}