Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if the class method exists
method_exists(object|string $object_or_classstring $method): bool
        }




        if (
method_exists($c'getReadTimeout')) {

            
$timeout $c->getReadTimeout();

        } else {

            
$timeout $c->getTimeout();
                $ellipsis $ellipsis->attr['ellipsis'] ?? 0;



                if (
is_file($f['file']) && <= self::$srcContext) {

                    if (!empty(
$f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) {

                        
$template null;

                        if (isset(
$f['object'])) {

                            
$template $f['object'];
                        }

                        if (
null !== $template) {

                            
$ellipsis 0;

                            
$templateSrc method_exists($template'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template'getSource') ? $template->getSource() : '');

                            
$templateInfo $template->getDebugInfo();

                            if (isset(
$templateInfo[$f['line']])) {

                                if (!
method_exists($template'getSourceContext') || !is_file($templatePath $template->getSourceContext()->getPath())) {
                            $templateSrc method_exists($template'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template'getSource') ? $template->getSource() : '');

                            
$templateInfo $template->getDebugInfo();

                            if (isset(
$templateInfo[$f['line']])) {

                                if (!
method_exists($template'getSourceContext') || !is_file($templatePath $template->getSourceContext()->getPath())) {

                                    
$templatePath null;

                                }

                                if (
$templateSrc) {
        $prefix Caster::PREFIX_VIRTUAL;

        
$a += [

            
$prefix.'inTransaction' => method_exists($c'inTransaction'),

            
$prefix.'errorInfo' => $c->errorInfo(),

            
$prefix.'attributes' => new EnumStub($attr),

        ];
    {

        
$x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : [];



        if (
method_exists($c'getFileName') && $m $c->getFileName()) {

            
$x['file'] = new LinkStub($m$c->getStartLine());

            
$x['line'] = $c->getStartLine().' to '.$c->getEndLine();

        }
                continue;

            }



            if (
method_exists($c$m) && false !== ($m $c->$m()) && null !== $m) {

                
$a[$prefix.$k] = $m instanceof \Reflector $m->name $m;

            }

        }
        if (!($flags \ArrayObject::STD_PROP_LIST)) {

            
$c->setFlags(\ArrayObject::STD_PROP_LIST);

            
$a Caster::castObject($c\get_class($c), method_exists($c'__debugInfo'), $stub->class);

            
$c->setFlags($flags);

        }

        if (
\PHP_VERSION_ID 70400) {
        $a[Caster::PREFIX_VIRTUAL.'toBase32'] = $uuid->toBase32();




        if (
method_exists($uuid'getDateTime')) {

            
$a[Caster::PREFIX_VIRTUAL.'time'] = $uuid->getDateTime()->format('Y-m-d H:i:s.u \U\T\C');

        }
        $a[Caster::PREFIX_VIRTUAL.'toRfc4122'] = $ulid->toRfc4122();




        if (
method_exists($ulid'getDateTime')) {

            
$a[Caster::PREFIX_VIRTUAL.'time'] = $ulid->getDateTime()->format('Y-m-d H:i:s.v \U\T\C');

        }
        } else {

            
$i 2;

            
$parents = [$class];

            
$hasDebugInfo method_exists($class'__debugInfo');



            foreach (
class_parents($class) as $p) {

                
$parents[] = $p;
                    } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) {

                        
$template $trace[$i]['object'];

                        
$name $template->getTemplateName();

                        
$src method_exists($template'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template'getSource') ? $template->getSource() : false);

                        
$info $template->getDebugInfo();

                        if (isset(
$info[$trace[$i 1]['line']])) {

                            
$line $info[$trace[$i 1]['line']];
                        $info $template->getDebugInfo();

                        if (isset(
$info[$trace[$i 1]['line']])) {

                            
$line $info[$trace[$i 1]['line']];

                            
$file method_exists($template'getSourceContext') ? $template->getSourceContext()->getPath() : null;



                            if (
$src) {

                                
$src explode("\n"$src);
        foreach (['setLogCb''setOffsetCommitCb''setStatsCb''setConsumeCb'] as $method) {

            if (
method_exists($conf$method)) {

                
$conf->{$method}(function () {});

            }

        }
        $this->assertDumpEquals($expectedDump$uuid);



        
$uuid = new UuidV6('1ebc50e9-8a23-6704-ad6f-59afd5cda7e5');

        if (
method_exists($uuid'getDateTime')) {

            
$expectedDump = <<<EODUMP

Symfony\Component\Uid\UuidV6 {

  #uid: "1ebc50e9-8a23-6704-ad6f-59afd5cda7e5"