3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private function foo($y) { return $this->x * $y; } public function bar($y) { return $this->a + $this->foo($y); } } class Y extends X { private function foo($z) { explode; } } $y = new Y; $y->x = 100; $y->a = 10; echo $y->bar(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3d9U
function name:  (null)
number of ops:  12
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Y'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3        ASSIGN_OBJ                                               !0, 'x'
          4        OP_DATA                                                  100
          5        ASSIGN_OBJ                                               !0, 'a'
          6        OP_DATA                                                  10
   10     7        INIT_METHOD_CALL                                         !0, 'bar'
          8        SEND_VAL_EX                                              3
          9        DO_FCALL                                      0  $6      
         10        ECHO                                                     $6
         11      > RETURN                                                   1

Class X:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3d9U
function name:  foo
number of ops:  5
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      'x'
          2        MUL                                              ~2      !0, ~1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3d9U
function name:  bar
number of ops:  8
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      'a'
          2        INIT_METHOD_CALL                                         'foo'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ADD                                              ~3      ~1, $2
          6      > RETURN                                                   ~3
          7*     > RETURN                                                   null

End of function bar

End of class X.

Class Y:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3d9U
function name:  foo
number of ops:  4
compiled vars:  !0 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        FETCH_CONSTANT                                   ~1      'explode'
          2        FREE                                                     ~1
          3      > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O3d9U
function name:  bar
number of ops:  8
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      'a'
          2        INIT_METHOD_CALL                                         'foo'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ADD                                              ~3      ~1, $2
          6      > RETURN                                                   ~3
          7*     > RETURN                                                   null

End of function bar

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.66 ms | 1399 KiB | 13 Q