3v4l.org

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.26 ms | 996 KiB | 14 Q