3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('CONSTANT', 1); define('_CONSTANT', 0); define('EMPTY', ''); var_dump(CONSTANT); $a = '5'; if (!empty(constant('EMPTY'))) { if (!(boolean) _CONSTANT) { echo 1; } } else if (constant('CONSTANT') == 1) { echo 2; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 28
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 35
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
filename:       /in/CIAdM
function name:  (null)
number of ops:  36
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'CONSTANT'
          2        SEND_VAL                                                 1
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 '_CONSTANT'
          6        SEND_VAL                                                 0
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'define'
          9        SEND_VAL                                                 'EMPTY'
         10        SEND_VAL                                                 ''
         11        DO_ICALL                                                 
    6    12        INIT_FCALL                                               'var_dump'
         13        FETCH_CONSTANT                                   ~4      'CONSTANT'
         14        SEND_VAL                                                 ~4
         15        DO_ICALL                                                 
    8    16        ASSIGN                                                   !0, '5'
   10    17        INIT_FCALL                                               'constant'
         18        SEND_VAL                                                 'EMPTY'
         19        DO_ICALL                                         $7      
         20        BOOL_NOT                                         ~8      $7
         21        BOOL_NOT                                         ~9      ~8
         22      > JMPZ                                                     ~9, ->29
   11    23    >   FETCH_CONSTANT                                   ~10     '_CONSTANT'
         24        BOOL                                             ~11     ~10
         25        BOOL_NOT                                         ~12     ~11
         26      > JMPZ                                                     ~12, ->28
   12    27    >   ECHO                                                     1
         28    > > JMP                                                      ->35
   14    29    >   INIT_FCALL                                               'constant'
         30        SEND_VAL                                                 'CONSTANT'
         31        DO_ICALL                                         $13     
         32        IS_EQUAL                                                 $13, 1
         33      > JMPZ                                                     ~14, ->35
   15    34    >   ECHO                                                     2
   16    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.69 ms | 1396 KiB | 19 Q