3v4l.org

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

Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.25 ms | 1394 KiB | 15 Q