3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function action($return = false) { $result = ''; if ($return) { return $result; } echo $result; } } class Vendor extends Base { public function action($return = false) { // fetch contents without rendering $result = parent::action(true); // this would be new: if ($return) { return $result; } echo $result; } } class Local extends Vendor { public function action($return = false) { // do some venture specific stuff // call parent $result = parent::action(true); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JIWqY
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E > > RETURN                                                   1

Class Base:
Function action:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JIWqY
function name:  action
number of ops:  6
compiled vars:  !0 = $return, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <false>
    6     1        ASSIGN                                                   !1, ''
    8     2      > JMPZ                                                     !0, ->4
    9     3    > > RETURN                                                   !1
   11     4    >   ECHO                                                     !1
   12     5      > RETURN                                                   null

End of function action

End of class Base.

Class Vendor:
Function action:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JIWqY
function name:  action
number of ops:  9
compiled vars:  !0 = $return, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV_INIT                                        !0      <false>
   20     1        INIT_STATIC_METHOD_CALL                                  'action'
          2        SEND_VAL_EX                                              <true>
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   23     5      > JMPZ                                                     !0, ->7
   24     6    > > RETURN                                                   !1
   26     7    >   ECHO                                                     !1
   27     8      > RETURN                                                   null

End of function action

End of class Vendor.

Class Local:
Function action:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JIWqY
function name:  action
number of ops:  6
compiled vars:  !0 = $return, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV_INIT                                        !0      <false>
   37     1        INIT_STATIC_METHOD_CALL                                  'action'
          2        SEND_VAL_EX                                              <true>
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   38     5      > RETURN                                                   null

End of function action

End of class Local.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.5 ms | 1395 KiB | 13 Q