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/uL9V7
function name:  (null)
number of ops:  18
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Bar'
          1        SEND_VAL_EX                                              4
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   27     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   28     8        INIT_METHOD_CALL                                         !0, 'setX'
          9        SEND_VAL_EX                                              8
         10        DO_FCALL                                      0          
   29    11        INIT_METHOD_CALL                                         !0, 'setY'
         12        SEND_VAL_EX                                              4
         13        DO_FCALL                                      0          
   30    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class Foo:
Function setx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uL9V7
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/uL9V7
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/uL9V7
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/uL9V7
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/uL9V7
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:
151.4 ms | 1400 KiB | 15 Q