3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait FooTrait { public static function fooFunc() { return __CLASS__; } } class FooClass { use FooTrait; } echo("Calling FooClass::fooFunc():\n"); echo(FooClass::fooFunc()); echo("\n\n"); echo("Calling FooTrait::fooFunc():\n"); echo(FooTrait::fooFunc());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7C2QO
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'fooclass'
   13     1        ECHO                                                         'Calling+FooClass%3A%3AfooFunc%28%29%3A%0A'
   14     2        INIT_STATIC_METHOD_CALL                                      'FooClass', 'fooFunc'
          3        DO_FCALL                                          0  $0      
          4        ECHO                                                         $0
   15     5        ECHO                                                         '%0A%0A'
   16     6        ECHO                                                         'Calling+FooTrait%3A%3AfooFunc%28%29%3A%0A'
   17     7        INIT_STATIC_METHOD_CALL                                      'FooTrait', 'fooFunc'
          8        DO_FCALL                                          0  $1      
          9        ECHO                                                         $1
         10      > RETURN                                                       1

Class FooTrait:
Function foofunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7C2QO
function name:  fooFunc
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   FETCH_CLASS_NAME                                     ~0      
          1      > RETURN                                                       ~0
    6     2*     > RETURN                                                       null

End of function foofunc

End of class FooTrait.

Class FooClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
151.37 ms | 915 KiB | 8 Q