3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace some\thing; class Foo { const BAR = 42; } var_dump(Foo::class); $foo = new Foo; var_dump(Foo::BAR, $foo::BAR);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o1H9T
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_NS_FCALL_BY_NAME                                    'some%5Cthing%5Cvar_dump'
          1        SEND_VAL_EX                                              'some%5Cthing%5CFoo'
          2        DO_FCALL                                      0          
   10     3        NEW                                              $2      'some%5Cthing%5CFoo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   11     6        INIT_NS_FCALL_BY_NAME                                    'some%5Cthing%5Cvar_dump'
          7        SEND_VAL_EX                                              42
          8        FETCH_CLASS                                   0  $5      !0
          9        FETCH_CLASS_CONSTANT                             ~6      $5, 'BAR'
         10        SEND_VAL_EX                                              ~6
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class some\thing\Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.1 ms | 1394 KiB | 15 Q