3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search=array("<",">","!=","<=",">="); $value = "name ** vivek "; function test($item, $key, $arr) { $str = $arr[0]; $count = $arr[1]; if( strpos($str, $item) !== FALSE ) { $found++; $matches .= $item . " "; } if ($count == $key + 1){ echo "$found search item(s) found in \"$str\": $matches\n"; } } array_walk($search, 'test', array( $value, count($search) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jpgMD
function name:  (null)
number of ops:  11
compiled vars:  !0 = $search, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'name+%2A%2A+vivek+'
   20     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        SEND_VAL                                                 'test'
          5        INIT_ARRAY                                       ~4      !1
          6        COUNT                                            ~5      !0
          7        ADD_ARRAY_ELEMENT                                ~4      ~5
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 16
filename:       /in/jpgMD
function name:  test
number of ops:  27
compiled vars:  !0 = $item, !1 = $key, !2 = $arr, !3 = $str, !4 = $count, !5 = $found, !6 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    8     3        FETCH_DIM_R                                      ~7      !2, 0
          4        ASSIGN                                                   !3, ~7
    9     5        FETCH_DIM_R                                      ~9      !2, 1
          6        ASSIGN                                                   !4, ~9
   11     7        INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !3
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $11     
         11        TYPE_CHECK                                  1018          $11
         12      > JMPZ                                                     ~12, ->16
   12    13    >   PRE_INC                                                  !5
   13    14        CONCAT                                           ~14     !0, '+'
         15        ASSIGN_OP                                     8          !6, ~14
   15    16    >   ADD                                              ~16     !1, 1
         17        IS_EQUAL                                                 !4, ~16
         18      > JMPZ                                                     ~17, ->26
   16    19    >   ROPE_INIT                                     6  ~19     !5
         20        ROPE_ADD                                      1  ~19     ~19, '+search+item%28s%29+found+in+%22'
         21        ROPE_ADD                                      2  ~19     ~19, !3
         22        ROPE_ADD                                      3  ~19     ~19, '%22%3A+'
         23        ROPE_ADD                                      4  ~19     ~19, !6
         24        ROPE_END                                      5  ~18     ~19, '%0A'
         25        ECHO                                                     ~18
   18    26    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.28 ms | 1400 KiB | 17 Q