3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o = []; @$var = ["",0,null,1,2,3,$foo,$o['myIndex']]; array_walk($var, function($v) { echo (!isset($v) || $v == false) ? 'true ' : 'false'; echo ' ' . (empty($v) ? 'true' : 'false'); echo "\n"; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Wvgj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $o, !1 = $var, !2 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        BEGIN_SILENCE                                    ~4      
          2        INIT_ARRAY                                       ~5      ''
          3        ADD_ARRAY_ELEMENT                                ~5      0
          4        ADD_ARRAY_ELEMENT                                ~5      null
          5        ADD_ARRAY_ELEMENT                                ~5      1
          6        ADD_ARRAY_ELEMENT                                ~5      2
          7        ADD_ARRAY_ELEMENT                                ~5      3
          8        ADD_ARRAY_ELEMENT                                ~5      !2
          9        FETCH_DIM_R                                      ~6      !0, 'myIndex'
         10        ADD_ARRAY_ELEMENT                                ~5      ~6
         11        ASSIGN                                                   !1, ~5
         12        END_SILENCE                                              ~4
    5    13        INIT_FCALL                                               'array_walk'
         14        SEND_REF                                                 !1
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5Wvgj%3A5%240'
    9    16        SEND_VAL                                                 ~8
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5Wvgj%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/5Wvgj
function name:  {closure}
number of ops:  20
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   BOOL_NOT                                         ~3      !0
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->9
          7    >   QM_ASSIGN                                        ~4      'true+'
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~4      'false'
         10    >   ECHO                                                     ~4
    7    11        ISSET_ISEMPTY_CV                                         !0
         12      > JMPZ                                                     ~5, ->15
         13    >   QM_ASSIGN                                        ~6      'true'
         14      > JMP                                                      ->16
         15    >   QM_ASSIGN                                        ~6      'false'
         16    >   CONCAT                                           ~7      '+', ~6
         17        ECHO                                                     ~7
    8    18        ECHO                                                     '%0A'
    9    19      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.16 ms | 1400 KiB | 15 Q