3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [['Id' => 1], ['As' => 2], ['Id' => 4], 'el']; array_walk($arr, function($v, $k) { if (!is_array($v) || empty($v['Id'])) { unset ($arr[$k]); } // echo $i .' '.$j.PHP_EOL; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cHYUM
function name:  (null)
number of ops:  7
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcHYUM%3A5%240'
   10     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcHYUM%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/cHYUM
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $v, !1 = $k, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        TYPE_CHECK                                  128  ~3      !0
          3        BOOL_NOT                                         ~4      ~3
          4      > JMPNZ_EX                                         ~4      ~4, ->7
          5    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~5      !0, 'Id'
          6        BOOL                                             ~4      ~5
          7    > > JMPZ                                                     ~4, ->9
    7     8    >   UNSET_DIM                                                !2, !1
   10     9    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcHYUM%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.73 ms | 1395 KiB | 15 Q