3v4l.org

run code in 300+ PHP versions simultaneously
<?php $function = new ReflectionFunction(function( $a0, &$a1, array $a2, array &$a3, Type $a4, Type &$a5, Namespaced\Type $a6, Namespaced\Type &$a7, $a8 = 'string', &$a9 = 111, array $a10 = array('a', 'b', 'c' => 'd'), array &$a11 = null, Type $a12 = null, Type &$a13 = null, Namespaced\Type $a14 = null, Namespaced\Type &$a15 = null ){}); $parameters = $function->getParameters(); var_dump(array_map('strval', $parameters)); $function = new ReflectionFunction(function( $a0 = ReflectionMethod::IS_FINAL ){}); $parameters = $function->getParameters(); var_dump(array_map('strval', $parameters)); $function = new ReflectionFunction(function( callable $a0, callable $a1 = null ){}); $parameters = $function->getParameters(); var_dump(array_map('strval', $parameters));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boXI1
function name:  (null)
number of ops:  46
compiled vars:  !0 = $function, !1 = $parameters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ReflectionFunction'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FboXI1%3A3%240'
   20     2        SEND_VAL_EX                                              ~3
          3        DO_FCALL                                      0          
    3     4        ASSIGN                                                   !0, $2
   21     5        INIT_METHOD_CALL                                         !0, 'getParameters'
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
   22     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'array_map'
         10        SEND_VAL                                                 'strval'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                                 
   24    15        NEW                                              $10     'ReflectionFunction'
         16        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FboXI1%3A24%241'
   26    17        SEND_VAL_EX                                              ~11
         18        DO_FCALL                                      0          
   24    19        ASSIGN                                                   !0, $10
   27    20        INIT_METHOD_CALL                                         !0, 'getParameters'
         21        DO_FCALL                                      0  $14     
         22        ASSIGN                                                   !1, $14
   28    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'array_map'
         25        SEND_VAL                                                 'strval'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $16     
         28        SEND_VAR                                                 $16
         29        DO_ICALL                                                 
   30    30        NEW                                              $18     'ReflectionFunction'
         31        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FboXI1%3A30%242'
   33    32        SEND_VAL_EX                                              ~19
         33        DO_FCALL                                      0          
   30    34        ASSIGN                                                   !0, $18
   34    35        INIT_METHOD_CALL                                         !0, 'getParameters'
         36        DO_FCALL                                      0  $22     
         37        ASSIGN                                                   !1, $22
   35    38        INIT_FCALL                                               'var_dump'
         39        INIT_FCALL                                               'array_map'
         40        SEND_VAL                                                 'strval'
         41        SEND_VAR                                                 !1
         42        DO_ICALL                                         $24     
         43        SEND_VAR                                                 $24
         44        DO_ICALL                                                 
         45      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FboXI1%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boXI1
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $a0, !1 = $a1, !2 = $a2, !3 = $a3, !4 = $a4, !5 = $a5, !6 = $a6, !7 = $a7, !8 = $a8, !9 = $a9, !10 = $a10, !11 = $a11, !12 = $a12, !13 = $a13, !14 = $a14, !15 = $a15
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
          6        RECV                                             !6      
          7        RECV                                             !7      
          8        RECV_INIT                                        !8      'string'
          9        RECV_INIT                                        !9      111
         10        RECV_INIT                                        !10     <array>
         11        RECV_INIT                                        !11     null
         12        RECV_INIT                                        !12     null
         13        RECV_INIT                                        !13     null
         14        RECV_INIT                                        !14     null
         15        RECV_INIT                                        !15     null
   20    16      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FboXI1%3A3%240

Function %00%7Bclosure%7D%2Fin%2FboXI1%3A24%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boXI1
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $a0
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV_INIT                                        !0      <const ast>
   26     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FboXI1%3A24%241

Function %00%7Bclosure%7D%2Fin%2FboXI1%3A30%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/boXI1
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $a0, !1 = $a1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   33     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FboXI1%3A30%242

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.92 ms | 1400 KiB | 17 Q