3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const CMS_IDENTIFIER = '#ELEMENT:'; } $identifier = '#ELEMENT:register'; echo strpos(Test::CMS_IDENTIFIER, $identifier); if (0 === strpos(Test::CMS_IDENTIFIER, $identifier)) { echo substr($identifier, strlen(Test::CMS_IDENTIFIER)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/2FK34
function name:  (null)
number of ops:  18
compiled vars:  !0 = $identifier
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '%23ELEMENT%3Aregister'
    8     1        INIT_FCALL                                               'strpos'
          2        SEND_VAL                                                 '%23ELEMENT%3A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
    9     6        INIT_FCALL                                               'strpos'
          7        SEND_VAL                                                 '%23ELEMENT%3A'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        IS_IDENTICAL                                             $3, 0
         11      > JMPZ                                                     ~4, ->17
   10    12    >   INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 9
         15        DO_ICALL                                         $5      
         16        ECHO                                                     $5
   11    17    > > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140 ms | 1394 KiB | 17 Q