3v4l.org

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

Class foo:
Function toto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/muFUM
function name:  toto
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_R                      global              ~0      '_SERVER'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function toto

End of class foo.

Class bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.38 ms | 1394 KiB | 15 Q