3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tagstr = "o:Münster:Naturwissenschaften::Informatik"; $delPos = strpos($tagstr, "::"); if($delPos !== false){ $delPos = strpos($tagstr, "::", $delPos+1); if($delPos === false){ $delPos = strlen($tagstr); } } else{ $delPos = strlen($tagstr); } $tagstr = substr($tagstr, 0, $delPos); var_dump($tagstr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cPSuU
function name:  (null)
number of ops:  32
compiled vars:  !0 = $tagstr, !1 = $delPos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'o%3AM%C3%BCnster%3ANaturwissenschaften%3A%3AInformatik'
    4     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%3A%3A'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        TYPE_CHECK                                  1018          !1
          7      > JMPZ                                                     ~5, ->20
    6     8    >   INIT_FCALL                                               'strpos'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 '%3A%3A'
         11        ADD                                              ~6      !1, 1
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
    7    15        TYPE_CHECK                                    4          !1
         16      > JMPZ                                                     ~9, ->19
    8    17    >   STRLEN                                           ~10     !0
         18        ASSIGN                                                   !1, ~10
         19    > > JMP                                                      ->22
   12    20    >   STRLEN                                           ~12     !0
         21        ASSIGN                                                   !1, ~12
   14    22    >   INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 0
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !0, $14
   15    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.2 ms | 1396 KiB | 19 Q