3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'Data'; define("MBE",$data); class Test { const MAYBE = 'datalit'; } $t = new Test; echo $t::MAYBE,"\n"; echo MBE;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AjQll
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Data'
    3     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'MBE'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    9     5        NEW                                              $4      'Test'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
   10     8        FETCH_CLASS                                   0  $7      !1
          9        FETCH_CLASS_CONSTANT                             ~8      $7, 'MAYBE'
         10        ECHO                                                     ~8
         11        ECHO                                                     '%0A'
   11    12        FETCH_CONSTANT                                   ~9      'MBE'
         13        ECHO                                                     ~9
         14      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.15 ms | 1394 KiB | 15 Q