Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns trailing name component of path
<?php basename(string $path, string $suffix = ""): string
<?php     private function testAsString(Test $test): string

    {

        if ($test->isPhpt()) {

            return basename($test->file());

        }



        assert($test instanceof TestMethod);
<?php     private function name(Test $test): string

    {

        if ($test->isPhpt()) {

            return basename($test->file());

        }



        assert($test instanceof TestMethod);
<?php     private function classNameFromFileName(string $suiteClassFile): string

    {

        $className = basename($suiteClassFile, '.php');

        $dotPos = strpos($className, '.');



        if ($dotPos !== false) {
<?php         $relativePath = ltrim($relativePath, DIRECTORY_SEPARATOR);



        $basename = basename($relativePath, '.php');



        $dotPos = strpos($basename, '.');
<?php                 continue;

            }

            $dirname = dirname($file->id());

            $basename = basename($file->id(), '.php');



            $name = $dirname === '.' ? $basename : implode(DIRECTORY_SEPARATOR, [

                $dirname,
<?php     public static function isInsideADatasetsDirectory(string $file): bool

    {

        return basename(dirname($file)) === self::DATASETS_DIR_NAME;

    }



    public static function isADatasetsFile(string $file): bool
<?php     public static function isADatasetsFile(string $file): bool

    {

        return basename($file) === self::DATASETS_FILE_NAME;

    }



    public static function scope(string $file): string
<?php it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);
<?php <?php



it(sprintf('runs file names like `%s`', basename(__FILE__)))->assertTrue(true);