3v4l.org

run code in 500+ PHP versions simultaneously
<?php $test_str = "Mit #[a]http://www.shakin-cats.de/[@]Shakin' Cats[/a]"; $band_start_pos = strpos( $test_str, '#' ); // erstes Zeichen # $row['beschreibung'] if ( $band_start_pos !== FALSE ) { echo "[".$test_str."]<br>"; echo "band_start_pos=[".$band_start_pos."]<br>"; $band_end_pos = strpos( $test_str, '#', $band_start_pos +1 ); // zweites Zeichen # if ( $band_end_pos !== FALSE ) { echo "band_end_pos=[".$band_end_pos."]<br>"; $band_name = substr( $test_str, $band_start_pos +1, $band_end_pos - $band_start_pos +1 ); echo "[".$band_name."]<br>"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 29
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 29
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 29
filename:       /in/gNZHD
function name:  (null)
number of ops:  30
compiled vars:  !0 = $test_str, !1 = $band_start_pos, !2 = $band_end_pos, !3 = $band_name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Mit+%23%5Ba%5Dhttp%3A%2F%2Fwww.shakin-cats.de%2F%5B%40%5DShakin%27+Cats%5B%2Fa%5D'
    4     1        FRAMELESS_ICALL_2                strpos              ~5      !0, '%23'
          2        ASSIGN                                                       !1, ~5
    5     3        TYPE_CHECK                                      1018          !1
          4      > JMPZ                                                         ~7, ->29
    6     5    >   CONCAT                                               ~8      '%5B', !0
          6        CONCAT                                               ~9      ~8, '%5D%3Cbr%3E'
          7        ECHO                                                         ~9
    7     8        CONCAT                                               ~10     'band_start_pos%3D%5B', !1
          9        CONCAT                                               ~11     ~10, '%5D%3Cbr%3E'
         10        ECHO                                                         ~11
    8    11        ADD                                                  ~12     !1, 1
         12        FRAMELESS_ICALL_3                strpos              ~13     !0, '%23'
         13        OP_DATA                                                      ~12
         14        ASSIGN                                                       !2, ~13
    9    15        TYPE_CHECK                                      1018          !2
         16      > JMPZ                                                         ~15, ->29
   10    17    >   CONCAT                                               ~16     'band_end_pos%3D%5B', !2
         18        CONCAT                                               ~17     ~16, '%5D%3Cbr%3E'
         19        ECHO                                                         ~17
   11    20        ADD                                                  ~18     !1, 1
         21        SUB                                                  ~19     !2, !1
         22        ADD                                                  ~20     ~19, 1
         23        FRAMELESS_ICALL_3                substr              ~21     !0, ~18
         24        OP_DATA                                                      ~20
         25        ASSIGN                                                       !3, ~21
   12    26        CONCAT                                               ~23     '%5B', !3
         27        CONCAT                                               ~24     ~23, '%5D%3Cbr%3E'
         28        ECHO                                                         ~24
   14    29    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.76 ms | 3273 KiB | 17 Q