PluginProbe
WPIDE – File Manager & Code Editor / 3.5.8
WPIDE – File Manager & Code Editor v3.5.8
3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 3.4 All 54 releases
wpide / _compat.php

_compat.php in WPIDE – File Manager & Code Editor 3.5.8, at _compat.php

19 lines 642 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! function_exists( 'str_contains' ) ) {
3 /**
4 * Polyfill for `str_contains()` function added in PHP 8.0. since WP 5.9.0
5 *
6 * Performs a case-sensitive check indicating if needle is
7 * contained in haystack.
8 *
9 * @param string $haystack The string to search in.
10 * @param string $needle The substring to search for in the haystack.
11 * @return bool True if `$needle` is in `$haystack`, otherwise false.
12 *@since 1.0.0
13 *
14 */
15 function str_contains(string $haystack, string $needle ): bool
16 {
17 return ( '' === $needle || false !== strpos( $haystack, $needle ) );
18 }
19 }