3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { function a() { echo 'hi'; } } $class = new ReflectionClass('test'); $method = $class->getMethod('a'); echo serialize($method); echo unserialize('O:16:"ReflectionMethod":2:{s:4:"name";s:1:"a";s:5:"class";s:4:"test";}');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IImEn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $class, !1 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    8     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'a'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
    9     8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ECHO                                                     $7
   11    12        INIT_FCALL                                               'unserialize'
         13        SEND_VAL                                                 'O%3A16%3A%22ReflectionMethod%22%3A2%3A%7Bs%3A4%3A%22name%22%3Bs%3A1%3A%22a%22%3Bs%3A5%3A%22class%22%3Bs%3A4%3A%22test%22%3B%7D'
         14        DO_ICALL                                         $8      
         15        ECHO                                                     $8
         16      > RETURN                                                   1

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

End of function a

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153 ms | 1395 KiB | 17 Q