3v4l.org

run code in 300+ PHP versions simultaneously
<?php $static = 90; $array = [ 'checklists' => [ 20, 50, 35, 23, 24, 21, 22, 27, 25 ] ]; $array['checklists'] = array_map(function($v) use($static) { return [$static, $v]; }, $array['checklists']); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3ugLR
function name:  (null)
number of ops:  15
compiled vars:  !0 = $static, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 90
    4     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          4        BIND_LEXICAL                                             ~5, !0
   12     5        SEND_VAL                                                 ~5
          6        FETCH_DIM_R                                      ~6      !1, 'checklists'
          7        SEND_VAL                                                 ~6
   10     8        DO_ICALL                                         $7      
          9        ASSIGN_DIM                                               !1, 'checklists'
   12    10        OP_DATA                                                  $7
   14    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3ugLR
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $v, !1 = $static
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   11     2        INIT_ARRAY                                       ~2      !1
          3        ADD_ARRAY_ELEMENT                                ~2      !0
          4      > RETURN                                                   ~2
   12     5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.63 ms | 1011 KiB | 15 Q