3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const CMS_IDENTIFIER = '#ELEMENT:'; } $identifier = '#ELEMENT:register'; echo strpos($identifier, Test::CMS_IDENTIFIER); if (0 === strpos($identifier, Test::CMS_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/ihrQf
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        SEND_VAR                                                 !0
          3        FETCH_CLASS_CONSTANT                             ~2      '%C2%A0Test', 'CMS_IDENTIFIER'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6        ECHO                                                     $3
    9     7        INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !0
          9        FETCH_CLASS_CONSTANT                             ~4      '%C2%A0Test', 'CMS_IDENTIFIER'
         10        SEND_VAL                                                 ~4
         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:
146.45 ms | 1395 KiB | 17 Q