3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test1 { } $test1 = new test1(); $test1->foo->bar = 42; var_dump($test1); echo PHP_EOL . PHP_EOL; class test2 { public $foo; } $test2 = new test2(); $test2->foo->bar = 42; var_dump($test2); echo PHP_EOL . PHP_EOL; class test3 { } $test3 = new test3(); $test3->foo->bar['nope'] = 42; var_dump($test3); echo PHP_EOL . PHP_EOL; class test4 { public $foo; } $test4 = new test4(); $test4->foo->bar['nope'] = 42; var_dump($test4); echo PHP_EOL . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aakSR
function name:  (null)
number of ops:  43
compiled vars:  !0 = $test1, !1 = $test2, !2 = $test3, !3 = $test4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $4      'test1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    8     3        FETCH_OBJ_W                                      $7      !0, 'foo'
          4        ASSIGN_OBJ                                               $7, 'bar'
          5        OP_DATA                                                  42
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   11     9        ECHO                                                     '%0A%0A'
   20    10        NEW                                              $10     'test2'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $10
   21    13        FETCH_OBJ_W                                      $13     !1, 'foo'
         14        ASSIGN_OBJ                                               $13, 'bar'
         15        OP_DATA                                                  42
   23    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   24    19        ECHO                                                     '%0A%0A'
   32    20        NEW                                              $16     'test3'
         21        DO_FCALL                                      0          
         22        ASSIGN                                                   !2, $16
   33    23        FETCH_OBJ_W                                      $19     !2, 'foo'
         24        FETCH_OBJ_W                                      $20     $19, 'bar'
         25        ASSIGN_DIM                                               $20, 'nope'
         26        OP_DATA                                                  42
   35    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   36    30        ECHO                                                     '%0A%0A'
   45    31        NEW                                              $23     'test4'
         32        DO_FCALL                                      0          
         33        ASSIGN                                                   !3, $23
   46    34        FETCH_OBJ_W                                      $26     !3, 'foo'
         35        FETCH_OBJ_W                                      $27     $26, 'bar'
         36        ASSIGN_DIM                                               $27, 'nope'
         37        OP_DATA                                                  42
   48    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                                 
   49    41        ECHO                                                     '%0A%0A'
   50    42      > RETURN                                                   1

Class test1: [no user functions]
Class test2: [no user functions]
Class test3: [no user functions]
Class test4: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.03 ms | 1400 KiB | 15 Q