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"); } echo($rogers); echo("\n"); $revrogers = strrev($rogers); echo($rogers); echo("\n"); echo($revrogers); $pos = strpos($revrogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } $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 = 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 = 40, Position 2 = 41
Branch analysis from position: 40
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 50
Branch analysis from position: 49
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KV3MC
function name:  (null)
number of ops:  51
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    >   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    >   ECHO                                                     !1
   23    25        ECHO                                                     '%0A'
   25    26        INIT_FCALL                                               'strrev'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $13     
         29        ASSIGN                                                   !3, $13
   27    30        ECHO                                                     !1
   28    31        ECHO                                                     '%0A'
   29    32        ECHO                                                     !3
   30    33        INIT_FCALL                                               'strpos'
         34        SEND_VAR                                                 !3
         35        SEND_VAL                                                 'a%3C'
         36        DO_ICALL                                         $15     
         37        ASSIGN                                                   !2, $15
   31    38        TYPE_CHECK                                    4          !2
         39      > JMPZ                                                     ~17, ->41
   32    40    > > EXIT                                                     'STRPOS_ERROR'
   35    41    >   INIT_FCALL                                               'substr'
         42        SEND_VAR                                                 !1
         43        SEND_VAL                                                 0
         44        SEND_VAR                                                 !2
         45        DO_ICALL                                         $18     
         46        ASSIGN                                                   !1, $18
   36    47        BOOL_NOT                                         ~20     !1
         48      > JMPZ                                                     ~20, ->50
   37    49    > > EXIT                                                     'SUBSTR_ERROR'
   38    50    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.21 ms | 1400 KiB | 19 Q