3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Main { public function __construct() { Second::test2(); echo(' '); Second::test(); echo(' '); $this->test(); echo(' '); self::test(); echo(' '); } public function test() { echo('test'); } } class Second extends Main { public function test2() { echo('test2'); } } $php = new Main; $obj = new Second; $obj->test2(); echo(' '); $obj->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uDWD
function name:  (null)
number of ops:  12
compiled vars:  !0 = $php, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'Main'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   23     3        NEW                                              $5      'Second'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   24     6        INIT_METHOD_CALL                                         !1, 'test2'
          7        DO_FCALL                                      0          
   25     8        ECHO                                                     '+'
   26     9        INIT_METHOD_CALL                                         !1, 'test'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Main:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uDWD
function name:  __construct
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'Second', 'test2'
          1        DO_FCALL                                      0          
    5     2        ECHO                                                     '+'
    6     3        INIT_STATIC_METHOD_CALL                                  'Second', 'test'
          4        DO_FCALL                                      0          
    7     5        ECHO                                                     '+'
    8     6        INIT_METHOD_CALL                                         'test'
          7        DO_FCALL                                      0          
    9     8        ECHO                                                     '+'
   10     9        INIT_STATIC_METHOD_CALL                                  'test'
         10        DO_FCALL                                      0          
   11    11        ECHO                                                     '+'
   12    12      > RETURN                                                   null

End of function __construct

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

End of function test

End of class Main.

Class Second:
Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uDWD
function name:  test2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'test2'
   20     1      > RETURN                                                   null

End of function test2

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6uDWD
function name:  __construct
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_STATIC_METHOD_CALL                                  'Second', 'test2'
          1        DO_FCALL                                      0          
    5     2        ECHO                                                     '+'
    6     3        INIT_STATIC_METHOD_CALL                                  'Second', 'test'
          4        DO_FCALL                                      0          
    7     5        ECHO                                                     '+'
    8     6        INIT_METHOD_CALL                                         'test'
          7        DO_FCALL                                      0          
    9     8        ECHO                                                     '+'
   10     9        INIT_STATIC_METHOD_CALL                                  'test'
         10        DO_FCALL                                      0          
   11    11        ECHO                                                     '+'
   12    12      > RETURN                                                   null

End of function __construct

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

End of function test

End of class Second.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.46 ms | 1399 KiB | 13 Q