3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ParserReflection\Stub; abstract class AbstractClassWithMethods { const TEST = 5; public function __construct(){} public function __destruct(){} public function explicitPublicFunc(){} function implicitPublicFunc(){} protected function protectedFunc(){} private function privateFunc(){} static function staticFunc(){} abstract function abstractFunc(); final function finalFunc(){} /** * @return string */ public function funcWithDocAndBody() { static $a =5, $test = '1234'; return 'hello'; } /** * @return \Generator */ public function generatorYieldFunc() { $index = 0; while ($index < 1e3) { yield $index; } } /** * @return int */ public function noGeneratorFunc() { $gen = function () { yield 10; }; return 10; } private function testParam($a, $b = null, $c = self::class, $d = self::TEST) {} } $refMethod = new \ReflectionMethod('ParserReflection\Stub\AbstractClassWithMethods', 'testParam'); echo "Exported: ", $refMethod;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  (null)
number of ops:  8
compiled vars:  !0 = $refMethod
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'ParserReflection%5CStub%5CAbstractClassWithMethods'
          2        SEND_VAL_EX                                              'testParam'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   57     5        ECHO                                                     'Exported%3A+'
          6        ECHO                                                     !0
          7      > RETURN                                                   1

Function %00parserreflection%5Cstub%5C%7Bclosure%7D%2Fin%2FP9DXo%3A45%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/P9DXo
function name:  ParserReflection\Stub\{closure}
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   GENERATOR_CREATE                                         
   46     1        YIELD                                                    10
   47     2      > GENERATOR_RETURN                                         

End of function %00parserreflection%5Cstub%5C%7Bclosure%7D%2Fin%2FP9DXo%3A45%240

Class ParserReflection\Stub\AbstractClassWithMethods:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  __destruct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   null

End of function __destruct

Function explicitpublicfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  explicitPublicFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function explicitpublicfunc

Function implicitpublicfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  implicitPublicFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   null

End of function implicitpublicfunc

Function protectedfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  protectedFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   null

End of function protectedfunc

Function privatefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  privateFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   null

End of function privatefunc

Function staticfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  staticFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   null

End of function staticfunc

Function abstractfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  abstractFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   null

End of function abstractfunc

Function finalfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  finalFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   null

End of function finalfunc

Function funcwithdocandbody:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  funcWithDocAndBody
number of ops:  4
compiled vars:  !0 = $a, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   BIND_STATIC                                              !0
          1        BIND_STATIC                                              !1
   26     2      > RETURN                                                   'hello'
   27     3*     > RETURN                                                   null

End of function funcwithdocandbody

Function generatoryieldfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 3
Branch analysis from position: 6
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 3
Branch analysis from position: 6
Branch analysis from position: 3
filename:       /in/P9DXo
function name:  generatorYieldFunc
number of ops:  7
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   GENERATOR_CREATE                                         
   34     1        ASSIGN                                                   !0, 0
   35     2      > JMP                                                      ->4
   36     3    >   YIELD                                                    !0
   35     4    >   IS_SMALLER                                               !0, 1000
          5      > JMPNZ                                                    ~3, ->3
   38     6    > > GENERATOR_RETURN                                         

End of function generatoryieldfunc

Function nogeneratorfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  noGeneratorFunc
number of ops:  4
compiled vars:  !0 = $gen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00parserreflection%5Cstub%5C%7Bclosure%7D%2Fin%2FP9DXo%3A45%240'
          1        ASSIGN                                                   !0, ~1
   49     2      > RETURN                                                   10
   50     3*     > RETURN                                                   null

End of function nogeneratorfunc

Function testparam:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P9DXo
function name:  testParam
number of ops:  5
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV_INIT                                        !2      'ParserReflection%5CStub%5CAbstractClassWithMethods'
          3        RECV_INIT                                        !3      <const ast>
          4      > RETURN                                                   null

End of function testparam

End of class ParserReflection\Stub\AbstractClassWithMethods.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.46 ms | 1403 KiB | 13 Q