3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function b() {} } $r = new ReflectionMethod(new a, "b"); var_dump($r->getParameters()); $s = serialize($r); var_dump($s); $r = unserialize($s); var_dump($r->getParameters());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G2I4A
function name:  (null)
number of ops:  29
compiled vars:  !0 = $r, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'ReflectionMethod'
          1        NEW                                              $3      'a'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $3
          4        SEND_VAL_EX                                              'b'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
    8     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'getParameters'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'serialize'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !1, $9
   11    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   13    19        INIT_FCALL                                               'unserialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !0, $12
   15    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !0, 'getParameters'
         25        DO_FCALL                                      0  $14     
         26        SEND_VAR                                                 $14
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

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

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.04 ms | 1396 KiB | 19 Q