3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [[], [], []]; $res = array_reduce(array_values($array), function ($isArray, $in) { $isArray &= is_array($in) ? 0 : 1; return $isArray; }, count($array) !== 0 ? 1 : 0); var_dump($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TL0uj
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_reduce'
          2        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTL0uj%3A4%240'
    7     7        SEND_VAL                                                 ~4
          8        COUNT                                            ~5      !0
          9        IS_NOT_IDENTICAL                                         ~5, 0
         10      > JMPZ                                                     ~6, ->13
         11    >   QM_ASSIGN                                        ~7      1
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~7      0
         14    >   SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
    4    16        ASSIGN                                                   !1, $8
    9    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTL0uj%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TL0uj
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $isArray, !1 = $in
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        TYPE_CHECK                                  128          !1
          3      > JMPZ                                                     ~2, ->6
          4    >   QM_ASSIGN                                        ~3      0
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      1
          7    >   ASSIGN_OP                                    10          !0, ~3
    6     8      > RETURN                                                   !0
    7     9*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTL0uj%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.7 ms | 1400 KiB | 19 Q