3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $x; private $y; public function setX($x) { $this->x = $x; } public function setY($y) { $this->y = $y; } } class Bar extends Foo { public function __construct($x, $y) { $this->x = $x; $this->y = $y; } } $bar = new $bar(4,2); var_dump($bar); $bar->setX(8); $bar->setY(4); var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRBpL
function name:  (null)
number of ops:  19
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_CLASS                                   0  $1      !0
          1        NEW                                              $2      $1
          2        SEND_VAL_EX                                              4
          3        SEND_VAL_EX                                              2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   27     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   28     9        INIT_METHOD_CALL                                         !0, 'setX'
         10        SEND_VAL_EX                                              8
         11        DO_FCALL                                      0          
   29    12        INIT_METHOD_CALL                                         !0, 'setY'
         13        SEND_VAL_EX                                              4
         14        DO_FCALL                                      0          
   30    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

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

End of function setx

Function sety:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRBpL
function name:  setY
number of ops:  4
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ASSIGN_OBJ                                               'y'
          2        OP_DATA                                                  !0
   15     3      > RETURN                                                   null

End of function sety

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRBpL
function name:  __construct
number of ops:  7
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   21     2        ASSIGN_OBJ                                               'x'
          3        OP_DATA                                                  !0
   22     4        ASSIGN_OBJ                                               'y'
          5        OP_DATA                                                  !1
   23     6      > RETURN                                                   null

End of function __construct

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

End of function setx

Function sety:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRBpL
function name:  setY
number of ops:  4
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        ASSIGN_OBJ                                               'y'
          2        OP_DATA                                                  !0
   15     3      > RETURN                                                   null

End of function sety

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.02 ms | 1400 KiB | 15 Q