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"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } $rogers = strrev($rogers); $pos = strpos($rogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } $rogers = strrev($rogers); echo($rogers); echo("\n"); $len = strlen($rogers); $rogers = substr($rogers, 7, 3); if(!$rogers){ die("SUBSTR_ERROR"); } echo($rogers); echo("\n");
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 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 45
Branch analysis from position: 44
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 62
Branch analysis from position: 61
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qR434
function name:  (null)
number of ops:  65
compiled vars:  !0 = $homepage, !1 = $rogers, !2 = $pos, !3 = $len
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    >   INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 0
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !1, $10
   18    21        BOOL_NOT                                         ~12     !1
         22      > JMPZ                                                     ~12, ->24
   19    23    > > EXIT                                                     'SUBSTR_ERROR'
   22    24    >   INIT_FCALL                                               'strrev'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $13     
         27        ASSIGN                                                   !1, $13
   24    28        INIT_FCALL                                               'strpos'
         29        SEND_VAR                                                 !1
         30        SEND_VAL                                                 'a%3C'
         31        DO_ICALL                                         $15     
         32        ASSIGN                                                   !2, $15
   25    33        TYPE_CHECK                                    4          !2
         34      > JMPZ                                                     ~17, ->36
   26    35    > > EXIT                                                     'STRPOS_ERROR'
   29    36    >   INIT_FCALL                                               'substr'
         37        SEND_VAR                                                 !1
         38        SEND_VAL                                                 0
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                         $18     
         41        ASSIGN                                                   !1, $18
   30    42        BOOL_NOT                                         ~20     !1
         43      > JMPZ                                                     ~20, ->45
   31    44    > > EXIT                                                     'SUBSTR_ERROR'
   34    45    >   INIT_FCALL                                               'strrev'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $21     
         48        ASSIGN                                                   !1, $21
   36    49        ECHO                                                     !1
   37    50        ECHO                                                     '%0A'
   39    51        STRLEN                                           ~23     !1
         52        ASSIGN                                                   !3, ~23
   40    53        INIT_FCALL                                               'substr'
         54        SEND_VAR                                                 !1
         55        SEND_VAL                                                 7
         56        SEND_VAL                                                 3
         57        DO_ICALL                                         $25     
         58        ASSIGN                                                   !1, $25
   41    59        BOOL_NOT                                         ~27     !1
         60      > JMPZ                                                     ~27, ->62
   42    61    > > EXIT                                                     'SUBSTR_ERROR'
   45    62    >   ECHO                                                     !1
   46    63        ECHO                                                     '%0A'
         64      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.55 ms | 1400 KiB | 19 Q