3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); namespace Test\Biz; error_reporting(-1); class Foo { function bar($value) { if (\is_callable($value)) { return $this->baz($value); } } function baz(callable $callable): string { return $callable; } } echo (new Foo())->bar('\Test\Biz\Foo::bar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1CEnC
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   INIT_NS_FCALL_BY_NAME                                        'Test%5CBiz%5Cerror_reporting'
          1        SEND_VAL_EX                                                  -1
          2        DO_FCALL                                          0          
   23     3        NEW                                                  $1      'Test%5CBiz%5CFoo'
          4        DO_FCALL                                          0          
          5        INIT_METHOD_CALL                                             $1, 'bar'
          6        SEND_VAL_EX                                                  '%5CTest%5CBiz%5CFoo%3A%3Abar'
          7        DO_FCALL                                          0  $3      
          8        ECHO                                                         $3
          9      > RETURN                                                       1

Class Test\Biz\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1CEnC
function name:  bar
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   12     1        INIT_FCALL                                                   'is_callable'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $1      
          4      > JMPZ                                                         $1, ->9
   13     5    >   INIT_METHOD_CALL                                             'baz'
          6        SEND_VAR_EX                                                  !0
          7        DO_FCALL                                          0  $2      
          8      > RETURN                                                       $2
   15     9    > > RETURN                                                       null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1CEnC
function name:  baz
number of ops:  5
compiled vars:  !0 = $callable
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   RECV                                                 !0      
   19     1        VERIFY_RETURN_TYPE                                           !0
          2      > RETURN                                                       !0
   20     3*       VERIFY_RETURN_TYPE                                           
          4*     > RETURN                                                       null

End of function baz

End of class Test\Biz\Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
224.49 ms | 2142 KiB | 15 Q