3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "localhost/ccp/index"; $sbstr = substr($url, -6); echo($sbstr . "<br>"); if ($sbstr == "/index") $url = substr($url, 0, strlen($url) - 6); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/ArcS4
function name:  (null)
number of ops:  19
compiled vars:  !0 = $url, !1 = $sbstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'localhost%2Fccp%2Findex'
    5     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 -6
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    7     6        CONCAT                                           ~5      !1, '%3Cbr%3E'
          7        ECHO                                                     ~5
    9     8        IS_EQUAL                                                 !1, '%2Findex'
          9      > JMPZ                                                     ~6, ->18
   10    10    >   INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 0
         13        STRLEN                                           ~7      !0
         14        SUB                                              ~8      ~7, 6
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !0, $9
   12    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.68 ms | 1395 KiB | 15 Q