3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = 'find me in my string'; $findme = 'find me'; $pos = strpos($mystring, $findme); // Note our use of ===. Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if ($pos === false) { echo "The string '$findme' was not found in the string '$mystring'"; } else { echo "The string '$findme' was found in the string '$mystring'"; echo " and exists at position $pos"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qNg6Z
function name:  (null)
number of ops:  26
compiled vars:  !0 = $mystring, !1 = $findme, !2 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'find+me+in+my+string'
    4     1        ASSIGN                                                   !1, 'find+me'
    5     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    9     7        TYPE_CHECK                                    4          !2
          8      > JMPZ                                                     ~7, ->16
   10     9    >   ROPE_INIT                                     5  ~9      'The+string+%27'
         10        ROPE_ADD                                      1  ~9      ~9, !1
         11        ROPE_ADD                                      2  ~9      ~9, '%27+was+not+found+in+the+string+%27'
         12        ROPE_ADD                                      3  ~9      ~9, !0
         13        ROPE_END                                      4  ~8      ~9, '%27'
         14        ECHO                                                     ~8
         15      > JMP                                                      ->25
   12    16    >   ROPE_INIT                                     5  ~13     'The+string+%27'
         17        ROPE_ADD                                      1  ~13     ~13, !1
         18        ROPE_ADD                                      2  ~13     ~13, '%27+was+found+in+the+string+%27'
         19        ROPE_ADD                                      3  ~13     ~13, !0
         20        ROPE_END                                      4  ~12     ~13, '%27'
         21        ECHO                                                     ~12
   13    22        NOP                                                      
         23        FAST_CONCAT                                      ~16     '+and+exists+at+position+', !2
         24        ECHO                                                     ~16
   14    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1395 KiB | 15 Q