3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function test2(){ function test3(){ echo "123"; } 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/EALvv
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test
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, 'test1'
          4        DO_FCALL                                      0          
   19     5        INIT_METHOD_CALL                                         !0, 'test2'
          6        DO_FCALL                                      0          
   20     7        INIT_METHOD_CALL                                         !0, 'test4'
          8        DO_FCALL                                      0          
   21     9        INIT_FCALL_BY_NAME                                       'test3'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function %00test3%2Fin%2FEALvv%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EALvv
function name:  test3
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     '123'
    9     1      > RETURN                                                   null

End of function %00test3%2Fin%2FEALvv%3A7%240

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

End of function test4

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.43 ms | 1395 KiB | 13 Q