3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'Hello, there!'; if (!strpos($string, 'Hello')) { echo 'Did not detect "Hello" in string (default)' . PHP_EOL; } if (false == strpos($string, 'Hello')) { echo 'Did not detect "Hello" in string (loose equality)' . PHP_EOL; } if (false === strpos($string, 'Hello')) { echo 'Did not detect "Hello" in string (strict equality)' . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/S0eW2
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Hello%2C+there%21'
    5     1        FRAMELESS_ICALL_2                strpos              ~2      !0, 'Hello'
          2        BOOL_NOT                                             ~3      ~2
          3      > JMPZ                                                         ~3, ->5
    6     4    >   ECHO                                                         'Did+not+detect+%22Hello%22+in+string+%28default%29%0A'
    9     5    >   FRAMELESS_ICALL_2                strpos              ~4      !0, 'Hello'
          6        IS_EQUAL                                                     ~4, <false>
          7      > JMPZ                                                         ~5, ->9
   10     8    >   ECHO                                                         'Did+not+detect+%22Hello%22+in+string+%28loose+equality%29%0A'
   13     9    >   FRAMELESS_ICALL_2                strpos              ~6      !0, 'Hello'
         10        TYPE_CHECK                                        4          ~6
         11      > JMPZ                                                         ~7, ->13
   14    12    >   ECHO                                                         'Did+not+detect+%22Hello%22+in+string+%28strict+equality%29%0A'
   15    13    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.95 ms | 1592 KiB | 13 Q