3v4l.org

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

Class Bar:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/trq5q
function name:  dump
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
    8     1        FETCH_CLASS_NAME                                 ~0      
          2        CONCAT                                           ~1      '__CLASS__%3A+', ~0
          3        SEND_VAL                                                 ~1
    9     4        FETCH_CLASS_NAME                                 ~2      
          5        CONCAT                                           ~3      'self%3A%3Aclass%3A+', ~2
          6        SEND_VAL                                                 ~3
   10     7        FETCH_CLASS_NAME                                 ~4      
          8        CONCAT                                           ~5      'static%3A%3Aclass%3A+', ~4
          9        SEND_VAL                                                 ~5
   11    10        INIT_STATIC_METHOD_CALL                                  'qux'
         11        DO_FCALL                                      0  $6      
         12        CONCAT                                           ~7      'self%3A%3Afoo%28%29%3A+', $6
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
   12    15      > RETURN                                                   null

End of function dump

End of class Bar.

Class Foo:
Function qux:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/trq5q
function name:  qux
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   'Foo'
   23     1*     > RETURN                                                   null

End of function qux

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.78 ms | 1396 KiB | 15 Q