3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('TEST_A', 'A'); define('TEST_C', 'C'); foreach(get_defined_constants() as $name => $value) { if (strpos($name, 'TEST_') === 0) { echo "$name: $value\n"; } } echo "Done\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 25
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 24
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/m5YSM
function name:  (null)
number of ops:  28
compiled vars:  !0 = $value, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'TEST_A'
          2        SEND_VAL                                                 'A'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'TEST_C'
          6        SEND_VAL                                                 'C'
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'get_defined_constants'
          9        DO_ICALL                                         $4      
         10      > FE_RESET_R                                       $5      $4, ->25
         11    > > FE_FETCH_R                                       ~6      $5, !0, ->25
         12    >   ASSIGN                                                   !1, ~6
    7    13        INIT_FCALL                                               'strpos'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'TEST_'
         16        DO_ICALL                                         $8      
         17        IS_IDENTICAL                                             $8, 0
         18      > JMPZ                                                     ~9, ->24
    8    19    >   ROPE_INIT                                     4  ~11     !1
         20        ROPE_ADD                                      1  ~11     ~11, '%3A+'
         21        ROPE_ADD                                      2  ~11     ~11, !0
         22        ROPE_END                                      3  ~10     ~11, '%0A'
         23        ECHO                                                     ~10
    6    24    > > JMP                                                      ->11
         25    >   FE_FREE                                                  $5
   12    26        ECHO                                                     'Done%0A'
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.7 ms | 1396 KiB | 19 Q