3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { static function static_method() { echo "Here's your static method: Foo!\n"; } function static_method_caller() { echo "static_method_caller says: "; $this->static_method(); } function non_static() { echo "I am not a static method\n"; } } $t = new Test(); $t->static_method(); $t->static_method_caller(); Test::non_static();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jF7eL
function name:  (null)
number of ops:  10
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'static_method'
          4        DO_FCALL                                      0          
   19     5        INIT_METHOD_CALL                                         !0, 'static_method_caller'
          6        DO_FCALL                                      0          
   20     7        INIT_STATIC_METHOD_CALL                                  'Test', 'non_static'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Test:
Function static_method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jF7eL
function name:  static_method
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Here%27s+your+static+method%3A+Foo%21%0A'
    6     1      > RETURN                                                   null

End of function static_method

Function static_method_caller:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jF7eL
function name:  static_method_caller
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'static_method_caller+says%3A++'
    9     1        INIT_METHOD_CALL                                         'static_method'
          2        DO_FCALL                                      0          
   10     3      > RETURN                                                   null

End of function static_method_caller

Function non_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jF7eL
function name:  non_static
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'I+am+not+a+static+method%0A'
   13     1      > RETURN                                                   null

End of function non_static

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.97 ms | 1395 KiB | 13 Q