3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$homepage = FILE_GET_CONTENTS('WWW.ROGERS.COM'); $homepage = true; if(!$homepage){ die("FILE_GET_CONTENTS_ERROR"); } $rogers = "tttttttt<a href=\"/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr\">francais</a>tttttttttt"; echo($rogers); echo("\n"); $pos = strpos($rogers, "francais"); if($pos === FALSE){ die("STRPOS_ERROR"); } echo($rogers); echo("\n"); $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } echo($rogers); echo("\n"); $revrogers = strrev($rogers); $pos = strpos($revrogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } echo($rogers); echo("\n"); echo($revrogers); //$rogers = substr($rogers, 0, $pos); //if(!$rogers){ // die("SUBSTR_ERROR"); //}
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 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZLN1h
function name:  (null)
number of ops:  44
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, 'tttttttt%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%3Etttttttttt'
    9     5        ECHO                                                     !1
   10     6        ECHO                                                     '%0A'
   12     7        INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 'francais'
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   13    12        TYPE_CHECK                                    4          !2
         13      > JMPZ                                                     ~9, ->15
   14    14    > > EXIT                                                     'STRPOS_ERROR'
   17    15    >   ECHO                                                     !1
   18    16        ECHO                                                     '%0A'
   20    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 0
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $10     
         22        ASSIGN                                                   !1, $10
   21    23        BOOL_NOT                                         ~12     !1
         24      > JMPZ                                                     ~12, ->26
   22    25    > > EXIT                                                     'SUBSTR_ERROR'
   25    26    >   ECHO                                                     !1
   26    27        ECHO                                                     '%0A'
   28    28        INIT_FCALL                                               'strrev'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $13     
         31        ASSIGN                                                   !3, $13
   30    32        INIT_FCALL                                               'strpos'
         33        SEND_VAR                                                 !3
         34        SEND_VAL                                                 'a%3C'
         35        DO_ICALL                                         $15     
         36        ASSIGN                                                   !2, $15
   31    37        TYPE_CHECK                                    4          !2
         38      > JMPZ                                                     ~17, ->40
   32    39    > > EXIT                                                     'STRPOS_ERROR'
   35    40    >   ECHO                                                     !1
   36    41        ECHO                                                     '%0A'
   37    42        ECHO                                                     !3
   42    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
274.06 ms | 1405 KiB | 20 Q