3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = ['', 0, null]; $second = ['', 0, 1]; $firstResult = array_filter($first, function($item) { return empty($item); }); $secondResult = array_filter($second, function($item) { return !empty($item); }); var_dump($firstResult, $secondResult);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIVEb
function name:  (null)
number of ops:  19
compiled vars:  !0 = $first, !1 = $second, !2 = $firstResult, !3 = $secondResult
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNIVEb%3A7%240'
    9     5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
    7     7        ASSIGN                                                   !2, $7
   11     8        INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !1
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNIVEb%3A11%241'
   13    11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
   11    13        ASSIGN                                                   !3, $10
   15    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNIVEb%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIVEb
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNIVEb%3A7%240

Function %00%7Bclosure%7D%2Fin%2FNIVEb%3A11%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NIVEb
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNIVEb%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.32 ms | 1396 KiB | 17 Q