3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strHaystack='test'; $strNeedle='t'; if (false==0) print 0; $numPos=strpos($strHaystack,$strNeedle); if((!$numPos) && ($bob)) print "Found '$strNeedle' at position: $numPos\r\n"; else print "Not Found!\r\n"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 4
filename:       /in/mP6XQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $strHaystack, !1 = $strNeedle, !2 = $numPos, !3 = $bob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
    4     1        ASSIGN                                                   !1, 't'
    5     2      > JMPZ                                                     <true>, ->4
    6     3    >   ECHO                                                     0
    7     4    >   INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
    8     9        BOOL_NOT                                         ~8      !2
         10      > JMPZ_EX                                          ~8      ~8, ->12
         11    >   BOOL                                             ~8      !3
         12    > > JMPZ                                                     ~8, ->20
    9    13    >   ROPE_INIT                                     5  ~10     'Found+%27'
         14        ROPE_ADD                                      1  ~10     ~10, !1
         15        ROPE_ADD                                      2  ~10     ~10, '%27+at+position%3A+'
         16        ROPE_ADD                                      3  ~10     ~10, !2
         17        ROPE_END                                      4  ~9      ~10, '%0D%0A'
         18        ECHO                                                     ~9
         19      > JMP                                                      ->21
   10    20    >   ECHO                                                     'Not+Found%21%0D%0A'
   12    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.19 ms | 1395 KiB | 15 Q