3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function test1() { echo foo::class . "\n"; return (object) ['foo::test' => 'test', 'body' => 'content']; } public function test() { print_r(debug_backtrace()); return $this; } } class bar extends foo{ public function aa(){ return $this->test(); } } $bar = new bar(); $bar->aa();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaSea
function name:  (null)
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $1      'bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   34     3        INIT_METHOD_CALL                                         !0, 'aa'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class foo:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaSea
function name:  test1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'foo%0A'
   10     1        CAST                                          8  ~0      <array>
          2      > RETURN                                                   ~0
   11     3*     > RETURN                                                   null

End of function test1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaSea
function name:  test
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   16     5        FETCH_THIS                                       ~2      
          6      > RETURN                                                   ~2
   17     7*     > RETURN                                                   null

End of function test

End of class foo.

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

End of function aa

Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaSea
function name:  test1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'foo%0A'
   10     1        CAST                                          8  ~0      <array>
          2      > RETURN                                                   ~0
   11     3*     > RETURN                                                   null

End of function test1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BaSea
function name:  test
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   16     5        FETCH_THIS                                       ~2      
          6      > RETURN                                                   ~2
   17     7*     > RETURN                                                   null

End of function test

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.98 ms | 1400 KiB | 17 Q