3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(version_compare(PHP_VERSION, '5') < 0) { die(1); } class C { function M($p = 0) { } } $rc = new ReflectionClass('C'); $rmList = $rc->getMethods(); $rm = $rmList[0]; var_dump($rm);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E2plD
function name:  (null)
number of ops:  20
compiled vars:  !0 = $rc, !1 = $rmList, !2 = $rm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '5'
          3        DO_ICALL                                         $3      
          4        IS_SMALLER                                               $3, 0
          5      > JMPZ                                                     ~4, ->7
    3     6    > > EXIT                                                     1
    9     7    >   NEW                                              $5      'ReflectionClass'
          8        SEND_VAL_EX                                              'C'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $5
   10    11        INIT_METHOD_CALL                                         !0, 'getMethods'
         12        DO_FCALL                                      0  $8      
         13        ASSIGN                                                   !1, $8
   11    14        FETCH_DIM_R                                      ~10     !1, 0
         15        ASSIGN                                                   !2, ~10
   12    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class C:
Function m:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E2plD
function name:  M
number of ops:  2
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      0
    7     1      > RETURN                                                   null

End of function m

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.9 ms | 1395 KiB | 17 Q