3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; public function getA() { return $this->a; } public function setA($a) { $this->a = $a; } } $b = 'b'; $a = new A(); $a->setA("coucou"); echo $a->getA(); modifyA($b); echo $a->getA(); function modifyA(A $a) { $a->setA('B'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hLkKQ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'b'
   17     1        NEW                                              $3      'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   18     4        INIT_METHOD_CALL                                         !1, 'setA'
          5        SEND_VAL_EX                                              'coucou'
          6        DO_FCALL                                      0          
   20     7        INIT_METHOD_CALL                                         !1, 'getA'
          8        DO_FCALL                                      0  $7      
          9        ECHO                                                     $7
   22    10        INIT_FCALL_BY_NAME                                       'modifyA'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
   24    13        INIT_METHOD_CALL                                         !1, 'getA'
         14        DO_FCALL                                      0  $9      
         15        ECHO                                                     $9
   31    16      > RETURN                                                   1

Function modifya:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hLkKQ
function name:  modifyA
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   30     1        INIT_METHOD_CALL                                         !0, 'setA'
          2        SEND_VAL_EX                                              'B'
          3        DO_FCALL                                      0          
   31     4      > RETURN                                                   null

End of function modifya

Class A:
Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hLkKQ
function name:  getA
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function geta

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

End of function seta

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.85 ms | 1395 KiB | 13 Q