3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * */ class WP_Block_Type { private $variations = array(); public function __set( $name, $value ) { switch ( $name ) { case 'variations': $this->variations = $value; break; } } public function &__get( $name ) { switch ( $name ) { case 'variations': return $this->variations; } } } $bt = new WP_Block_Type(); var_dump( $bt->variations ); $bt->variations[] = 'foo'; var_dump( $bt->variations ); $bt->variations[] = 'bar'; var_dump( $bt->variations );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TT2UD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $bt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'WP_Block_Type'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'variations'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   30     7        FETCH_OBJ_W                                      $6      !0, 'variations'
          8        ASSIGN_DIM                                               $6
          9        OP_DATA                                                  'foo'
   31    10        INIT_FCALL                                               'var_dump'
         11        FETCH_OBJ_R                                      ~8      !0, 'variations'
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
   32    14        FETCH_OBJ_W                                      $10     !0, 'variations'
         15        ASSIGN_DIM                                               $10
         16        OP_DATA                                                  'bar'
   33    17        INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_R                                      ~12     !0, 'variations'
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class WP_Block_Type:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
filename:       /in/TT2UD
function name:  __set
number of ops:  9
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        IS_EQUAL                                                 !0, 'variations'
          3      > JMPNZ                                                    ~2, ->5
          4    > > JMP                                                      ->8
   13     5    >   ASSIGN_OBJ                                               'variations'
          6        OP_DATA                                                  !1
   14     7      > JMP                                                      ->8
   16     8    > > RETURN                                                   null

End of function __set

Function __get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Return found
Branch analysis from position: 4
Return found
filename:       /in/TT2UD
function name:  __get
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        IS_EQUAL                                                 !0, 'variations'
          2      > JMPNZ                                                    ~1, ->4
          3    > > JMP                                                      ->6
   21     4    >   FETCH_OBJ_W                                      $2      'variations'
          5      > RETURN_BY_REF                                            $2
   23     6    > > RETURN_BY_REF                                            null

End of function __get

End of class WP_Block_Type.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.22 ms | 1456 KiB | 14 Q