3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Xpto{ private $someArray = array(); public function __set($parameter, $value) { $this->someArray[$parameter] = $value; } public function __get($parameter) { return $this->someArray[$parameter]; } public function getAll() { return $this->someArray; } } $class = new Xpto(); $class->test = "uma variavel com test\n"; echo $class->test; print_r( $class->getAll() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U5M2c
function name:  (null)
number of ops:  13
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Xpto'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        ASSIGN_OBJ                                               !0, 'test'
          4        OP_DATA                                                  'uma+variavel+com+test%0A'
   29     5        FETCH_OBJ_R                                      ~5      !0, 'test'
          6        ECHO                                                     ~5
   31     7        INIT_FCALL                                               'print_r'
          8        INIT_METHOD_CALL                                         !0, 'getAll'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Xpto:
Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U5M2c
function name:  __set
number of ops:  6
compiled vars:  !0 = $parameter, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        FETCH_OBJ_W                                      $2      'someArray'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
    9     5      > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U5M2c
function name:  __get
number of ops:  5
compiled vars:  !0 = $parameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        FETCH_OBJ_R                                      ~1      'someArray'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   14     4*     > RETURN                                                   null

End of function __get

Function getall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U5M2c
function name:  getAll
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'someArray'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function getall

End of class Xpto.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.67 ms | 1396 KiB | 15 Q