3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { static function foo($x = null) {} } $reflMethod = new ReflectionMethod('C', 'foo'); $reflParam = $reflMethod->getParameters()[0]; serialize($reflParam); $obj = (object)['refl' => $reflMethod]; $serObj = serialize($obj); $unserObj = unserialize($serObj); $serReflMethod = serialize($reflMethod); $unserReflMethod = unserialize($serReflMethod);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bWCZA
function name:  (null)
number of ops:  32
compiled vars:  !0 = $reflMethod, !1 = $reflParam, !2 = $obj, !3 = $serObj, !4 = $unserObj, !5 = $serReflMethod, !6 = $unserReflMethod
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $7      'ReflectionMethod'
          1        SEND_VAL_EX                                              'C'
          2        SEND_VAL_EX                                              'foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $7
    8     5        INIT_METHOD_CALL                                         !0, 'getParameters'
          6        DO_FCALL                                      0  $10     
          7        FETCH_DIM_R                                      ~11     $10, 0
          8        ASSIGN                                                   !1, ~11
   10     9        INIT_FCALL                                               'serialize'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   12    12        INIT_ARRAY                                       ~14     !0, 'refl'
         13        CAST                                          8  ~15     ~14
         14        ASSIGN                                                   !2, ~15
   14    15        INIT_FCALL                                               'serialize'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $17     
         18        ASSIGN                                                   !3, $17
   15    19        INIT_FCALL                                               'unserialize'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $19     
         22        ASSIGN                                                   !4, $19
   18    23        INIT_FCALL                                               'serialize'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $21     
         26        ASSIGN                                                   !5, $21
   20    27        INIT_FCALL                                               'unserialize'
         28        SEND_VAR                                                 !5
         29        DO_ICALL                                         $23     
         30        ASSIGN                                                   !6, $23
         31      > RETURN                                                   1

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

End of function foo

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.33 ms | 1396 KiB | 17 Q