3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const A = 1 << 0; const B = self::A | self::C; const C = 1 << 1; } class Bar extends Foo { const A = 1 << 2; const C = 1 << 3; } var_dump(decbin(Bar::B));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vUHq3
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'decbin'
          2        FETCH_CLASS_CONSTANT                             ~0      'Bar', 'B'
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.64 ms | 1394 KiB | 17 Q