3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array ( '0' => 'Message: Thanks for all', '1' => 'Response: Goodbye', '2' => '', '3' => 'inactive', '4' => 'active call', '5' => 'active channels', '6' => 'Hello', '7' => 'Hi', '8' => 'yes', '9' => 'no' ); $res = []; array_walk($array, function($v, $k) use (&$res){ if(strpos($v, ':') === false && strpos($v, 'active') === false && $v != ''){ $res[] = $v; } }); print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JDFZg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   17     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !1
   21     6        SEND_VAL                                                 ~4
   17     7        DO_ICALL                                                 
   22     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 18
Branch analysis from position: 15
filename:       /in/JDFZg
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $v, !1 = $k, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   18     3        INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%3A'
          6        DO_ICALL                                         $3      
          7        TYPE_CHECK                                    4  ~4      $3
          8      > JMPZ_EX                                          ~4      ~4, ->15
          9    >   INIT_FCALL                                               'strpos'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'active'
         12        DO_ICALL                                         $5      
         13        TYPE_CHECK                                    4  ~6      $5
         14        BOOL                                             ~4      ~6
         15    > > JMPZ_EX                                          ~4      ~4, ->18
         16    >   IS_NOT_EQUAL                                     ~7      !0, ''
         17        BOOL                                             ~4      ~7
         18    > > JMPZ                                                     ~4, ->21
   19    19    >   ASSIGN_DIM                                               !2
         20        OP_DATA                                                  !0
   21    21    > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.79 ms | 1013 KiB | 16 Q