3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FOO = BAR + 1; class Baz { const BAZ = BAR + 1; }; if (false) Baz::BAZ; // true にすると...? const BAR = 1; var_dump(FOO); // int(1) !! var_dump(Baz::BAZ); // int(2) !! var_dump(BAR); // int(1)
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/Sqr2C
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'FOO', <const ast>
    4     1      > JMPZ                                                     <false>, ->4
          2    >   FETCH_CLASS_CONSTANT                             ~0      'Baz', 'BAZ'
          3        FREE                                                     ~0
    5     4    >   DECLARE_CONST                                            'BAR', 1
    6     5        INIT_FCALL                                               'var_dump'
          6        FETCH_CONSTANT                                   ~1      'FOO'
          7        SEND_VAL                                                 ~1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'var_dump'
         10        FETCH_CLASS_CONSTANT                             ~3      'Baz', 'BAZ'
         11        SEND_VAL                                                 ~3
         12        DO_ICALL                                                 
    8    13        INIT_FCALL                                               'var_dump'
         14        FETCH_CONSTANT                                   ~5      'BAR'
         15        SEND_VAL                                                 ~5
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class Baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.27 ms | 1394 KiB | 15 Q