3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { const FOOBAR = 'baz'; } $obj = new stdClass; $obj->blah = new Example; var_dump($obj->blah::FOOBAR);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oqVL7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    8     3        NEW                                              $5      'Example'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'blah'
          6        OP_DATA                                                  $5
    9     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !0, 'blah'
          9        FETCH_CLASS                                   0  $8      ~7
         10        FETCH_CLASS_CONSTANT                             ~9      $8, 'FOOBAR'
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Example: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1394 KiB | 15 Q