3v4l.org

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

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.53 ms | 1395 KiB | 19 Q