3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('FOO', bin2hex(random_bytes(32))); class Bar { const BAZ = FOO; } class Qux extends Bar { const BAZ = 'lol'; } var_dump(Qux::BAZ);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ok7GI
function name:  (null)
number of ops:  14
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                                                 
   13    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAL                                                 'lol'
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.96 ms | 1394 KiB | 21 Q