3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mystring = 'vabcsa'; $findme = 'a'; $pos = strpos($mystring, $findme,-1); 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
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 20
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RHYUY
function name:  (null)
number of ops:  27
compiled vars:  !0 = $mystring, !1 = $findme, !2 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'vabcsa'
    3     1        ASSIGN                                                   !1, 'a'
    4     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 -1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
    5     8        TYPE_CHECK                                  1018          !2
          9      > JMPZ                                                     ~7, ->20
    6    10    >   ROPE_INIT                                     5  ~9      'The+string+%27'
         11        ROPE_ADD                                      1  ~9      ~9, !1
         12        ROPE_ADD                                      2  ~9      ~9, '%27+was+found+in+the+string+%27'
         13        ROPE_ADD                                      3  ~9      ~9, !0
         14        ROPE_END                                      4  ~8      ~9, '%27'
         15        ECHO                                                     ~8
    7    16        NOP                                                      
         17        FAST_CONCAT                                      ~12     '+and+exists+at+position+', !2
         18        ECHO                                                     ~12
         19      > JMP                                                      ->26
    9    20    >   ROPE_INIT                                     5  ~14     'The+string+%27'
         21        ROPE_ADD                                      1  ~14     ~14, !1
         22        ROPE_ADD                                      2  ~14     ~14, '%27+was+not+found+in+the+string+%27'
         23        ROPE_ADD                                      3  ~14     ~14, !0
         24        ROPE_END                                      4  ~13     ~14, '%27'
         25        ECHO                                                     ~13
   10    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.61 ms | 1395 KiB | 15 Q