3v4l.org

run code in 500+ PHP versions simultaneously
<?php function test($x) { $value="name >= vivek "; return strpos($value, $x); } $search = array("<",">","!=","<=",">="); $chars = array_filter( $search, "test" ); $count = count($chars); echo "Are there any search chars? ", $answer = ($count > 0)? 'Yes, as follows: ' : 'No.'; echo join(" ",$chars);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WJQ5c
function name:  (null)
number of ops:  22
compiled vars:  !0 = $search, !1 = $chars, !2 = $count, !3 = $answer
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'array_filter'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     'test'
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   10     6        COUNT                                                ~7      !1
          7        ASSIGN                                                       !2, ~7
   11     8        ECHO                                                         'Are+there+any+search+chars%3F+'
          9        IS_SMALLER                                                   0, !2
         10      > JMPZ                                                         ~9, ->13
         11    >   QM_ASSIGN                                            ~10     'Yes%2C+as+follows%3A+'
         12      > JMP                                                          ->14
         13    >   QM_ASSIGN                                            ~10     'No.'
         14    >   ASSIGN                                               ~11     !3, ~10
         15        ECHO                                                         ~11
   12    16        INIT_FCALL                                                   'join'
         17        SEND_VAL                                                     '+'
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                             $12     
         20        ECHO                                                         $12
         21      > RETURN                                                       1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WJQ5c
function name:  test
number of ops:  5
compiled vars:  !0 = $x, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    5     1        ASSIGN                                                       !1, 'name+%3E%3D+vivek+'
    6     2        FRAMELESS_ICALL_2                strpos              ~3      !1, !0
          3      > RETURN                                                       ~3
    7     4*     > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
178.97 ms | 2926 KiB | 15 Q