3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('FOO', bin2hex(random_bytes(32))); class Bar { const BAZ = FOO; } var_dump(Bar::BAZ);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KJkmQ
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'FOO'
          2        INIT_FCALL                                               'bin2hex'
          3        INIT_FCALL                                               'random_bytes'
          4        SEND_VAL                                                 32
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'var_dump'
         11        FETCH_CLASS_CONSTANT                             ~3      'Bar', 'BAZ'
         12        SEND_VAL                                                 ~3
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.64 ms | 1394 KiB | 21 Q