3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function staticfunction() { static::anotherstaticfunction(); } public function nonstaticfunction() { $this->anotherstaticfunction(); } public static function anotherstaticfunction() { } } Foo::staticfunction(); (new Foo())->nonstaticfunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VtUNL
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'staticfunction'
          1        DO_FCALL                                      0          
   20     2        NEW                                              $1      'Foo'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $1, 'nonstaticfunction'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function staticfunction

Function nonstaticfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VtUNL
function name:  nonstaticfunction
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_METHOD_CALL                                         'anotherstaticfunction'
          1        DO_FCALL                                      0          
   12     2      > RETURN                                                   null

End of function nonstaticfunction

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

End of function anotherstaticfunction

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.34 ms | 1394 KiB | 13 Q