WordPress at a glance
function is not described

PHPMailer\PHPMailer

PHPMailer::mb_pathinfo() public WP 1.0

Multi-byte-safe pathinfo replacement. Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.

{} It's a method of the class: PHPMailer{}

No Hooks.

Return

String|Array. Nothing.

Usage

$result = PHPMailer::mb_pathinfo( $path, $options );
$path(string) (required)
A filename or path, does not need to exist as a file
$options(int|string)
Either a PATHINFO_* constant, or a string name to return only the specified piece

Notes

Code of PHPMailer::mb_pathinfo() WP 5.7.2

<?php
public static function mb_pathinfo($path, $options = null)
{
    $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''];
    $pathinfo = [];
    if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) {
        if (array_key_exists(1, $pathinfo)) {
            $ret['dirname'] = $pathinfo[1];
        }
        if (array_key_exists(2, $pathinfo)) {
            $ret['basename'] = $pathinfo[2];
        }
        if (array_key_exists(5, $pathinfo)) {
            $ret['extension'] = $pathinfo[5];
        }
        if (array_key_exists(3, $pathinfo)) {
            $ret['filename'] = $pathinfo[3];
        }
    }
    switch ($options) {
        case PATHINFO_DIRNAME:
        case 'dirname':
            return $ret['dirname'];
        case PATHINFO_BASENAME:
        case 'basename':
            return $ret['basename'];
        case PATHINFO_EXTENSION:
        case 'extension':
            return $ret['extension'];
        case PATHINFO_FILENAME:
        case 'filename':
            return $ret['filename'];
        default:
            return $ret;
    }
}