3v4l.org

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

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.9 ms | 1392 KiB | 13 Q