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); } } class Foo { use Bar; } Foo::dump();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/maFrL
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'foo'
   17     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/maFrL
function name:  dump
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CLASS_NAME                                 ~0      
          2        CONCAT                                           ~1      '__CLASS__%3A+', ~0
          3        SEND_VAL                                                 ~1
          4        FETCH_CLASS_NAME                                 ~2      
          5        CONCAT                                           ~3      'self%3A%3Aclass%3A+', ~2
          6        SEND_VAL                                                 ~3
          7        FETCH_CLASS_NAME                                 ~4      
          8        CONCAT                                           ~5      'static%3A%3Aclass%3A+', ~4
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
    8    11      > RETURN                                                   null

End of function dump

End of class Bar.

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.55 ms | 1386 KiB | 15 Q