fnmatch

Support for fnmatch() doesn't exist on Windows pre PHP 5.3.

Description

(int) fnmatch( $pattern, $string ); 

Returns (int)

Parameters (2)

0. $pattern
The pattern.
1. $string
The string.

Usage

  1. if ( !function_exists( 'fnmatch' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/inc/aioseop_functions.php'; 
  3.  
  4. // The pattern. 
  5. $pattern = null; 
  6.  
  7. // The string. 
  8. $string = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = fnmatch($pattern, $string); 
  12.  

Defined (1)

The function is defined in the following location(s).

/inc/aioseop_functions.php  
  1. function fnmatch( $pattern, $string ) { 
  2. return preg_match( '#^' . strtr( preg_quote( $pattern, '#' ), array( 
  3. '\*' => '.*',  
  4. '\?' => '.',  
  5. ) ) . "$#i", $string );