3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class Foo { function test() { $this->staticTest(); } function test2() { self::staticTest(); } function test3() { static::staticTest(); } public static function staticTest() { echo 'jow'.PHP_EOL; } } class Bar extends Foo { } $foo = new Foo(); $foo->test(); $foo->test2(); $foo->test3(); $bar = new Bar(); $bar->test(); $bar->test2(); $bar->test3();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vkHMS
function name:  (null)
number of ops:  22
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   26     3        NEW                                              $3      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   27     6        INIT_METHOD_CALL                                         !0, 'test'
          7        DO_FCALL                                      0          
   28     8        INIT_METHOD_CALL                                         !0, 'test2'
          9        DO_FCALL                                      0          
   29    10        INIT_METHOD_CALL                                         !0, 'test3'
         11        DO_FCALL                                      0          
   31    12        NEW                                              $9      'Bar'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $9
   32    15        INIT_METHOD_CALL                                         !1, 'test'
         16        DO_FCALL                                      0          
   33    17        INIT_METHOD_CALL                                         !1, 'test2'
         18        DO_FCALL                                      0          
   34    19        INIT_METHOD_CALL                                         !1, 'test3'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

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

End of function test

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

End of function test2

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

End of function test3

Function statictest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vkHMS
function name:  staticTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'jow%0A'
   21     1      > RETURN                                                   null

End of function statictest

End of class Foo.

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

End of function test

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

End of function test2

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

End of function test3

Function statictest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vkHMS
function name:  staticTest
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'jow%0A'
   21     1      > RETURN                                                   null

End of function statictest

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1400 KiB | 15 Q