3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = ["one", "two", "three"]; $ignore = "two"; array_filter($items, function($item) { return $item !== $ignore; }); // ---- Now let's do it properly var_dump(array_filter($items, function($item) use ($ignore) { return $item !== $ignore; }));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/skQbI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $items, !1 = $ignore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'two'
    6     2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
    8     5        SEND_VAL                                                 ~4
    6     6        DO_ICALL                                                 
   12     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !0
         10        DECLARE_LAMBDA_FUNCTION                          ~6      [1]
         11        BIND_LEXICAL                                             ~6, !1
   14    12        SEND_VAL                                                 ~6
   12    13        DO_ICALL                                         $7      
   14    14        SEND_VAR                                                 $7
   12    15        DO_ICALL                                                 
   14    16      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/skQbI
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $item, !1 = $ignore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        IS_NOT_IDENTICAL                                 ~2      !0, !1
          2      > RETURN                                                   ~2
    8     3*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/skQbI
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $item, !1 = $ignore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   13     2        IS_NOT_IDENTICAL                                 ~2      !0, !1
          3      > RETURN                                                   ~2
   14     4*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.63 ms | 1000 KiB | 15 Q