3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { private $data; public function a(){ $this->data=['a'=>1,'b'=>'d']; } public function getData(){ return $this->data; } } $t=new T(); $data=$t->getData(); var_dump($data); $t->a(); $data=$t->getData(); var_dump($data); $data['b']=23642562; var_dump($data); $data=$t->getData(); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5TsaG
function name:  (null)
number of ops:  29
compiled vars:  !0 = $t, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'T'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        INIT_METHOD_CALL                                         !0, 'getData'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   13     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   14     9        INIT_METHOD_CALL                                         !0, 'a'
         10        DO_FCALL                                      0          
   15    11        INIT_METHOD_CALL                                         !0, 'getData'
         12        DO_FCALL                                      0  $9      
         13        ASSIGN                                                   !1, $9
   16    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   17    17        ASSIGN_DIM                                               !1, 'b'
         18        OP_DATA                                                  23642562
   18    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   19    22        INIT_METHOD_CALL                                         !0, 'getData'
         23        DO_FCALL                                      0  $14     
         24        ASSIGN                                                   !1, $14
   20    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Class T:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5TsaG
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN_OBJ                                               'data'
          1        OP_DATA                                                  <array>
    6     2      > RETURN                                                   null

End of function a

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

End of function getdata

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.86 ms | 1396 KiB | 15 Q