3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $mystring = 'vabcs'; $findme = 'a'; $pos = strpos($mystring, $findme); if ($pos !== false) { echo "The string '$findme' was found in the string '$mystring'"; echo " and exists at position $pos"; } else { echo "The string '$findme' was not found in the string '$mystring'"; }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
Jump found. Position 1 = 25
Branch analysis from position: 25
Jump found. Position 1 = -2
Branch analysis from position: 19
Jump found. Position 1 = -2
filename:       /in/tlRDP
function name:  (null)
number of ops:  26
compiled vars:  !0 = $mystring, !1 = $findme, !2 = $pos
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, 'vabcs'
   3     1        ASSIGN                                                   !1, 'a'
   4     2        INIT_FCALL                                               'strpos'
         3        SEND_VAR                                                 !0
         4        SEND_VAR                                                 !1
         5        DO_ICALL                                         $5      
         6        ASSIGN                                                   !2, $5
   5     7        IS_NOT_IDENTICAL                                 ~7      !2, <false>
         8      > JMPZ                                                     ~7, ->19
   6     9    >   ROPE_INIT                                     5  ~9      'The+string+%27'
        10        ROPE_ADD                                      1  ~9      ~9, !1
        11        ROPE_ADD                                      2  ~9      ~9, '%27+was+found+in+the+string+%27'
        12        ROPE_ADD                                      3  ~9      ~9, !0
        13        ROPE_END                                      4  ~8      ~9, '%27'
        14        ECHO                                                     ~8
   7    15        NOP                                                      
        16        FAST_CONCAT                                      ~12     '+and+exists+at+position+', !2
        17        ECHO                                                     ~12
        18      > JMP                                                      ->25
   9    19    >   ROPE_INIT                                     5  ~14     'The+string+%27'
        20        ROPE_ADD                                      1  ~14     ~14, !1
        21        ROPE_ADD                                      2  ~14     ~14, '%27+was+not+found+in+the+string+%27'
        22        ROPE_ADD                                      3  ~14     ~14, !0
        23        ROPE_END                                      4  ~13     ~14, '%27'
        24        ECHO                                                     ~13
        25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0