3v4l.org

run code in 300+ PHP versions simultaneously
<?php //function test3(){ // echo "Global test1"; //} class Test{ 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->test4(); test3();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJTlg
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'test4'
          4        DO_FCALL                                      0          
   23     5        INIT_FCALL_BY_NAME                                       'test3'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function %00test3%2Fin%2FuJTlg%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJTlg
function name:  test3
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     '+Inner+function%0A+'
   12     1      > RETURN                                                   null

End of function %00test3%2Fin%2FuJTlg%3A10%240

Class Test:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uJTlg
function name:  test1
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL_BY_NAME                                       'test3'
          1        DO_FCALL                                      0          
    8     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/uJTlg
function name:  test2
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_FUNCTION                                         'test3'
   13     1        INIT_FCALL_BY_NAME                                       'test3'
          2        DO_FCALL                                      0          
   14     3      > RETURN                                                   null

End of function test2

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

End of function test4

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.92 ms | 1395 KiB | 13 Q