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; } } $a = new A(); $a->setA("coucou"); echo $a->getA(); modifyA($ab); 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/Q0ZdO
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a, !1 = $ab
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        INIT_METHOD_CALL                                         !0, 'setA'
          4        SEND_VAL_EX                                              'coucou'
          5        DO_FCALL                                      0          
   19     6        INIT_METHOD_CALL                                         !0, 'getA'
          7        DO_FCALL                                      0  $6      
          8        ECHO                                                     $6
   21     9        INIT_FCALL_BY_NAME                                       'modifyA'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
   23    12        INIT_METHOD_CALL                                         !0, 'getA'
         13        DO_FCALL                                      0  $8      
         14        ECHO                                                     $8
   30    15      > RETURN                                                   1

Function modifya:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q0ZdO
function name:  modifyA
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   29     1        INIT_METHOD_CALL                                         !0, 'setA'
          2        SEND_VAL_EX                                              'B'
          3        DO_FCALL                                      0          
   30     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/Q0ZdO
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/Q0ZdO
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:
146.04 ms | 1395 KiB | 13 Q