3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test3(){ echo "Global test"; } class Test{ function test3() { echo "TEST3\n"; } function test1(){ test3(); } function test2(){ function test3(){ echo " Inner function\n "; } test3(); } function test4(){ test3(); } } $test = new Test; //$test->test1(); // Генерирует ошибку вида PHP Fatal error: Call to undefined function test3() $test->test2(); $test->test4(); test3();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hv0eA
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'test2'
          4        DO_FCALL                                      0          
   26     5        INIT_METHOD_CALL                                         !0, 'test4'
          6        DO_FCALL                                      0          
   27     7        INIT_FCALL                                               'test3'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function test3

Class Test:
Function test3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Hv0eA
function name:  test3
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'TEST3%0A'
    8     1      > RETURN                                                   null

End of function test3

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

End of function test1

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


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

End of Dynamic Function 0

End of function test2

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

End of function test4

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.32 ms | 1021 KiB | 17 Q