3v4l.org

run code in 500+ PHP versions simultaneously
<?php $href = "test#content"; if (strpos($href, '#') !== FALSE){ $href = explode('#', $href); $href = $href['0']; echo $href; }else{ echo "$href"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rtIJ0
function name:  (null)
number of ops:  16
compiled vars:  !0 = $href
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'test%23content'
    4     1        FRAMELESS_ICALL_2                strpos              ~2      !0, '%23'
          2        TYPE_CHECK                                      1018          ~2
          3      > JMPZ                                                         ~3, ->13
    5     4    >   INIT_FCALL                                                   'explode'
          5        SEND_VAL                                                     '%23'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $4      
          8        ASSIGN                                                       !0, $4
    6     9        FETCH_DIM_R                                          ~6      !0, 0
         10        ASSIGN                                                       !0, ~6
    7    11        ECHO                                                         !0
    4    12      > JMP                                                          ->15
    9    13    >   CAST                                              6  ~8      !0
         14        ECHO                                                         ~8
   10    15    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.71 ms | 2577 KiB | 14 Q