3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [1,2,3], [1,2] ]; array_walk ( $arr , function(&$item) { $item = array_pad($item, 3, null); } ); foreach($arr as [$var1, $var2, $var3]) { var_dump($var1, $var2, $var3); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/JU2VY
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $var1, !2 = $var2, !3 = $var3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJU2VY%3A8%240'
   10     4        SEND_VAL                                                 ~5
          5        DO_ICALL                                                 
   12     6      > FE_RESET_R                                       $7      !0, ->21
          7    > > FE_FETCH_R                                               $7, $8, ->21
          8    >   FETCH_LIST_R                                     $9      $8, 0
          9        ASSIGN                                                   !1, $9
         10        FETCH_LIST_R                                     $11     $8, 1
         11        ASSIGN                                                   !2, $11
         12        FETCH_LIST_R                                     $13     $8, 2
         13        ASSIGN                                                   !3, $13
         14        FREE                                                     $8
   13    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   12    20      > JMP                                                      ->7
         21    >   FE_FREE                                                  $7
   14    22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FJU2VY%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JU2VY
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'array_pad'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 3
          4        SEND_VAL                                                 null
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
   10     7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FJU2VY%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.71 ms | 1396 KiB | 19 Q