3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vv=stripos( 'test1,test2','test2'); var_dump($vv); $condition = "return (stripos('test1,test2','test1')!==false);"; $test = eval($condition); var_dump($test); if (!$test) { echo 'Oh Noes'; }else{ echo 'OH Yes'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BQNgA
function name:  (null)
number of ops:  20
compiled vars:  !0 = $vv, !1 = $condition, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'stripos'
          1        SEND_VAL                                                 'test1%2Ctest2'
          2        SEND_VAL                                                 'test2'
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    7     8        ASSIGN                                                   !1, 'return+%28stripos%28%27test1%2Ctest2%27%2C%27test1%27%29%21%3D%3Dfalse%29%3B'
    8     9        INCLUDE_OR_EVAL                                  $7      !1, EVAL
         10        ASSIGN                                                   !2, $7
   10    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   11    14        BOOL_NOT                                         ~10     !2
         15      > JMPZ                                                     ~10, ->18
   12    16    >   ECHO                                                     'Oh+Noes'
         17      > JMP                                                      ->19
   14    18    >   ECHO                                                     'OH+Yes'
   15    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.01 ms | 1395 KiB | 17 Q