3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$HOMEPAGE = FILE_GET_CONTENTS('WWW.ROGERS.COM'); $homepage = true; if(!$homepage){ die("FILE_GET_CONTENTS_ERROR"); } $rogers = "<a href=\"/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr\">francais</a>"; $pos = strpos($rogers, "francais"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } echo($rogers); echo("\n\r"); $revrogers = strrev($rogers); echo($revrogers); $pos = strpos($rogers, "a<"); echo($pos);
based on GjSHi
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4aNqa
function name:  (null)
number of ops:  36
compiled vars:  !0 = $homepage, !1 = $rogers, !2 = $pos, !3 = $revrogers
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <true>
   4     1        BOOL_NOT                                         ~5      !0
         2      > JMPZ                                                     ~5, ->4
   5     3    > > EXIT                                                     'FILE_GET_CONTENTS_ERROR'
   7     4    >   ASSIGN                                                   !1, '%3Ca+href%3D%22%2Fbusiness%2FBSS.portal%3F_nfpb%3Dtrue%26_st%3D%26_windowLabel%3Dheader_portlet%26_urlType%3Daction%26wlpheader_portlet_action%3DchangeLanguage%26lang%3Dfr%22%3Efrancais%3C%2Fa%3E'
   9     5        INIT_FCALL                                               'strpos'
         6        SEND_VAR                                                 !1
         7        SEND_VAL                                                 'francais'
         8        DO_ICALL                                         $7      
         9        ASSIGN                                                   !2, $7
  10    10        IS_IDENTICAL                                     ~9      !2, <false>
        11      > JMPZ                                                     ~9, ->13
  11    12    > > EXIT                                                     'STRPOS_ERROR'
  13    13    >   INIT_FCALL                                               'substr'
        14        SEND_VAR                                                 !1
        15        SEND_VAL                                                 0
        16        SEND_VAR                                                 !2
        17        DO_ICALL                                         $10     
        18        ASSIGN                                                   !1, $10
  15    19        BOOL_NOT                                         ~12     !1
        20      > JMPZ                                                     ~12, ->22
  16    21    > > EXIT                                                     'SUBSTR_ERROR'
  18    22    >   ECHO                                                     !1
  19    23        ECHO                                                     '%0A%0D'
  21    24        INIT_FCALL                                               'strrev'
        25        SEND_VAR                                                 !1
        26        DO_ICALL                                         $13     
        27        ASSIGN                                                   !3, $13
  22    28        ECHO                                                     !3
  24    29        INIT_FCALL                                               'strpos'
        30        SEND_VAR                                                 !1
        31        SEND_VAL                                                 'a%3C'
        32        DO_ICALL                                         $15     
        33        ASSIGN                                                   !2, $15
  25    34        ECHO                                                     !2
        35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0