3v4l.org

run code in 500+ PHP versions simultaneously
<?php class TestOne {} class TestTwo extends TestOne { public function __get($name) { return null; } } $one = new TestOne(); $one->scalar = 1; $one->array[] = 1; var_dump($one->scalar, $one->array); $two = new TestTwo(); $two->scalar = 1; $two->array[] = 1; var_dump($two->scalar, $two->array); $three = new TestTwo(); $three->scalar = 1; $three->array = []; $three->array[] = 1; var_dump($three->scalar, $three->array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7IDK
function name:  (null)
number of ops:  45
compiled vars:  !0 = $one, !1 = $two, !2 = $three
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $3      'TestOne'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   12     3        ASSIGN_OBJ                                                   !0, 'scalar'
          4        OP_DATA                                                      1
   13     5        FETCH_OBJ_W                                          $7      !0, 'array'
          6        ASSIGN_DIM                                                   $7
          7        OP_DATA                                                      1
   15     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_OBJ_R                                          ~9      !0, 'scalar'
         10        SEND_VAL                                                     ~9
         11        FETCH_OBJ_R                                          ~10     !0, 'array'
         12        SEND_VAL                                                     ~10
         13        DO_ICALL                                                     
   17    14        NEW                                                  $12     'TestTwo'
         15        DO_FCALL                                          0          
         16        ASSIGN                                                       !1, $12
   18    17        ASSIGN_OBJ                                                   !1, 'scalar'
         18        OP_DATA                                                      1
   19    19        FETCH_OBJ_W                                          $16     !1, 'array'
         20        ASSIGN_DIM                                                   $16
         21        OP_DATA                                                      1
   21    22        INIT_FCALL                                                   'var_dump'
         23        FETCH_OBJ_R                                          ~18     !1, 'scalar'
         24        SEND_VAL                                                     ~18
         25        FETCH_OBJ_R                                          ~19     !1, 'array'
         26        SEND_VAL                                                     ~19
         27        DO_ICALL                                                     
   23    28        NEW                                                  $21     'TestTwo'
         29        DO_FCALL                                          0          
         30        ASSIGN                                                       !2, $21
   24    31        ASSIGN_OBJ                                                   !2, 'scalar'
         32        OP_DATA                                                      1
   25    33        ASSIGN_OBJ                                                   !2, 'array'
         34        OP_DATA                                                      <array>
   26    35        FETCH_OBJ_W                                          $26     !2, 'array'
         36        ASSIGN_DIM                                                   $26
         37        OP_DATA                                                      1
   28    38        INIT_FCALL                                                   'var_dump'
         39        FETCH_OBJ_R                                          ~28     !2, 'scalar'
         40        SEND_VAL                                                     ~28
         41        FETCH_OBJ_R                                          ~29     !2, 'array'
         42        SEND_VAL                                                     ~29
         43        DO_ICALL                                                     
         44      > RETURN                                                       1

Class TestOne: [no user functions]
Class TestTwo:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7IDK
function name:  __get
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1      > RETURN                                                       null
    8     2*     > RETURN                                                       null

End of function __get

End of class TestTwo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
223.78 ms | 3441 KiB | 14 Q