Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return part of a string
<?php substr(string $string, int $offset, ?int $length = null): string
<?php             if ($pos - 3 === strpos($glob, '://')) {

                return substr($staticPrefix, 0, $pos + 1);

            }



            return substr($staticPrefix, 0, $pos);
<?php                 return substr($staticPrefix, 0, $pos + 1);

            }



            return substr($staticPrefix, 0, $pos);

        }
<?php     public static function makeTempDir($namespace, $className)

    {

        if (false !== ($pos = strrpos($className, '\\'))) {

            $shortClass = substr($className, $pos + 1);

        } else {

            $shortClass = $className;

        }