3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strHaystack='test'; $strNeedle='t'; $numPos=strpos($strHaystack,$strNeedle); if($numPos) 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 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1Papo
function name:  (null)
number of ops:  17
compiled vars:  !0 = $strHaystack, !1 = $strNeedle, !2 = $numPos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
    4     1        ASSIGN                                                   !1, 't'
    6     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7      > JMPZ                                                     !2, ->15
    8     8    >   ROPE_INIT                                     5  ~8      'Found+%27'
          9        ROPE_ADD                                      1  ~8      ~8, !1
         10        ROPE_ADD                                      2  ~8      ~8, '%27+at+position%3A+'
         11        ROPE_ADD                                      3  ~8      ~8, !2
         12        ROPE_END                                      4  ~7      ~8, '%0D%0A'
         13        ECHO                                                     ~7
         14      > JMP                                                      ->16
    9    15    >   ECHO                                                     'Not+Found%21%0D%0A'
   11    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.54 ms | 1395 KiB | 15 Q