3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const CMS_IDENTIFIER = '#ELEMENT:'; } $identifier = '#ELEMENT:register'; echo strpos(ElementInterface::CMS_IDENTIFIER, $identifier); if (0 === strpos(ElementInterface::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 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/AQs0f
function name:  (null)
number of ops:  20
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        FETCH_CLASS_CONSTANT                             ~2      'ElementInterface', 'CMS_IDENTIFIER'
          3        SEND_VAL                                                 ~2
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ECHO                                                     $3
    9     7        INIT_FCALL                                               'strpos'
          8        FETCH_CLASS_CONSTANT                             ~4      'ElementInterface', 'CMS_IDENTIFIER'
          9        SEND_VAL                                                 ~4
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        IS_IDENTICAL                                             $5, 0
         13      > JMPZ                                                     ~6, ->19
   10    14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 9
         17        DO_ICALL                                         $7      
         18        ECHO                                                     $7
   11    19    > > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.88 ms | 1395 KiB | 17 Q