concrete/src/File/Service/File.php
public function isSamePath($path1, $path2)
    {
        $path1 = str_replace(DIRECTORY_SEPARATOR, '/', $path1);
        $path2 = str_replace(DIRECTORY_SEPARATOR, '/', $path2);
        // Check if OS is case insensitive
        $checkFile = strtoupper(__FILE__);
        if ($checkFile === __FILE__) {
            $checkFile = strtolower(__FILE__);
        }
        if (@is_file($checkFile)) {
            $same = (strcasecmp($path1, $path2) === 0) ? true : false;
        } else {
            $same = ($path1 === $path2) ? true : false;
        }

        return $same;
    }
public function isSamePath($path1, $path2)
    {
        $path1 = str_replace(DIRECTORY_SEPARATOR, '/', $path1);
        $path2 = str_replace(DIRECTORY_SEPARATOR, '/', $path2);
        // Check if OS is case insensitive
        $checkFile = strtoupper(__FILE__);
        if ($checkFile === __FILE__) {
            $checkFile = strtolower(__FILE__);
        }
        if (@is_file($checkFile)) {
            $same = (strcasecmp($path1, $path2) === 0) ? true : false;
        } else {
            $same = ($path1 === $path2) ? true : false;
        }

        return $same;
    }
public function isSamePath ( $ path1 , $ path2 ) { $ path1 = str_replace ( DIRECTORY_SEPARATOR , '/' , $ path1 ) ; $ path2 = str_replace ( DIRECTORY_SEPARATOR , '/' , $ path2 ) ; // Check if OS is case insensitive $ checkFile = strtoupper ( __FILE__ ) ; if ( $ checkFile === __FILE__ ) { $ checkFile = strtolower ( __FILE__ ) ; } if ( @ is_file ( $ checkFile ) ) { $ same = ( strcasecmp ( $ path1 , $ path2 ) === 0 ) ? true : false ; } else { $ same = ( $ path1 === $ path2 ) ? true : false ; } return $ same ; }
Checks if two path are the same, considering directory separator and OS case sensitivity.

@param string $path1
@param string $path2

@return bool
Checks if two path are the same considering directory separator and OS case sensitivity .