3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Dammit{ function test(){ var_dump(self::CLASS); // \o/ var_dump(__CLASS__); // \o/ var_dump(__METHOD__); // ¯\_(ツ)_/¯ } } class Dammdem{ use Dammit; } (new Dammdem)->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIiEH
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'dammdem'
   15     1        NEW                                              $0      'Dammdem'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Dammit:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIiEH
function name:  test
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CLASS_NAME                                 ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    6     4        INIT_FCALL                                               'var_dump'
          5        FETCH_CLASS_NAME                                 ~2      
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAL                                                 'Dammit%3A%3Atest'
         10        DO_ICALL                                                 
    8    11      > RETURN                                                   null

End of function test

End of class Dammit.

Class Dammdem: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.99 ms | 999 KiB | 14 Q