3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Thing { public static function testOne() { echo "one\n"; } public static function testTwo() { echo "two\n"; } public static function testThree() { echo "three\n"; } public static function testFour() { echo "four\n"; } } $class = new ReflectionClass('Thing'); $methods = $class->getMethods(); foreach ($methods as $method) { var_dump($method->getName()); $method->invoke(null); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/QvG1W
function name:  (null)
number of ops:  20
compiled vars:  !0 = $class, !1 = $methods, !2 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'ReflectionClass'
          1        SEND_VAL_EX                                              'Thing'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   12     4        INIT_METHOD_CALL                                         !0, 'getMethods'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !1, $6
   13     7      > FE_RESET_R                                       $8      !1, ->18
          8    > > FE_FETCH_R                                               $8, !2, ->18
   14     9    >   INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !2, 'getName'
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                                 
   15    14        INIT_METHOD_CALL                                         !2, 'invoke'
         15        SEND_VAL_EX                                              null
         16        DO_FCALL                                      0          
   13    17      > JMP                                                      ->8
         18    >   FE_FREE                                                  $8
   16    19      > RETURN                                                   1

Class Thing:
Function testone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvG1W
function name:  testOne
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'one%0A'
          1      > RETURN                                                   null

End of function testone

Function testtwo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvG1W
function name:  testTwo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'two%0A'
          1      > RETURN                                                   null

End of function testtwo

Function testthree:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvG1W
function name:  testThree
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'three%0A'
          1      > RETURN                                                   null

End of function testthree

Function testfour:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QvG1W
function name:  testFour
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'four%0A'
          1      > RETURN                                                   null

End of function testfour

End of class Thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.82 ms | 1400 KiB | 15 Q