3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Bar { public static function qux() { @var_dump(eval('return self::class;')); } } class Foo { use Bar; } Foo::qux(); Bar::qux();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHcD4
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'foo'
   16     1        INIT_STATIC_METHOD_CALL                                  'Foo', 'qux'
          2        DO_FCALL                                      0          
   17     3        INIT_STATIC_METHOD_CALL                                  'Bar', 'qux'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Bar:
Function qux:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHcD4
function name:  qux
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BEGIN_SILENCE                                    ~0      
          1        INIT_FCALL                                               'var_dump'
          2        INCLUDE_OR_EVAL                                  $1      'return+self%3A%3Aclass%3B', EVAL
          3        SEND_VAR                                                 $1
          4        DO_ICALL                                                 
          5        END_SILENCE                                              ~0
    8     6      > RETURN                                                   null

End of function qux

End of class Bar.

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.26 ms | 1394 KiB | 15 Q