3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $value; public function setValue($val) { $this->value = $val; } public function getValue() { return $this->value; } } class B extends A { public function setValue($val) { $this->value1 = $val; } } $a = new A; $b = new B; $a->setValue(123); $b->setValue(544); var_dump($a->getValue(), $b->getValue(), $a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtAq
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   30     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   31     6        INIT_METHOD_CALL                                         !0, 'setValue'
          7        SEND_VAL_EX                                              123
          8        DO_FCALL                                      0          
   32     9        INIT_METHOD_CALL                                         !1, 'setValue'
         10        SEND_VAL_EX                                              544
         11        DO_FCALL                                      0          
   34    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !0, 'getValue'
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR                                                 $10
         16        INIT_METHOD_CALL                                         !1, 'getValue'
         17        DO_FCALL                                      0  $11     
         18        SEND_VAR                                                 $11
         19        SEND_VAR                                                 !0
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class A:
Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtAq
function name:  setValue
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function setvalue

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtAq
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function getvalue

End of class A.

Class B:
Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtAq
function name:  setValue
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        ASSIGN_OBJ                                               'value1'
          2        OP_DATA                                                  !0
   24     3      > RETURN                                                   null

End of function setvalue

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QTtAq
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function getvalue

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.01 ms | 941 KiB | 16 Q