3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'test'; $func = function()use($var) { echo $var; }; $ref = new ReflectionFunction($func); $functionParameters = []; foreach($ref->getParameters() as $key => $currentParameter) { $functionParameters[$currentParameter->getName()] = func_get_arg($key); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/cQIZM
function name:  (null)
number of ops:  24
compiled vars:  !0 = $var, !1 = $func, !2 = $ref, !3 = $functionParameters, !4 = $currentParameter, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'test'
    6     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcQIZM%3A6%240'
          2        BIND_LEXICAL                                             ~7, !0
          3        ASSIGN                                                   !1, ~7
   10     4        NEW                                              $9      'ReflectionFunction'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $9
   12     8        ASSIGN                                                   !3, <array>
   13     9        INIT_METHOD_CALL                                         !2, 'getParameters'
         10        DO_FCALL                                      0  $13     
         11      > FE_RESET_R                                       $14     $13, ->22
         12    > > FE_FETCH_R                                       ~15     $14, !4, ->22
         13    >   ASSIGN                                                   !5, ~15
   14    14        INIT_METHOD_CALL                                         !4, 'getName'
         15        DO_FCALL                                      0  $17     
         16        INIT_FCALL                                               'func_get_arg'
         17        SEND_VAR                                                 !5
         18        DO_ICALL                                         $19     
         19        ASSIGN_DIM                                               !3, $17
         20        OP_DATA                                                  $19
   13    21      > JMP                                                      ->12
         22    >   FE_FREE                                                  $14
   15    23      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcQIZM%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cQIZM
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                              !0
    7     1        ECHO                                                     !0
    8     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcQIZM%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.5 ms | 1388 KiB | 15 Q